Skip to content

Conversation

@hlinsen
Copy link
Contributor

@hlinsen hlinsen commented Jul 29, 2025

Raft defines RAFT_CHECK_CUDA depending on if we run in release/Debug mode https://github.com/rapidsai/raft/blob/branch-25.06/cpp/include/raft/util/cuda_rt_essentials.hpp#L78-L82.
In cuopt we have a special mode "assert" that undefines NDEBUG to run with optimizations but still enable runtime checks. https://github.com/rapidsai/raft/blob/branch-25.06/cpp/include/raft/util/cuda_rt_essentials.hpp#L78-L82

The first version of RAFT_CHECK_CUDA uses the stream argument therefore in debug mode and assert mode we should catch that error. However unsetting NDEBUG in our header results in NDEBUG being undefined in cuopt but still defined for our dependencies. So we were calling the wrong implementation of RAFT_CUDA_CHECK. To undefine NDEBUG in both cuopt and our dependencies we have to do it through cmake.
This catches the compile error.

Closes: #247

@hlinsen hlinsen requested review from a team as code owners July 29, 2025 21:53
@hlinsen hlinsen added bug Something isn't working non-breaking Introduces a non-breaking change labels Jul 29, 2025
@aliceb-nv
Copy link
Contributor

I pushed a fix for the failing cpp tests

@hlinsen
Copy link
Contributor Author

hlinsen commented Jul 30, 2025

I pushed a fix for the failing cpp tests

Thanks Alice!

@rgsl888prabhu
Copy link
Collaborator

@akifcorduk @aliceb-nv may I get your review on this PR ?

Copy link
Contributor

@aliceb-nv aliceb-nv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very good catch with this PR Hugo, thanks! That will help us be much more confident about our robustness :)

@rgsl888prabhu
Copy link
Collaborator

/merge

@rapids-bot rapids-bot bot merged commit de62f08 into NVIDIA:branch-25.08 Jul 30, 2025
73 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working non-breaking Introduces a non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] File might not compile with RAFT_CUDA_CHECK() enabled

3 participants