-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
improve ALPAKA_ASSERT_OFFLOAD
#2001
Comments
psychocoderHPC
added a commit
to psychocoderHPC/alpaka
that referenced
this issue
Dec 1, 2023
fix alpaka-group#2186 fix alpaka-group#2001 Provide a device side assert `ALPAKA_ASSERT_ACC` which can be disabled by defining `ALPAKA_DISABLE_ASSERT_ACC` in the C++ code or by the CMake option `alpaka_ASSERT_ACC_ENABLE`
psychocoderHPC
added a commit
to psychocoderHPC/alpaka
that referenced
this issue
Dec 19, 2023
fix alpaka-group#2186 fix alpaka-group#2001 Provide a device side assert `ALPAKA_ASSERT_ACC` which can be disabled by defining `ALPAKA_DISABLE_ASSERT_ACC` the C++ code or by the CMake option `alpaka_ASSERT_ACC_ENABLE`. For CPU devices or host side code the assert behaves like`ALPAKA_ASSERT`. Co-authored-by: Andrea Bocci <[email protected]>
psychocoderHPC
added a commit
to psychocoderHPC/alpaka
that referenced
this issue
Dec 20, 2023
fix alpaka-group#2186 fix alpaka-group#2001 Provide a device side assert `ALPAKA_ASSERT_ACC` which can be disabled by defining `ALPAKA_DISABLE_ASSERT_ACC` the C++ code or by the CMake option `alpaka_ASSERT_ACC_ENABLE`. For CPU devices or host side code the assert behaves like`ALPAKA_ASSERT`. Co-authored-by: Andrea Bocci <[email protected]>
bernhardmgruber
pushed a commit
that referenced
this issue
Dec 20, 2023
fix #2186 fix #2001 Provide a device side assert `ALPAKA_ASSERT_ACC` which can be disabled by defining `ALPAKA_DISABLE_ASSERT_ACC` the C++ code or by the CMake option `alpaka_ASSERT_ACC_ENABLE`. For CPU devices or host side code the assert behaves like`ALPAKA_ASSERT`. Co-authored-by: Andrea Bocci <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It's not clear to me what the meaning of
ALPAKA_ASSERT_OFFLOAD
is :-)The current definition is
So, if I interpret it correctly:
if
ALPAKA_DEBUG_OFFLOAD_ASSUME_HOST
is defined,ALPAKA_ASSERT_OFFLOAD
expands toALPAKA_ASSERT
, which expands toassert
, which expands to a runtime check only ifNDEBUG
is not defined;if
ALPAKA_DEBUG_OFFLOAD_ASSUME_HOST
is not defined:ALPAKA_ASSERT_OFFLOAD
always expands to a no-op;ALPAKA_ASSERT_OFFLOAD
always expands to a no-op;ALPAKA_ASSERT_OFFLOAD
expands to a runtime check ifNDEBUG
is not defined;ALPAKA_ASSERT_OFFLOAD
always expands toassert
, so it expands to a runtime check ifNDEBUG
is not defined.It looks like the behaviour is different for the different backends, which seems counter intuitive.
So... what is the expected behaviour ?
NDEBUG
is not definedNDEBUG
is not definedThe text was updated successfully, but these errors were encountered: