Commit de62f08
authored
Unset NDEBUG in cmake in assert mode (#248)
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
Authors:
- Hugo Linsenmaier (https://github.com/hlinsen)
- Alice Boucher (https://github.com/aliceb-nv)
Approvers:
- Ramakrishnap (https://github.com/rgsl888prabhu)
- Alice Boucher (https://github.com/aliceb-nv)
URL: #2481 parent 8dc24a7 commit de62f08
File tree
6 files changed
+19
-4
lines changed- cpp
- src
- mip
- diversity
- solution
- utilities
- tests/mip
6 files changed
+19
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
137 | 143 | | |
138 | 144 | | |
139 | 145 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
100 | | - | |
| 100 | + | |
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
541 | 541 | | |
542 | 542 | | |
543 | 543 | | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
544 | 549 | | |
545 | 550 | | |
546 | 551 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
27 | 26 | | |
28 | 27 | | |
29 | 28 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| 74 | + | |
74 | 75 | | |
75 | 76 | | |
76 | 77 | | |
| |||
88 | 89 | | |
89 | 90 | | |
90 | 91 | | |
| 92 | + | |
91 | 93 | | |
92 | 94 | | |
93 | 95 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
154 | 154 | | |
155 | 155 | | |
156 | 156 | | |
| 157 | + | |
157 | 158 | | |
158 | 159 | | |
159 | 160 | | |
| |||
171 | 172 | | |
172 | 173 | | |
173 | 174 | | |
174 | | - | |
| 175 | + | |
| 176 | + | |
175 | 177 | | |
176 | 178 | | |
177 | 179 | | |
| |||
198 | 200 | | |
199 | 201 | | |
200 | 202 | | |
201 | | - | |
| 203 | + | |
| 204 | + | |
202 | 205 | | |
203 | 206 | | |
204 | 207 | | |
| |||
0 commit comments