Skip to content

Commit ba279cd

Browse files
davidrohrktf
authored andcommitted
GPU: Override incorrectly reported HIP constant memory size
1 parent 27a902c commit ba279cd

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

GPU/Common/GPUCommonDefSettings.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@
2121
#error Please include GPUCommonDef.h!
2222
#endif
2323

24-
//#define GPUCA_OPENCL_CPP_CLANG_C11_ATOMICS //Use C11 atomic instead of old style atomics for OpenCL C++ in clang (OpenCL 2.2 C++ will use C++11 atomics irrespectively)
24+
//#define GPUCA_OPENCL_CPP_CLANG_C11_ATOMICS // Use C11 atomic instead of old style atomics for OpenCL C++ in clang (OpenCL 2.2 C++ will use C++11 atomics irrespectively)
2525

26-
//#define GPUCA_CUDA_NO_CONSTANT_MEMORY //Do not use constant memory for CUDA
27-
#define GPUCA_HIP_NO_CONSTANT_MEMORY //Do not use constant memory for HIP - MANDATORY for now since all AMD GPUs have insufficient constant memory with HIP
28-
//#define GPUCA_OPENCL_NO_CONSTANT_MEMORY //Do not use constant memory for OpenCL 1.2
29-
#define GPUCA_OPENCLCPP_NO_CONSTANT_MEMORY //Do not use constant memory for OpenCL C++ - MANDATORY as OpenCL cannot cast between __constant and __generic yet!
26+
//#define GPUCA_CUDA_NO_CONSTANT_MEMORY // Do not use constant memory for CUDA
27+
//#define GPUCA_HIP_NO_CONSTANT_MEMORY // Do not use constant memory for HIP - MANDATORY for now since all AMD GPUs have insufficient constant memory with HIP
28+
//#define GPUCA_OPENCL_NO_CONSTANT_MEMORY // Do not use constant memory for OpenCL 1.2
29+
#define GPUCA_OPENCLCPP_NO_CONSTANT_MEMORY // Do not use constant memory for OpenCL C++ - MANDATORY as OpenCL cannot cast between __constant and __generic yet!
3030

3131
// clang-format on
3232

GPU/GPUTracking/Base/hip/GPUReconstructionHIP.hip.cxx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,7 @@ int GPUReconstructionHIPBackend::InitDevice_Runtime()
218218
mDeviceId = bestDevice;
219219

220220
GPUFailedMsgI(hipGetDeviceProperties(&hipDeviceProp_t, mDeviceId));
221+
hipDeviceProp_t.totalConstMem = 65536; // TODO: Remove workaround, fixes incorrectly reported HIP constant memory
221222

222223
if (mDeviceProcessingSettings.debugLevel >= 2) {
223224
GPUInfo("Using HIP Device %s with Properties:", hipDeviceProp_t.name);

0 commit comments

Comments
 (0)