diff --git a/CMakeLists.txt b/CMakeLists.txt index 00fc46735..c6ba58e69 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -210,7 +210,7 @@ if(CUDA) elseif(HIP) # ------------------------------------------------------------------------------HIP-- if (DEFINED ENV{ROCM_PATH}) - include($ENV{ROCM_PATH}/hip/cmake/FindHIP.cmake) + include($ENV{ROCM_PATH}/lib/cmake/hip/FindHIP.cmake) elseif(DEFINED ENV{HIP_PATH}) include($ENV{HIP_PATH}/cmake/FindHIP.cmake) elseif(EXISTS "${CMAKE_SOURCE_DIR}/cmake/FindHIP.cmake") diff --git a/src/acc/hip/hip_fft.h b/src/acc/hip/hip_fft.h index bf195d28e..6892e8fed 100644 --- a/src/acc/hip/hip_fft.h +++ b/src/acc/hip/hip_fft.h @@ -7,7 +7,7 @@ #include "src/acc/hip/hip_settings.h" #include "src/acc/hip/hip_mem_utils.h" #include -#include +#include #ifdef DEBUG_HIP #define HANDLE_HIPFFT_ERROR( err ) (HipfftHandleError( err, __FILE__, __LINE__ )) diff --git a/src/acc/hip/hip_kernels/helper.h b/src/acc/hip/hip_kernels/helper.h index 5935ca83e..5d6faec67 100644 --- a/src/acc/hip/hip_kernels/helper.h +++ b/src/acc/hip/hip_kernels/helper.h @@ -5,8 +5,8 @@ #define HIP_HELPER_KERNELS_H_ #include -#include -#include +#include +#include #include #include #include diff --git a/src/acc/hip/hip_kernels/helper.hip.cpp b/src/acc/hip/hip_kernels/helper.hip.cpp index 0d4fb5373..30151ba0d 100644 --- a/src/acc/hip/hip_kernels/helper.hip.cpp +++ b/src/acc/hip/hip_kernels/helper.hip.cpp @@ -7,8 +7,8 @@ #include "src/acc/hip/hip_kernels/helper.h" #include "src/acc/hip/hip_settings.h" -#include -#include +#include +#include /// Needed explicit template instantiations template __global__ void hip_kernel_make_eulers_2D(XFLOAT *, diff --git a/src/acc/hip/hip_mem_utils.h b/src/acc/hip/hip_mem_utils.h index 1aec009d9..8e52ce8db 100644 --- a/src/acc/hip/hip_mem_utils.h +++ b/src/acc/hip/hip_mem_utils.h @@ -6,7 +6,7 @@ #ifdef _HIP_ENABLED #include -#include +#include #include "src/acc/hip/hip_settings.h" #include "src/acc/hip/custom_allocator.h" #endif diff --git a/src/acc/hip/hip_ml_optimiser.hip.cpp b/src/acc/hip/hip_ml_optimiser.hip.cpp index 4fcfa5e86..7019517fa 100644 --- a/src/acc/hip/hip_ml_optimiser.hip.cpp +++ b/src/acc/hip/hip_ml_optimiser.hip.cpp @@ -11,8 +11,8 @@ #include #include "src/ml_optimiser.h" #include -#include -#include +#include +#include #include "src/acc/acc_ptr.h" #include "src/acc/acc_projector.h" diff --git a/src/acc/hip/hip_settings.h b/src/acc/hip/hip_settings.h index ccadce531..27a2e3138 100644 --- a/src/acc/hip/hip_settings.h +++ b/src/acc/hip/hip_settings.h @@ -15,7 +15,7 @@ #include "src/macros.h" #include "src/error.h" -#include +#include // Required compute capability #define HIP_CC_MAJOR 5 diff --git a/src/acc/hip/hip_utils_cub.h b/src/acc/hip/hip_utils_cub.h index 73ec4d2e5..87f1615ce 100644 --- a/src/acc/hip/hip_utils_cub.h +++ b/src/acc/hip/hip_utils_cub.h @@ -39,14 +39,14 @@ if (ptr.getAllocator() == NULL) max_pair.deviceAlloc(); size_t temp_storage_size = 0; - DEBUG_HANDLE_ERROR(hipcub::DeviceReduce::ArgMax( NULL, temp_storage_size, ~ptr, ~max_pair, ptr.getSize())); + DEBUG_HANDLE_ERROR(hipcub::DeviceReduce::ArgMax( NULL, temp_storage_size, ~ptr, ~max_pair, static_cast(ptr.getSize()))); if(temp_storage_size==0) temp_storage_size=1; HipCustomAllocator::Alloc* alloc = ptr.getAllocator()->alloc(temp_storage_size); - DEBUG_HANDLE_ERROR(hipcub::DeviceReduce::ArgMax( alloc->getPtr(), temp_storage_size, ~ptr, ~max_pair, ptr.getSize(), ptr.getStream())); + DEBUG_HANDLE_ERROR(hipcub::DeviceReduce::ArgMax( alloc->getPtr(), temp_storage_size, ~ptr, ~max_pair, static_cast(ptr.getSize()), ptr.getStream())); max_pair.cpToHost(); ptr.streamSync(); @@ -75,14 +75,14 @@ if (ptr.getAllocator() == NULL) min_pair.deviceAlloc(); size_t temp_storage_size = 0; - DEBUG_HANDLE_ERROR(hipcub::DeviceReduce::ArgMin( NULL, temp_storage_size, ~ptr, ~min_pair, ptr.getSize())); + DEBUG_HANDLE_ERROR(hipcub::DeviceReduce::ArgMin( NULL, temp_storage_size, ~ptr, ~min_pair, static_cast(ptr.getSize()))); if(temp_storage_size==0) temp_storage_size=1; HipCustomAllocator::Alloc* alloc = ptr.getAllocator()->alloc(temp_storage_size); - DEBUG_HANDLE_ERROR(hipcub::DeviceReduce::ArgMin( alloc->getPtr(), temp_storage_size, ~ptr, ~min_pair, ptr.getSize(), ptr.getStream())); + DEBUG_HANDLE_ERROR(hipcub::DeviceReduce::ArgMin( alloc->getPtr(), temp_storage_size, ~ptr, ~min_pair, static_cast(ptr.getSize()), ptr.getStream())); min_pair.cpToHost(); ptr.streamSync(); diff --git a/src/apps/CMakeLists.txt b/src/apps/CMakeLists.txt index 6f5d15f15..1a57330a5 100644 --- a/src/apps/CMakeLists.txt +++ b/src/apps/CMakeLists.txt @@ -293,7 +293,7 @@ if (CUDA_FOUND) elseif (HIP_FOUND) file(GLOB REL_HIP_SRC "${CMAKE_SOURCE_DIR}/src/acc/hip/*.cpp" "${CMAKE_SOURCE_DIR}/src/acc/hip/hip_kernels/*.cpp" ) - hip_add_library(relion_gpu_util ${REL_HIP_SRC}) + add_library(relion_gpu_util ${REL_HIP_SRC}) if (${CMAKE_BUILD_TYPE_LOWER} STREQUAL "profiling") find_library(ROCM_TRACER_LIB NAMES roctx64 PATHS ${HIP_ROOT_DIR}/lib ${HIP_ROOT_DIR}/../lib REQUIRED) diff --git a/src/projector.cpp b/src/projector.cpp index 0ae9add5d..c35691a1a 100644 --- a/src/projector.cpp +++ b/src/projector.cpp @@ -24,7 +24,7 @@ #ifdef _CUDA_ENABLED #include #elif _HIP_ENABLED - #include + #include #endif #if defined _CUDA_ENABLED || defined _HIP_ENABLED #include