Skip to content

Commit

Permalink
Merge branch 'develop' into feature/sycl-merge
Browse files Browse the repository at this point in the history
  • Loading branch information
jcosborn committed Dec 19, 2023
2 parents bad098a + a24bcfa commit 418824e
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/rocm-build-ci.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
name: rocm-build-ci
run-name: ${{ github.actor }} is kicking off a ROCm build
on: pull_request
jobs:
rocm-build:
runs-on: [self-hosted, amd]
strategy:
matrix:
rocm: [ 5.6.1, 5.7.2 ]
steps:
- uses: actions/checkout@v3
- run: |
export ROCM_PATH=/opt/rocm-5.5.0
export ROCM_PATH=/opt/rocm-${{ matrix.rocm }}
export PATH=${ROCM_PATH}/bin:${ROCM_PATH}/llvm/bin:${PATH}
SRCROOT=`pwd`
BUILDROOT=`mktemp -d build-XXXXXXXX`
Expand Down Expand Up @@ -40,7 +42,7 @@ jobs:
-DQUDA_DOWNLOAD_EIGEN=ON \
-DQUDA_PRECISION=14 \
-DCMAKE_INSTALL_PREFIX=${INSTALLROOT} \
-DCMAKE_BUILD_TYPE="DEVEL" \
-DCMAKE_BUILD_TYPE="STRICT" \
-DCMAKE_CXX_COMPILER="${ROCM_PATH}/llvm/bin/clang++" \
-DCMAKE_C_COMPILER="${ROCM_PATH}/llvm/bin/clang" \
-DCMAKE_HIP_COMPILER="${ROCM_PATH}/llvm/bin/clang++" \
Expand Down
7 changes: 5 additions & 2 deletions lib/targets/hip/malloc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -528,12 +528,15 @@ namespace quda
errorQuda("hipPointerGetAttributes returned error: %s\n", hipGetErrorString(error));
}

switch (attr.memoryType) {
switch (attr.type) {
#if HIP_VERSION_MAJOR >= 6
case hipMemoryTypeUnregistered: return QUDA_CPU_FIELD_LOCATION;
#endif // HIP_VERSION_MAJOR >= 6
case hipMemoryTypeHost: return QUDA_CPU_FIELD_LOCATION;
case hipMemoryTypeDevice: return QUDA_CUDA_FIELD_LOCATION;
case hipMemoryTypeArray: return QUDA_CUDA_FIELD_LOCATION;
case hipMemoryTypeUnified: return QUDA_CUDA_FIELD_LOCATION; ///< Not used currently
default: errorQuda("Unknown memory type %d\n", attr.memoryType); return QUDA_INVALID_FIELD_LOCATION;
default: errorQuda("Unknown memory type %d\n", attr.type); return QUDA_INVALID_FIELD_LOCATION;
}
}

Expand Down
7 changes: 7 additions & 0 deletions tests/invert_test_gtest.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include <gtest/gtest.h>
#include <quda_arch.h>
#include <cmath>

// tuple containing parameters for Schwarz solver
using schwarz_t = ::testing::tuple<QudaSchwarzType, QudaInverterType, QudaPrecision>;
Expand Down Expand Up @@ -136,6 +137,12 @@ TEST_P(InvertTest, verify)
if (res_t & QUDA_HEAVY_QUARK_RESIDUAL) inv_param.tol_hq = tol_hq;

auto tol = inv_param.tol;
if (inv_param.dslash_type == QUDA_DOMAIN_WALL_DSLASH ||
inv_param.dslash_type == QUDA_DOMAIN_WALL_4D_DSLASH ||
inv_param.dslash_type == QUDA_MOBIUS_DWF_DSLASH ||
inv_param.dslash_type == QUDA_MOBIUS_DWF_EOFA_DSLASH) {
tol *= std::sqrt(static_cast<double>(inv_param.Ls));
}
// FIXME eventually we should build in refinement to the *NR solvers to remove the need for this
if (is_normal_residual(::testing::get<0>(GetParam()))) tol *= 50;
// Slight loss of precision possible when reconstructing full solution
Expand Down

0 comments on commit 418824e

Please sign in to comment.