cms-patatrack / pixeltrack-standalone

Standalone Patatrack pixel tracking
Apache License 2.0
17 stars 35 forks source link

[stdpar] Porting radixSort and sortByPt2 Kernels to stdpar #376

Closed esseivaju closed 2 years ago

esseivaju commented 2 years ago

Changes

Issues

946a5eebe3c4829b18fdff6577d766d393105418 introduces a link error with nvc++

nvlink error   : Undefined reference to '__atomic_compare_exchange' in '/bld4/home/esseivaj/devel/pixeltrack-standalone/obj/stdpar/plugin-PixelVertexFinding/gpuVertexFinder.cu.o'
nvlink error   : Undefined reference to '__atomic_load' in '/bld4/home/esseivaj/devel/pixeltrack-standalone/obj/stdpar/plugin-PixelVertexFinding/gpuVertexFinder.cu.o'
esseivaju commented 2 years ago

The linker error occurs because nvc++ doesn't yet support std::atomic_ref<T> when T is a floating_point type on device code. I added a workaround in b3b9b53 , dispatching atomicAdd() of floating_point types to cuda atomic or std::atomic_ref depending on the compiler / execution space.