Skip to content

Commit c5a659b

Browse files
committed
GPU: Fix typo in variable name, fix a comment, fix a debug message
1 parent 24c97f2 commit c5a659b

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

GPU/GPUTracking/Base/GPUReconstructionCPU.cxx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ inline void GPUReconstructionCPUBackend::runKernelBackendInternal(const krnlSetu
6868
int32_t nThreads = getNKernelHostThreads(false);
6969
if (nThreads > 1) {
7070
if (mProcessingSettings.debugLevel >= 5) {
71-
printf("Running %d Threads\n", nThreads);
71+
printf("Running %d Threads\n", mThreading->activeThreads->max_concurrency());
7272
}
7373
tbb::this_task_arena::isolate([&] {
7474
mThreading->activeThreads->execute([&] {
@@ -91,10 +91,10 @@ inline void GPUReconstructionCPUBackend::runKernelBackendInternal(const krnlSetu
9191
template <>
9292
inline void GPUReconstructionCPUBackend::runKernelBackendInternal<GPUMemClean16, 0>(const krnlSetupTime& _xyz, void* const& ptr, uint64_t const& size)
9393
{
94-
int32_t nnThreads = std::max<int32_t>(1, std::min<int32_t>(size / (16 * 1024 * 1024), getNKernelHostThreads(true)));
95-
if (nnThreads > 1) {
96-
tbb::parallel_for(0, nnThreads, [&](int iThread) {
97-
size_t threadSize = size / nnThreads;
94+
int32_t nThreads = std::max<int32_t>(1, std::min<int32_t>(size / (16 * 1024 * 1024), getNKernelHostThreads(true)));
95+
if (nThreads > 1) {
96+
tbb::parallel_for(0, nThreads, [&](int iThread) {
97+
size_t threadSize = size / nThreads;
9898
if (threadSize % 4096) {
9999
threadSize += 4096 - threadSize % 4096;
100100
}

GPU/GPUTracking/cmake/kernel_helpers.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ function(o2_gpu_add_kernel kernel_name kernel_files)
7676
set_property(TARGET O2_GPU_KERNELS APPEND PROPERTY O2_GPU_KERNEL_NAMES "${kernel_name}")
7777
set_property(TARGET O2_GPU_KERNELS APPEND PROPERTY O2_GPU_KERNEL_INCLUDES "${TMP_KERNEL_CLASS_FILE}")
7878
set_property(TARGET O2_GPU_KERNELS APPEND PROPERTY O2_GPU_KERNEL_FILES "${TMP_KERNEL_CLASS_FILE}.cxx")
79-
# add_custom_command OUTPUT option does not support target-dependend generator expressions, thus this workaround
8079

8180
set(O2_GPU_KERNEL_TEMPLATE_FILES "GPUConstantMem.h")
8281
if (GPUCA_BUILD_DEBUG)
@@ -102,6 +101,7 @@ function(o2_gpu_add_kernel kernel_name kernel_files)
102101
list(TRANSFORM O2_GPU_KERNEL_TEMPLATE_FILES PREPEND "#include \"")
103102
list(JOIN O2_GPU_KERNEL_TEMPLATE_FILES "\n" O2_GPU_KERNEL_TEMPLATE_FILES)
104103

104+
# add_custom_command OUTPUT option does not support target-dependend generator expressions, thus this workaround to create CUDA and HIP files
105105
string(REPLACE ", " "_" TMP_FILENAME "${kernel_name}")
106106
if(CUDA_ENABLED)
107107
set(TMP_FILENAMEA "${O2_GPU_KERNEL_WRAPPER_FOLDER}/krnl_${TMP_FILENAME}.cu")

0 commit comments

Comments
 (0)