You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
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.
The text was updated successfully, but these errors were encountered:
"We take a user-provided function that gets inserted into an element loop. We intend to store the output, so we check the type of the output of that function beforehand.
Note how checking the return type of device functions from the host is inconsistently enforced by the compiler (lines 43-51). It's unclear if the compiler is silently failing with no diagnostic, or if it is actually doing the right thing."
Last year, we ran into some really nasty bugs that came from using
__host__ __device__
lambdas as q-functions inserac::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.
The text was updated successfully, but these errors were encountered: