Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ROCm 3.3 support #3623

Merged
merged 5 commits into from
Apr 3, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions cmake/FindCUDACompiler.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,19 @@ else()
list(APPEND CMAKE_MODULE_PATH "${ROCM_HOME}/hip/cmake")
find_package(HIP 1.5.18494 QUIET MODULE)
if(HIP_FOUND)
set(HCC_PATH "${HIP_ROOT_DIR}")
if(HIP_VERSION VERSION_LESS "3.1")
set(HCC_PATH "${HIP_ROOT_DIR}")
else()
set(HCC_PATH "${ROCM_HOME}/hcc")
endif()

find_package(HIP MODULE)
message(STATUS "Found HIP compiler: ${HIP_HIPCC_EXECUTABLE}")
set(CUDA 1)
set(HIP 1)
set(CUDA_COMPILER_EXE ${HIP_HIPCC_EXECUTABLE})
list(APPEND HIP_HCC_FLAGS "-I${HIP_ROOT_DIR}/include -I${ROCM_HOME}/include -Wno-c99-designator -Wno-macro-redefined -Wno-duplicate-decl-specifier -std=c++${CMAKE_CXX_STANDARD}")
list(APPEND HIP_HCC_FLAGS "-pedantic -Wall -Wextra -Wno-sign-compare -Wno-unused-function -Wno-unused-variable -Wno-unused-parameter -Wno-missing-braces -Wno-gnu-anonymous-struct -Wno-nested-anon-types -Wno-gnu-zero-variadic-macro-arguments")
list(APPEND HIP_HCC_FLAGS "-pedantic -Wall -Wextra -Wno-sign-compare -Wno-unused-function -Wno-unused-variable -Wno-unused-parameter -Wno-missing-braces -Wno-gnu-anonymous-struct -Wno-nested-anon-types -Wno-gnu-zero-variadic-macro-arguments -Wno-deprecated-copy")
mkuron marked this conversation as resolved.
Show resolved Hide resolved
if(WARNINGS_ARE_ERRORS)
list(APPEND HIP_HCC_FLAGS "-Werror")
endif()
Expand Down
3 changes: 3 additions & 0 deletions src/core/cuda_init_cuda.cu
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ static const int computeCapabilityMinMinor = 0;
const char *cuda_error;

void cuda_init() {
#if defined(__HIPCC__) and not defined(__CUDACC__)
setenv("HSA_ENABLE_INTERRUPT", "0", 1);
#endif
#if defined(__HIPCC__) and not defined(__CUDACC__) and \
HIP_VERSION_PATCH <= 19171 /* i.e. <= v2.4.0 */
// Catch an exception that causes `import espressomd` to crash in
Expand Down