Commit 781774c
authored
[BACKEND] Make ExternElementwise op implement ConditionallySpeculatable (#5079)
ExternElementwise ops have a `pure` attribute that marks the op as pure.
If an op is pure, it should also be speculatable. In the reduction/scan
ttgir->llvm passes, checks for speculatability are failing for
ExternElementwise ops, causing additional conditional handling to be
added.
This PR makes ExternElementwise ops implement ConditionallySpeculatable,
and mark the op as speculatable if the op is marked as pure. This
removes the conditional branches from the generated scan/reduction code.1 parent 03968e6 commit 781774c
File tree
3 files changed
+32
-1
lines changed- include/triton/Dialect/Triton/IR
- lib/Dialect/Triton/IR
- test/Conversion
3 files changed
+32
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
778 | 778 | | |
779 | 779 | | |
780 | 780 | | |
781 | | - | |
| 781 | + | |
| 782 | + | |
782 | 783 | | |
783 | 784 | | |
784 | 785 | | |
| |||
790 | 791 | | |
791 | 792 | | |
792 | 793 | | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
793 | 800 | | |
794 | 801 | | |
795 | 802 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1039 | 1039 | | |
1040 | 1040 | | |
1041 | 1041 | | |
| 1042 | + | |
| 1043 | + | |
| 1044 | + | |
| 1045 | + | |
| 1046 | + | |
| 1047 | + | |
1042 | 1048 | | |
1043 | 1049 | | |
1044 | 1050 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1855 | 1855 | | |
1856 | 1856 | | |
1857 | 1857 | | |
| 1858 | + | |
| 1859 | + | |
| 1860 | + | |
| 1861 | + | |
| 1862 | + | |
| 1863 | + | |
| 1864 | + | |
| 1865 | + | |
| 1866 | + | |
| 1867 | + | |
| 1868 | + | |
| 1869 | + | |
| 1870 | + | |
| 1871 | + | |
| 1872 | + | |
| 1873 | + | |
| 1874 | + | |
| 1875 | + | |
0 commit comments