Commit b2c58ef
authored
[TIR] Fix Data Type Mismatch (int64 vs int32) in T.match_buffer when Working with Scalar Buffers in TIR (#18466)
This PR is trying to fix issues
#17392.
The issue with `T.match_buffer` for scalar elements that was causing the
int64 vs. int32 type mismatch error in TVM.
Fix:
- Safe Type Coercion: Allows automatic casting between integer types
when they have the same number of lanes
- Type Safety Preserved: Still rejects incompatible type combinations
(int vs float, different lane counts)
---------
Co-authored-by: cchung100m <[email protected]>1 parent 12f3bb0 commit b2c58ef
File tree
2 files changed
+40
-2
lines changed- src/tir/transforms
- tests/python/tir-transform
2 files changed
+40
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
220 | 220 | | |
221 | 221 | | |
222 | 222 | | |
223 | | - | |
224 | | - | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
225 | 232 | | |
226 | 233 | | |
227 | 234 | | |
| |||
Lines changed: 31 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
532 | 532 | | |
533 | 533 | | |
534 | 534 | | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
535 | 566 | | |
536 | 567 | | |
0 commit comments