Commit 0d1b595
committed
_aten_to_core: fix arange lowering — use si32 only for integer operands
Float operands (e.g. arange(0.5, 5.0, 0.5)) must not be cast to si32 as
that truncates the values. Only apply the integer-path optimisation when
start has an integer element type; fall back to target_type for float
operands where a dynamic shape is correct anyway.1 parent be19b31 commit 0d1b595
1 file changed
Lines changed: 9 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
644 | 644 | | |
645 | 645 | | |
646 | 646 | | |
647 | | - | |
648 | | - | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
649 | 651 | | |
650 | 652 | | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
651 | 656 | | |
652 | 657 | | |
653 | 658 | | |
654 | 659 | | |
655 | | - | |
656 | | - | |
| 660 | + | |
| 661 | + | |
657 | 662 | | |
658 | 663 | | |
659 | 664 | | |
| |||
0 commit comments