cms-patatrack / pixeltrack-standalone

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

[stdpar] Update explicit memory management through CUDA API to smart pointers #368

Closed esseivaju closed 2 years ago

esseivaju commented 2 years ago

This pull request aims to update CUDACore and CUDADataFormats libraries and plugins to remove all explicit memory management through the CUDA API and replace it with the use of std::unique_ptr / std::shared_ptr which will be instrumented by nvc++ during compilation to use unified memory.

This will include changes such as:

Most notably, plugins will still use CUDA kernels but these changes will help in porting kernels to stdpar algorithms as most the framework will already be standard c++.

esseivaju commented 2 years ago

@makortel The pull request is starting to become quite large even though most changes are deletion so we should probably review it now.

As mentioned in the first comment, the core changes are to memory management; allocate memory on the heap through std::unique_ptr and let nvc++ instrument the unified memory usage. This led a lot of extra changes as a lot of classes were designed to be generic over the allocation method / pointer type, which is not needed in the stdpar version

makortel commented 2 years ago

@esseivaju Just to confirm, from your side this PR is ready to be merged, right?

esseivaju commented 2 years ago

@makortel Yes it should be ready to be merged