serac icon indicating copy to clipboard operation
serac copied to clipboard

investigate if RAJA works without --extended-lambda flag

Open samuelpmishLLNL opened this issue 2 years ago • 0 comments

Last year, we ran into some really nasty bugs that came from using __host__ __device__ lambdas as q-functions in serac::Functional. Upon closer investigation, these bugs were caused by some of the caveats (specifically, #14) listed here:

https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#extended-lambda-restrictions

The scary part about these caveats is that, in many cases: "no diagnostic will be generated". This means that code may compile without any warnings or errors, but violate some of the restrictions above, resulting in erroneous (and very hard to debug) binaries.

For this reason, I was hoping to avoid using the --extended-lambda flag, to explicitly prevent users from doing this.

It's unclear to me if RAJA needs this flag though. If it does, it might still be possible to restructure some of the files in serac to try and avoid encountering those restricted parts of extended lambdas.

samuelpmishLLNL avatar Mar 28 '22 21:03 samuelpmishLLNL