RAJA icon indicating copy to clipboard operation
RAJA copied to clipboard

Supporting ListSegments in RAJA Teams

Open artv3 opened this issue 3 years ago • 2 comments

Currently RAJA::ListSegments are not supported within RAJA Teams. This is on account that a ListSegment is captured within the kernel execution space by value triggering cuda/mallocs and free (on the device). See error below:

terminate called after throwing an instance of 'std::runtime_error'
  what():  campCudaErrchk(cudaFree(p)) unspecified launch failure /usr/WS1/vargas45/RAJA_DEV/RAJA/tpl/camp/include/camp/resource/cuda.hpp:226
Aborted

A possible solution could be to create reference to the internal pointer of ListSegment and store it in a struct with the beginning/end

artv3 avatar Apr 28 '22 23:04 artv3

We already have a wrapper for iterators, https://github.com/LLNL/RAJA/blob/develop/include/RAJA/util/Span.hpp.

MrBurmark avatar May 24 '22 17:05 MrBurmark

We already have a wrapper for iterators, https://github.com/LLNL/RAJA/blob/develop/include/RAJA/util/Span.hpp.

Nice, good to know. That would work as well.

artv3 avatar May 24 '22 17:05 artv3

done in https://github.com/LLNL/RAJA/pull/1257

artv3 avatar Nov 15 '22 16:11 artv3