From 99241148235e5d0c4fc1b962fe088fb0f1d7b444 Mon Sep 17 00:00:00 2001 From: Maximiliano Puccio Date: Fri, 7 Nov 2025 17:22:08 +0100 Subject: [PATCH 1/2] Fix compatibility with CUDA13 --- GPU/GPUTracking/Base/cuda/GPUReconstructionCUDA.cu | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/GPU/GPUTracking/Base/cuda/GPUReconstructionCUDA.cu b/GPU/GPUTracking/Base/cuda/GPUReconstructionCUDA.cu index 62b490a59d0dc..b0a48270473d4 100644 --- a/GPU/GPUTracking/Base/cuda/GPUReconstructionCUDA.cu +++ b/GPU/GPUTracking/Base/cuda/GPUReconstructionCUDA.cu @@ -120,6 +120,7 @@ int32_t GPUReconstructionCUDA::InitDevice_Runtime() if (mMaster == nullptr) { cudaDeviceProp deviceProp; + int deviceMemoryClockRate{0}, deviceClockRate{0}; int32_t count, bestDevice = -1; double bestDeviceSpeed = -1, deviceSpeed; if (GPUChkErrI(cudaGetDeviceCount(&count))) { @@ -153,7 +154,9 @@ int32_t GPUReconstructionCUDA::InitDevice_Runtime() if (GetProcessingSettings().debugLevel >= 4) { GPUInfo("Obtained current memory usage for device %d", i); } - if (GPUChkErrI(cudaGetDeviceProperties(&deviceProp, i))) { + if (GPUChkErrI(cudaGetDeviceProperties(&deviceProp, i)) || + GPUChkErrI(cudaDeviceGetAttribute(&deviceMemoryClockRate, cudaDevAttrMemoryClockRate, i)) || + GPUChkErrI(cudaDeviceGetAttribute(&deviceClockRate, cudaDevAttrClockRate, i))) { continue; } if (GetProcessingSettings().debugLevel >= 4) { @@ -172,7 +175,7 @@ int32_t GPUReconstructionCUDA::InitDevice_Runtime() deviceFailure = "Insufficient GPU memory"; } - deviceSpeed = (double)deviceProp.multiProcessorCount * (double)deviceProp.clockRate * (double)deviceProp.warpSize * (double)free * (double)deviceProp.major * (double)deviceProp.major; + deviceSpeed = (double)deviceProp.multiProcessorCount * (double)deviceClockRate * (double)deviceProp.warpSize * (double)free * (double)deviceProp.major * (double)deviceProp.major; if (GetProcessingSettings().debugLevel >= 2) { GPUImportant("Device %s%2d: %s (Rev: %d.%d - Mem Avail %lu / %lu)%s %s", deviceOK ? " " : "[", i, deviceProp.name, deviceProp.major, deviceProp.minor, free, (size_t)deviceProp.totalGlobalMem, deviceOK ? " " : " ]", deviceOK ? "" : deviceFailure); } @@ -239,8 +242,8 @@ int32_t GPUReconstructionCUDA::InitDevice_Runtime() GPUInfo("\ttotalConstMem = %ld", (uint64_t)deviceProp.totalConstMem); GPUInfo("\tmajor = %d", deviceProp.major); GPUInfo("\tminor = %d", deviceProp.minor); - GPUInfo("\tclockRate = %d", deviceProp.clockRate); - GPUInfo("\tmemoryClockRate = %d", deviceProp.memoryClockRate); + GPUInfo("\tclockRate = %d", deviceClockRate); + GPUInfo("\tdeviceMemoryClockRateRate = %d", deviceMemoryClockRate); GPUInfo("\tmultiProcessorCount = %d", deviceProp.multiProcessorCount); GPUInfo("\ttextureAlignment = %ld", (uint64_t)deviceProp.textureAlignment); GPUInfo(" "); @@ -371,7 +374,7 @@ int32_t GPUReconstructionCUDA::InitDevice_Runtime() #endif mDeviceConstantMem = (GPUConstantMem*)devPtrConstantMem; - GPUInfo("CUDA Initialisation successfull (Device %d: %s (Frequency %d, Cores %d), %ld / %ld bytes host / global memory, Stack frame %d, Constant memory %ld)", mDeviceId, deviceProp.name, deviceProp.clockRate, deviceProp.multiProcessorCount, (int64_t)mHostMemorySize, (int64_t)mDeviceMemorySize, (int32_t)GPUCA_GPU_STACK_SIZE, (int64_t)gGPUConstantMemBufferSize); + GPUInfo("CUDA Initialisation successfull (Device %d: %s (Frequency %d, Cores %d), %ld / %ld bytes host / global memory, Stack frame %d, Constant memory %ld)", mDeviceId, deviceProp.name, deviceClockRate, deviceProp.multiProcessorCount, (int64_t)mHostMemorySize, (int64_t)mDeviceMemorySize, (int32_t)GPUCA_GPU_STACK_SIZE, (int64_t)gGPUConstantMemBufferSize); } else { GPUReconstructionCUDA* master = dynamic_cast(mMaster); mDeviceId = master->mDeviceId; From fe98015672be51d2c7a4437467d9a458f568f66f Mon Sep 17 00:00:00 2001 From: ALICE Action Bot Date: Fri, 7 Nov 2025 16:22:58 +0000 Subject: [PATCH 2/2] Please consider the following formatting changes --- GPU/GPUTracking/Base/cuda/GPUReconstructionCUDA.cu | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GPU/GPUTracking/Base/cuda/GPUReconstructionCUDA.cu b/GPU/GPUTracking/Base/cuda/GPUReconstructionCUDA.cu index b0a48270473d4..8e896ca513f53 100644 --- a/GPU/GPUTracking/Base/cuda/GPUReconstructionCUDA.cu +++ b/GPU/GPUTracking/Base/cuda/GPUReconstructionCUDA.cu @@ -156,7 +156,7 @@ int32_t GPUReconstructionCUDA::InitDevice_Runtime() } if (GPUChkErrI(cudaGetDeviceProperties(&deviceProp, i)) || GPUChkErrI(cudaDeviceGetAttribute(&deviceMemoryClockRate, cudaDevAttrMemoryClockRate, i)) || - GPUChkErrI(cudaDeviceGetAttribute(&deviceClockRate, cudaDevAttrClockRate, i))) { + GPUChkErrI(cudaDeviceGetAttribute(&deviceClockRate, cudaDevAttrClockRate, i))) { continue; } if (GetProcessingSettings().debugLevel >= 4) {