Commit 7323bea
Harden rocmlirMIGraphXAttentionCreate input contract
The C API helper used to silently accept null Q/K/V (producing
"missing operand" diagnostics on the parsed op), null
preSoftmaxElemWiseInputs with count > 0 (NULL deref), and negative
splitKV / slidingWindowSize (silently dropped instead of attached).
Add asserts at the top of the helper for the documented contract -
the header doc already says inputs are required and that splitKV is
"0 or 1 = omit", so this just enforces what's already promised.
Co-authored-by: Cursor <cursoragent@cursor.com>1 parent 3a70f7c commit 7323bea
1 file changed
Lines changed: 15 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
170 | 170 | | |
171 | 171 | | |
172 | 172 | | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
173 | 188 | | |
174 | 189 | | |
175 | 190 | | |
| |||
0 commit comments