@@ -42,7 +42,6 @@ inline void GPUReconstructionCUDABackend::runKernelBackendInternal<GPUMemClean16
4242template <class T , int I, typename ... Args>
4343inline void GPUReconstructionCUDABackend::runKernelBackendInternal (const krnlSetupTime& _xyz, const Args&... args)
4444{
45- #ifndef __HIPCC__ // CUDA version
4645 GPUDebugTiming timer (mProcessingSettings .deviceTimers && mProcessingSettings .debugLevel > 0 , (deviceEvent*)mDebugEvents , mInternals ->Streams , _xyz, this );
4746#if !defined(GPUCA_KERNEL_COMPILE_MODE) || GPUCA_KERNEL_COMPILE_MODE != 1
4847 if (!mProcessingSettings .rtc .enable ) {
@@ -67,17 +66,6 @@ inline void GPUReconstructionCUDABackend::runKernelBackendInternal(const krnlSet
6766 GPUFailedMsg (cuLaunchKernel (*mInternals ->kernelFunctions [getRTCkernelNum<true , T, I>()], x.nBlocks , 1 , 1 , x.nThreads , 1 , 1 , 0 , mInternals ->Streams [x.stream ], (void **)pArgs, nullptr ));
6867 }
6968 }
70- #else // HIP version
71- if (mProcessingSettings .deviceTimers && mProcessingSettings .debugLevel > 0 ) {
72- backendInternal<T, I>::runKernelBackendMacro (_xyz, this , mDebugEvents ->DebugStart .getEventList <hipEvent_t>(), mDebugEvents ->DebugStop .getEventList <hipEvent_t>(), args...);
73- GPUFailedMsg (hipEventSynchronize (mDebugEvents ->DebugStop .get <hipEvent_t>()));
74- float v;
75- GPUFailedMsg (hipEventElapsedTime (&v, mDebugEvents ->DebugStart .get <hipEvent_t>(), mDebugEvents ->DebugStop .get <hipEvent_t>()));
76- _xyz.t = v * 1 .e -3f ;
77- } else {
78- backendInternal<T, I>::runKernelBackendMacro (_xyz, this , nullptr , nullptr , args...);
79- }
80- #endif
8169}
8270
8371template <class T , int I, typename ... Args>
@@ -126,20 +114,10 @@ int GPUReconstructionCUDABackend::runKernelBackend(const krnlSetupArgs<T, I, Arg
126114#else // HIP version
127115#undef GPUCA_KRNL_CUSTOM
128116#define GPUCA_KRNL_CUSTOM (args ) GPUCA_M_STRIP (args)
129- #undef GPUCA_KRNL_BACKEND_XARGS
130- #define GPUCA_KRNL_BACKEND_XARGS hipEvent_t *debugStartEvent, hipEvent_t *debugStopEvent,
131- #define GPUCA_KRNL_CALL_single (x_class, ...) \
132- if (debugStartEvent == nullptr ) { \
133- hipLaunchKernelGGL (HIP_KERNEL_NAME (GPUCA_M_CAT (krnl_, GPUCA_M_KRNL_NAME (x_class))), dim3 (x.nBlocks ), dim3 (x.nThreads ), 0 , me->mInternals ->Streams [x.stream ], GPUCA_CONSMEM_CALL y.start , args...); \
134- } else { \
135- hipExtLaunchKernelGGL (HIP_KERNEL_NAME (GPUCA_M_CAT (krnl_, GPUCA_M_KRNL_NAME (x_class))), dim3 (x.nBlocks ), dim3 (x.nThreads ), 0 , me->mInternals ->Streams [x.stream ], *debugStartEvent, *debugStopEvent, 0 , GPUCA_CONSMEM_CALL y.start , args...); \
136- }
137- #define GPUCA_KRNL_CALL_multi (x_class, ...) \
138- if (debugStartEvent == nullptr ) { \
139- hipLaunchKernelGGL (HIP_KERNEL_NAME (GPUCA_M_CAT3 (krnl_, GPUCA_M_KRNL_NAME (x_class), _multi)), dim3 (x.nBlocks ), dim3 (x.nThreads ), 0 , me->mInternals ->Streams [x.stream ], GPUCA_CONSMEM_CALL y.start , y.num , args...); \
140- } else { \
141- hipExtLaunchKernelGGL (HIP_KERNEL_NAME (GPUCA_M_CAT3 (krnl_, GPUCA_M_KRNL_NAME (x_class), _multi)), dim3 (x.nBlocks ), dim3 (x.nThreads ), 0 , me->mInternals ->Streams [x.stream ], *debugStartEvent, *debugStopEvent, 0 , GPUCA_CONSMEM_CALL y.start , y.num , args...); \
142- }
117+ #define GPUCA_KRNL_CALL_single (x_class, ...) \
118+ hipLaunchKernelGGL (HIP_KERNEL_NAME (GPUCA_M_CAT (krnl_, GPUCA_M_KRNL_NAME (x_class))), dim3(x.nBlocks), dim3(x.nThreads), 0, me->mInternals->Streams[x.stream], GPUCA_CONSMEM_CALL y.start, args...);
119+ #define GPUCA_KRNL_CALL_multi (x_class, ...) \
120+ hipLaunchKernelGGL (HIP_KERNEL_NAME (GPUCA_M_CAT3 (krnl_, GPUCA_M_KRNL_NAME (x_class), _multi)), dim3(x.nBlocks), dim3(x.nThreads), 0, me->mInternals->Streams[x.stream], GPUCA_CONSMEM_CALL y.start, y.num, args...);
143121#endif // __HIPCC__
144122#endif
145123
0 commit comments