Skip to content

Commit

Permalink
Merge #3386
Browse files Browse the repository at this point in the history
3386: ROCm 3.0 support

They dropped `${HIP_ROOT_DIR}/include` from the default include path. Also, I have changed compiler warnings to be consistent with the host compiler.
  • Loading branch information
jngrad authored Dec 23, 2019
2 parents ba60909 + 96b27bd commit 8fc38b4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
6 changes: 5 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,11 @@ if(WITH_CUDA)
message(STATUS "Found HIP compiler: ${HIP_HIPCC_EXECUTABLE}")
set(CUDA 1)
set(HIP 1)
list(APPEND HIP_HCC_FLAGS "-Wno-macro-redefined -Wno-duplicate-decl-specifier -std=c++14")
list(APPEND HIP_HCC_FLAGS "-I${HIP_ROOT_DIR}/include -Wno-c99-designator -Wno-macro-redefined -Wno-duplicate-decl-specifier -std=c++14")
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")
if(WARNINGS_ARE_ERRORS)
list(APPEND HIP_HCC_FLAGS "-Werror")
endif()

find_library(ROCFFT_LIB name "rocfft" PATHS "${HIP_ROOT_DIR}/lib")

Expand Down
1 change: 1 addition & 0 deletions src/core/actor/Mmm1dgpuForce_cuda.cu
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
// the code is mostly multi-GPU capable, but ESPResSo is not yet
const int deviceCount = 1;
float multigpu_factors[] = {1.0};
#undef cudaSetDevice
#define cudaSetDevice(d)

#include "EspressoSystemInterface.hpp"
Expand Down
2 changes: 1 addition & 1 deletion src/core/curand_wrapper.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class philox4x32_10_stateless : private rocrand_device::philox4x32_10_engine {

__forceinline__ __device__ uint4 curand_Philox4x32_10(uint4 counter,
uint2 key) {
philox4x32_10_stateless *e;
philox4x32_10_stateless *e = nullptr;
return (*e)(counter, key);
}

Expand Down

0 comments on commit 8fc38b4

Please sign in to comment.