Commit a5216d2
committed
fix(cudnn): implement cuDNN 9 error codes, replace todo!() with proper mapping
cuDNN 9 restructured cudnnStatus_t into a hierarchical numeric system
(2xxx=BAD_PARAM, 3xxx=NOT_SUPPORTED, 4xxx=INTERNAL_ERROR, 5xxx=EXECUTION_FAILED)
and removed several codes present in cuDNN 8.
Changes:
- Add four new CudnnError variants behind #[cfg(cudnn9)]:
SublibraryVersionMismatch, SerializationVersionMismatch, Deprecated,
SublibraryLoadingFailed
- Replace the _ => todo!() wildcard in IntoResult::into_result() with a
category-based fallback that maps cuDNN 9 sub-codes (e.g. BAD_PARAM_NULL_POINTER)
to their parent category variant using integer division, eliminating the
runtime panic entirely
- Add wire both new variants in into_raw() for round-trip correctness
Verified against cudnn_graph.h from cuDNN 9.20 (anaconda distribution).
The cudnn crate itself compiles cleanly; only pre-existing cust bindgen
errors prevent a full cargo check -p cudnn from succeeding.
Made-with: Cursor1 parent e91b9ce commit a5216d2
1 file changed
+49
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
55 | 67 | | |
56 | 68 | | |
57 | 69 | | |
| |||
78 | 90 | | |
79 | 91 | | |
80 | 92 | | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
81 | 101 | | |
82 | 102 | | |
83 | 103 | | |
| |||
124 | 144 | | |
125 | 145 | | |
126 | 146 | | |
127 | | - | |
128 | | - | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
129 | 174 | | |
130 | 175 | | |
131 | | - | |
| 176 | + | |
0 commit comments