Commit 08af311
[MPS] Fix type promotion for
And delete some duplicating glue code by relying on the stub
After this change `torch.arange(10, device = 'mps') // torch.arange(10., device='mps')` will return tensor of floats, which is a common dtype for float + integral operation, rather than tensor of ints
Checked by `test_div2` inductor testing
Pull Request resolved: pytorch#149233
Approved by: https://github.com/atalman
ghstack dependencies: pytorch#149216torch.floor_divide (pytorch#149233)1 parent eb7bf42 commit 08af311
File tree
3 files changed
+8
-20
lines changed- aten/src/ATen/native
- mps/operations
- test/inductor
3 files changed
+8
-20
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | 17 | | |
19 | 18 | | |
20 | 19 | | |
| |||
447 | 446 | | |
448 | 447 | | |
449 | 448 | | |
450 | | - | |
451 | | - | |
452 | | - | |
453 | | - | |
454 | | - | |
455 | | - | |
456 | | - | |
457 | | - | |
458 | | - | |
459 | | - | |
460 | | - | |
461 | | - | |
462 | | - | |
| 449 | + | |
| 450 | + | |
463 | 451 | | |
464 | 452 | | |
465 | 453 | | |
| |||
538 | 526 | | |
539 | 527 | | |
540 | 528 | | |
| 529 | + | |
| 530 | + | |
541 | 531 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2749 | 2749 | | |
2750 | 2750 | | |
2751 | 2751 | | |
2752 | | - | |
2753 | | - | |
| 2752 | + | |
2754 | 2753 | | |
2755 | 2754 | | |
2756 | 2755 | | |
2757 | 2756 | | |
2758 | 2757 | | |
2759 | 2758 | | |
2760 | | - | |
2761 | | - | |
| 2759 | + | |
2762 | 2760 | | |
2763 | 2761 | | |
2764 | 2762 | | |
2765 | 2763 | | |
2766 | 2764 | | |
2767 | | - | |
2768 | | - | |
| 2765 | + | |
2769 | 2766 | | |
2770 | 2767 | | |
2771 | 2768 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
190 | 190 | | |
191 | 191 | | |
192 | 192 | | |
| 193 | + | |
193 | 194 | | |
194 | 195 | | |
195 | 196 | | |
| |||
0 commit comments