Commit be986be
Address review feedback: split validations with error messages
- tensor.cc: Split combined check into separate num_dims and channel_dim
validations with YNN_LOG_ERROR messages. Replace asserts with proper
error returns for channelwise_zero_point. Remove assert(data) per
reviewer (XNNPACK limitation, not YNNPACK).
- reduce.cc: Change define_reduce to return ynn_status. Add output rank
validation after min_max dimension push. Keep rank >= 1 as assert
(internal invariant). Propagate error via YNN_RETURN_IF_ERROR at call
site.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent ce2d95a commit be986be
2 files changed
Lines changed: 28 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
240 | 241 | | |
241 | 242 | | |
242 | 243 | | |
243 | | - | |
244 | | - | |
245 | | - | |
| 244 | + | |
| 245 | + | |
246 | 246 | | |
247 | 247 | | |
248 | 248 | | |
| |||
281 | 281 | | |
282 | 282 | | |
283 | 283 | | |
284 | | - | |
285 | | - | |
286 | | - | |
287 | | - | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
288 | 288 | | |
289 | 289 | | |
290 | 290 | | |
| |||
348 | 348 | | |
349 | 349 | | |
350 | 350 | | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
351 | 357 | | |
352 | 358 | | |
353 | 359 | | |
| |||
432 | 438 | | |
433 | 439 | | |
434 | 440 | | |
| 441 | + | |
435 | 442 | | |
436 | 443 | | |
437 | 444 | | |
| |||
476 | 483 | | |
477 | 484 | | |
478 | 485 | | |
479 | | - | |
480 | | - | |
| 486 | + | |
| 487 | + | |
481 | 488 | | |
482 | 489 | | |
483 | 490 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
127 | 135 | | |
128 | 136 | | |
129 | 137 | | |
| |||
0 commit comments