ROCm / HIP-Examples

Examples for HIP
194 stars 86 forks source link

VectorAdd example doesn't work on build type release using Cmake #32

Open NicoDic98 opened 2 years ago

NicoDic98 commented 2 years ago

When trying out the Code from the VectorAdd example inside a Cmake project, the execution fails, when using the release flag as build type. This is due to the NDEBUG flag being set.

This can be circumvented by not using the defined HIP_ASSERT directly, but by storing the return values and then putting those inside the HIP_ASSERT . I'm not sure why this is exactly the case, because I would have expected that the code inside an ASSERT gets at least executed when NDEBUG is set.