@@ -35,9 +35,9 @@ class GPUReconstructionCPUBackend : public GPUReconstructionProcessing
3535 protected:
3636 GPUReconstructionCPUBackend (const GPUSettingsDeviceBackend& cfg) : GPUReconstructionProcessing(cfg) {}
3737 template <class T , int32_t I = 0 , typename ... Args>
38- int32_t runKernelBackend (const gpu_reconstruction_kernels::krnlSetupArgs<T, I, Args...>& args);
38+ void runKernelBackend (const gpu_reconstruction_kernels::krnlSetupArgs<T, I, Args...>& args);
3939 template <class T , int32_t I = 0 , typename ... Args>
40- int32_t runKernelBackendInternal (const gpu_reconstruction_kernels::krnlSetupTime& _xyz, const Args&... args);
40+ void runKernelBackendInternal (const gpu_reconstruction_kernels::krnlSetupTime& _xyz, const Args&... args);
4141 template <class T , int32_t I>
4242 gpu_reconstruction_kernels::krnlProperties getKernelPropertiesBackend ();
4343};
@@ -53,7 +53,7 @@ class GPUReconstructionCPU : public GPUReconstructionKernels<GPUReconstructionCP
5353 static constexpr krnlEvent krnlEventNone = krnlEvent{nullptr , nullptr , 0 };
5454
5555 template <class S , int32_t I = 0 , typename ... Args>
56- int32_t runKernel (krnlSetup&& setup, Args&&... args);
56+ void runKernel (krnlSetup&& setup, Args&&... args);
5757 template <class S , int32_t I = 0 >
5858 const gpu_reconstruction_kernels::krnlProperties getKernelProperties ()
5959 {
@@ -77,14 +77,14 @@ class GPUReconstructionCPU : public GPUReconstructionKernels<GPUReconstructionCP
7777
7878 GPUReconstructionCPU (const GPUSettingsDeviceBackend& cfg) : GPUReconstructionKernels(cfg) {}
7979
80- #define GPUCA_KRNL (x_class, attributes, x_arguments, x_forward, x_types ) \
81- inline int32_t runKernelImplWrapper (gpu_reconstruction_kernels::classArgument<GPUCA_M_KRNL_TEMPLATE(x_class)>, bool cpuFallback, double& timer, krnlSetup&& setup GPUCA_M_STRIP(x_arguments)) \
82- { \
83- if (cpuFallback) { \
84- return GPUReconstructionCPU::runKernelImpl (krnlSetupArgs<GPUCA_M_KRNL_TEMPLATE (x_class) GPUCA_M_STRIP (x_types)>(setup.x , setup.y , setup.z , timer GPUCA_M_STRIP (x_forward))); \
85- } else { \
86- return runKernelImpl (krnlSetupArgs<GPUCA_M_KRNL_TEMPLATE (x_class) GPUCA_M_STRIP (x_types)>(setup.x , setup.y , setup.z , timer GPUCA_M_STRIP (x_forward))); \
87- } \
80+ #define GPUCA_KRNL (x_class, attributes, x_arguments, x_forward, x_types ) \
81+ inline void runKernelImplWrapper (gpu_reconstruction_kernels::classArgument<GPUCA_M_KRNL_TEMPLATE(x_class)>, bool cpuFallback, double& timer, krnlSetup&& setup GPUCA_M_STRIP(x_arguments)) \
82+ { \
83+ if (cpuFallback) { \
84+ GPUReconstructionCPU::runKernelImpl (krnlSetupArgs<GPUCA_M_KRNL_TEMPLATE (x_class) GPUCA_M_STRIP (x_types)>(setup.x , setup.y , setup.z , timer GPUCA_M_STRIP (x_forward))); \
85+ } else { \
86+ runKernelImpl (krnlSetupArgs<GPUCA_M_KRNL_TEMPLATE (x_class) GPUCA_M_STRIP (x_types)>(setup.x , setup.y , setup.z , timer GPUCA_M_STRIP (x_forward))); \
87+ } \
8888 }
8989#include " GPUReconstructionKernelList.h"
9090#undef GPUCA_KRNL
@@ -131,7 +131,7 @@ class GPUReconstructionCPU : public GPUReconstructionKernels<GPUReconstructionCP
131131};
132132
133133template <class S , int32_t I, typename ... Args>
134- inline int32_t GPUReconstructionCPU::runKernel (krnlSetup&& setup, Args&&... args)
134+ inline void GPUReconstructionCPU::runKernel (krnlSetup&& setup, Args&&... args)
135135{
136136 HighResTimer* t = nullptr ;
137137 GPUCA_RECO_STEP myStep = S::GetRecoStep () == GPUCA_RECO_STEP::NoRecoStep ? setup.x .step : S::GetRecoStep ();
@@ -164,7 +164,7 @@ inline int32_t GPUReconstructionCPU::runKernel(krnlSetup&& setup, Args&&... args
164164 GPUInfo (" Running kernel %s (Stream %d, Range %d/%d, Grid %d/%d) on %s" , GetKernelName<S, I>(), stream, setup.y .start , setup.y .num , nBlocks, nThreads, cpuFallback == 2 ? " CPU (forced)" : cpuFallback ? " CPU (fallback)" : mDeviceName .c_str ());
165165 }
166166 if (nThreads == 0 || nBlocks == 0 ) {
167- return 0 ;
167+ return ;
168168 }
169169 if (mProcessingSettings .debugLevel >= 1 ) {
170170 t = &getKernelTimer<S, I>(myStep, !IsGPU () || cpuFallback ? getHostThreadIndex () : stream);
@@ -173,7 +173,7 @@ inline int32_t GPUReconstructionCPU::runKernel(krnlSetup&& setup, Args&&... args
173173 }
174174 }
175175 double deviceTimerTime = 0 .;
176- int32_t retVal = runKernelImplWrapper (gpu_reconstruction_kernels::classArgument<S, I>(), cpuFallback, deviceTimerTime, std::forward<krnlSetup&&>(setup), std::forward<Args>(args)...);
176+ runKernelImplWrapper (gpu_reconstruction_kernels::classArgument<S, I>(), cpuFallback, deviceTimerTime, std::forward<krnlSetup&&>(setup), std::forward<Args>(args)...);
177177 if (GPUDebug (GetKernelName<S, I>(), stream, mProcessingSettings .serializeGPU & 1 )) {
178178 throw std::runtime_error (" kernel failure" );
179179 }
@@ -192,7 +192,6 @@ inline int32_t GPUReconstructionCPU::runKernel(krnlSetup&& setup, Args&&... args
192192 throw std::runtime_error (" kernel error code" );
193193 }
194194 }
195- return retVal;
196195}
197196
198197} // namespace o2::gpu
0 commit comments