Skip to content

Commit

Permalink
remove assertion workaround
Browse files Browse the repository at this point in the history
This causes some kernels on ROCm debug builds to fail
  • Loading branch information
upsj committed Aug 25, 2024
1 parent 9929854 commit eb97b49
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions include/ginkgo/core/base/types.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,30 +51,8 @@
#endif


#if (defined(__CUDA_ARCH__) && defined(__APPLE__)) || \
defined(__HIP_DEVICE_COMPILE__)

#ifdef NDEBUG
#define GKO_ASSERT(condition) ((void)0)
#else // NDEBUG
// Poor man's assertions on GPUs for MACs. They won't terminate the program
// but will at least print something on the screen
#define GKO_ASSERT(condition) \
((condition) \
? ((void)0) \
: ((void)printf("%s: %d: %s: Assertion `" #condition "' failed\n", \
__FILE__, __LINE__, __func__)))
#endif // NDEBUG

#else // (defined(__CUDA_ARCH__) && defined(__APPLE__)) ||
// defined(__HIP_DEVICE_COMPILE__)

// Handle assertions normally on other systems
#define GKO_ASSERT(condition) assert(condition)

#endif // (defined(__CUDA_ARCH__) && defined(__APPLE__)) ||
// defined(__HIP_DEVICE_COMPILE__)


// Handle deprecated notices correctly on different systems
// clang-format off
Expand Down

0 comments on commit eb97b49

Please sign in to comment.