Commit 44c2c31
[NPU]: Adjust MAX_FUSED_SIZE when using fused_linear_cross_entropy (#985)
## Summary
<!--- This is a required section; please describe the main purpose of
this proposed code change. --->
Adjust MAX_FUSED_SIZE to avoid ub overflow when using
fused_linear_cross_entropy on npu.
## Testing Done
- Hardware Type: Ascend NPU A2
- [x] run `make test` to ensure correctness
- [x] run `make checkstyle` to ensure code style
- [x] run `make test-convergence` to ensure convergence
### Compare
`pytest test/transformers/test_fused_linear_cross_entropy.py`
```
Original code: 105 passed, 16 failed. All failed due to ub overflow.
Adjusted: 121 passed
```
Co-authored-by: Shao Tang <[email protected]>1 parent 6c2565b commit 44c2c31
File tree
2 files changed
+9
-2
lines changed- src/liger_kernel/ops
2 files changed
+9
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
289 | 289 | | |
290 | 290 | | |
291 | 291 | | |
292 | | - | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
293 | 299 | | |
294 | 300 | | |
295 | 301 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
13 | | - | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
0 commit comments