Commit 371fa42
authored
[FIX]: cuda.core: simplify
* cuda.core: prefer binding names for runtime errors
Use the generated runtime error enum as the name source for known CUDA Runtime errors so error messages remain stable when the runtime name table differs from the installed bindings.
Made-with: Cursor
* cuda.core: simplify runtime error naming path
`_check_error()` only routes `runtime.cudaError_t` instances into
`_check_runtime_error()`, so consulting `cudaGetErrorName()` and keeping a
fallback for unknown values does not improve the normal `cuda.core` path. The
Windows hybrid cudart issue is that the runtime name table can lag the
generated enum table, so using `error.name` directly is both simpler and a
better match for the values the code already has.
With the runtime path now relying on enum members, the runtime-side tests no
longer need to account for `UNEXPECTED ERROR CODE` in this loop or keep a
separate monkeypatch test for avoiding the runtime name lookup.
Made-with: Cursor_check_runtime_error logic (#2003)1 parent 6e5fb12 commit 371fa42
2 files changed
Lines changed: 4 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
171 | 171 | | |
172 | 172 | | |
173 | 173 | | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
178 | 177 | | |
179 | 178 | | |
180 | 179 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
52 | 51 | | |
53 | 52 | | |
54 | 53 | | |
55 | 54 | | |
56 | 55 | | |
57 | 56 | | |
58 | 57 | | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
| 58 | + | |
67 | 59 | | |
68 | 60 | | |
69 | 61 | | |
| |||
0 commit comments