Skip to content

Commit da1bc1f

Browse files
author
quintinwang5
authored
Rebase to triton main (#122)
* Fix nightly script * Update triton hash * change triton::gpu::{CmpI, CmpF, Select} to mlir::arith::{CmpI, CmpF, Select} * Update sed rule to co-work with new triton * Update failed todo UT due to UT change
1 parent c1938a4 commit da1bc1f

File tree

5 files changed

+139
-72
lines changed

5 files changed

+139
-72
lines changed

.github/scripts/case_update.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ sed -i '/import torch/ a\import intel_extension_for_pytorch' ${HOME}/${JOB_WORKS
1010
sed -i '/import torch/ a\import intel_extension_for_pytorch' ${HOME}/${JOB_WORKSPACE}/triton_src/python/test/unit/language/test_core.py
1111
sed -i '/def test_abs_fp8(in_dtype, device):/ a\ pytest.skip("fp8 is not supported for xpu")' ${HOME}/${JOB_WORKSPACE}/triton_src/python/test/unit/language/test_core.py
1212
sed -i 's/MmaLayout(/# &/' ${HOME}/${JOB_WORKSPACE}/triton_src/python/test/unit/language/test_core.py
13+
sed -i 's/instr_shape=\[/# &/' ${HOME}/${JOB_WORKSPACE}/triton_src/python/test/unit/language/test_core.py
1314
sed -i 's/f.name/&, device_type=device/' ${HOME}/${JOB_WORKSPACE}/triton_src/python/test/unit/language/test_core.py
1415
sed -i '/pytest.skip("float8e4nv is only supported on NVGPU with cc >= 90")/ a\ if dtype in [tl.float8e4b15, tl.float8e4b15x4, tl.float8e4nv, tl.float8e5, "float8e4b15", "tl.float8e4b15x4", "float8e4nv", "float8e5"]:\n pytest.skip("fp8 is not supported yet")' ${HOME}/${JOB_WORKSPACE}/triton_src/python/test/unit/language/test_core.py
1516
sed -i "/ptx = pgm.asm\['ptx'\]/,/^$/d" ${HOME}/${JOB_WORKSPACE}/triton_src/python/test/unit/language/test_core.py
Lines changed: 129 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -1,91 +1,157 @@
1+
test_core.py::test_constexpr_propagation
2+
test_core.py::test_enable_fp_fusion[False]
3+
test_core.py::test_enable_fp_fusion[True]
4+
test_core.py::test_locality[2-1024-128-max]
5+
test_core.py::test_locality[2-1024-128-min]
6+
test_core.py::test_locality[2-1024-128-sum]
7+
test_core.py::test_locality[2-1024-32-max]
8+
test_core.py::test_locality[2-1024-32-min]
9+
test_core.py::test_locality[2-1024-32-sum]
10+
test_core.py::test_locality[2-1024-64-max]
11+
test_core.py::test_locality[2-1024-64-min]
12+
test_core.py::test_locality[2-1024-64-sum]
13+
test_core.py::test_locality[2-2048-128-max]
14+
test_core.py::test_locality[2-2048-128-min]
15+
test_core.py::test_locality[2-2048-128-sum]
16+
test_core.py::test_locality[2-2048-32-max]
17+
test_core.py::test_locality[2-2048-32-min]
18+
test_core.py::test_locality[2-2048-32-sum]
19+
test_core.py::test_locality[2-2048-64-max]
20+
test_core.py::test_locality[2-2048-64-min]
21+
test_core.py::test_locality[2-2048-64-sum]
22+
test_core.py::test_locality[2-512-128-max]
23+
test_core.py::test_locality[2-512-128-min]
24+
test_core.py::test_locality[2-512-128-sum]
25+
test_core.py::test_locality[2-512-32-max]
26+
test_core.py::test_locality[2-512-32-min]
27+
test_core.py::test_locality[2-512-32-sum]
28+
test_core.py::test_locality[2-512-64-max]
29+
test_core.py::test_locality[2-512-64-min]
30+
test_core.py::test_locality[2-512-64-sum]
31+
test_core.py::test_locality[4-1024-128-max]
32+
test_core.py::test_locality[4-1024-128-min]
33+
test_core.py::test_locality[4-1024-128-sum]
34+
test_core.py::test_locality[4-1024-32-max]
35+
test_core.py::test_locality[4-1024-32-min]
36+
test_core.py::test_locality[4-1024-32-sum]
37+
test_core.py::test_locality[4-1024-64-max]
38+
test_core.py::test_locality[4-1024-64-min]
39+
test_core.py::test_locality[4-1024-64-sum]
40+
test_core.py::test_locality[4-2048-128-max]
41+
test_core.py::test_locality[4-2048-128-min]
42+
test_core.py::test_locality[4-2048-128-sum]
43+
test_core.py::test_locality[4-2048-32-max]
44+
test_core.py::test_locality[4-2048-32-min]
45+
test_core.py::test_locality[4-2048-32-sum]
46+
test_core.py::test_locality[4-2048-64-max]
47+
test_core.py::test_locality[4-2048-64-min]
48+
test_core.py::test_locality[4-2048-64-sum]
49+
test_core.py::test_locality[4-512-128-max]
50+
test_core.py::test_locality[4-512-128-min]
51+
test_core.py::test_locality[4-512-128-sum]
52+
test_core.py::test_locality[4-512-32-max]
53+
test_core.py::test_locality[4-512-32-min]
54+
test_core.py::test_locality[4-512-32-sum]
55+
test_core.py::test_locality[4-512-64-max]
56+
test_core.py::test_locality[4-512-64-min]
57+
test_core.py::test_locality[4-512-64-sum]
58+
test_core.py::test_math_op[float32-cos-3.0]
159
test_core.py::test_math_op[float32-exp-3.0]
260
test_core.py::test_math_op[float32-log-3.0]
3-
test_core.py::test_math_op[float32-cos-3.0]
461
test_core.py::test_math_op[float32-sin-3.0]
62+
test_core.py::test_math_op[float64-cos-3.0]
563
test_core.py::test_math_op[float64-exp-3.0]
664
test_core.py::test_math_op[float64-log-3.0]
7-
test_core.py::test_math_op[float64-cos-3.0]
865
test_core.py::test_math_op[float64-sin-3.0]
66+
test_core.py::test_ptx_cast[float16]
67+
test_core.py::test_ptx_cast[int16]
68+
test_core.py::test_reduce[1-argmax-float32-shape129-0]
69+
test_core.py::test_reduce[1-argmax-float32-shape130-1]
70+
test_core.py::test_reduce[1-argmax-float32-shape132-0]
71+
test_core.py::test_reduce[1-argmax-float32-shape133-1]
72+
test_core.py::test_reduce[1-argmax-float32-shape135-0]
73+
test_core.py::test_reduce[1-argmax-float32-shape136-1]
74+
test_core.py::test_reduce[1-argmin-float32-shape120-0]
75+
test_core.py::test_reduce[1-argmin-float32-shape121-1]
76+
test_core.py::test_reduce[1-argmin-float32-shape123-0]
77+
test_core.py::test_reduce[1-argmin-float32-shape124-1]
78+
test_core.py::test_reduce[1-argmin-float32-shape126-0]
79+
test_core.py::test_reduce[1-argmin-float32-shape127-1]
80+
test_core.py::test_reduce[1-max-float32-shape102-0]
981
test_core.py::test_reduce[1-max-float32-shape103-1]
10-
test_core.py::test_scan2d[get_first_element-float32-shape71-0-4]
82+
test_core.py::test_reduce[1-max-float32-shape105-0]
83+
test_core.py::test_reduce[1-max-float32-shape106-1]
84+
test_core.py::test_reduce[1-max-float32-shape108-0]
85+
test_core.py::test_reduce[1-max-float32-shape109-1]
86+
test_core.py::test_reduce[1-min-float32-shape100-1]
87+
test_core.py::test_reduce[1-min-float32-shape93-0]
88+
test_core.py::test_reduce[1-min-float32-shape94-1]
89+
test_core.py::test_reduce[1-min-float32-shape96-0]
90+
test_core.py::test_reduce[1-min-float32-shape97-1]
91+
test_core.py::test_reduce[1-min-float32-shape99-0]
92+
test_core.py::test_reduce[1-sum-float32-shape111-0]
93+
test_core.py::test_reduce[1-sum-float32-shape112-1]
94+
test_core.py::test_reduce[1-sum-float32-shape114-0]
95+
test_core.py::test_reduce[1-sum-float32-shape115-1]
96+
test_core.py::test_reduce[1-sum-float32-shape117-0]
97+
test_core.py::test_reduce[1-sum-float32-shape118-1]
98+
test_core.py::test_scan2d[get_first_element-float32-shape128-1-16]
99+
test_core.py::test_scan2d[get_first_element-float32-shape131-1-16]
100+
test_core.py::test_scan2d[get_first_element-float32-shape134-1-16]
11101
test_core.py::test_scan2d[get_first_element-float32-shape137-1-16]
12-
test_core.py::test_scan2d[get_first_element-float32-shape53-1-4]
13-
test_core.py::test_scan2d[get_first_element-int32-shape104-1-16]
14-
test_core.py::test_scan2d[get_first_element-int32-shape5-1-4]
15-
test_core.py::test_reduce[1-argmin-float32-shape123-0]
16-
test_core.py::test_scan2d[get_first_element-float32-shape74-0-4]
17-
test_core.py::test_scan2d[get_first_element-int32-shape8-1-4]
18-
test_core.py::test_scan2d[get_first_element-int32-shape107-0-16]
19-
test_core.py::test_scan2d[get_first_element-int32-shape11-1-4]
20-
test_core.py::test_scan2d[get_first_element-float32-shape77-0-4]
21-
test_core.py::test_scan2d[get_first_element-int32-shape110-0-16]
22102
test_core.py::test_scan2d[get_first_element-float32-shape143-1-16]
23-
test_core.py::test_scan2d[get_first_element-int32-shape113-0-16]
24103
test_core.py::test_scan2d[get_first_element-float32-shape146-1-16]
25-
test_core.py::test_scan2d[get_first_element-int32-shape116-0-16]
26104
test_core.py::test_scan2d[get_first_element-float32-shape149-0-16]
27-
test_core.py::test_scan2d[get_first_element-int32-shape119-0-16]
28105
test_core.py::test_scan2d[get_first_element-float32-shape152-0-16]
29-
test_core.py::test_scan2d[get_first_element-int32-shape17-1-4]
30106
test_core.py::test_scan2d[get_first_element-float32-shape155-0-16]
31-
test_core.py::test_scan2d[get_first_element-int32-shape20-1-4]
32107
test_core.py::test_scan2d[get_first_element-float32-shape158-0-16]
33108
test_core.py::test_scan2d[get_first_element-float32-shape161-0-16]
109+
test_core.py::test_scan2d[get_first_element-float32-shape164-0-16]
110+
test_core.py::test_scan2d[get_first_element-float32-shape44-1-4]
111+
test_core.py::test_scan2d[get_first_element-float32-shape47-1-4]
112+
test_core.py::test_scan2d[get_first_element-float32-shape50-1-4]
113+
test_core.py::test_scan2d[get_first_element-float32-shape53-1-4]
34114
test_core.py::test_scan2d[get_first_element-float32-shape59-1-4]
35115
test_core.py::test_scan2d[get_first_element-float32-shape62-1-4]
36116
test_core.py::test_scan2d[get_first_element-float32-shape65-0-4]
37117
test_core.py::test_scan2d[get_first_element-float32-shape68-0-4]
118+
test_core.py::test_scan2d[get_first_element-float32-shape71-0-4]
119+
test_core.py::test_scan2d[get_first_element-float32-shape74-0-4]
120+
test_core.py::test_scan2d[get_first_element-float32-shape77-0-4]
38121
test_core.py::test_scan2d[get_first_element-float32-shape80-0-4]
122+
test_core.py::test_scan2d[get_first_element-int32-shape101-1-16]
123+
test_core.py::test_scan2d[get_first_element-int32-shape104-1-16]
124+
test_core.py::test_scan2d[get_first_element-int32-shape107-0-16]
125+
test_core.py::test_scan2d[get_first_element-int32-shape110-0-16]
126+
test_core.py::test_scan2d[get_first_element-int32-shape11-1-4]
127+
test_core.py::test_scan2d[get_first_element-int32-shape113-0-16]
128+
test_core.py::test_scan2d[get_first_element-int32-shape116-0-16]
129+
test_core.py::test_scan2d[get_first_element-int32-shape119-0-16]
39130
test_core.py::test_scan2d[get_first_element-int32-shape122-0-16]
40-
test_core.py::test_scan2d[get_first_element-float32-shape164-0-16]
41-
test_core.py::test_scan2d[get_first_element-float32-shape128-1-16]
131+
test_core.py::test_scan2d[get_first_element-int32-shape17-1-4]
132+
test_core.py::test_scan2d[get_first_element-int32-shape20-1-4]
133+
test_core.py::test_scan2d[get_first_element-int32-shape2-1-4]
42134
test_core.py::test_scan2d[get_first_element-int32-shape23-0-4]
43-
test_core.py::test_scan2d[get_first_element-float32-shape131-1-16]
44135
test_core.py::test_scan2d[get_first_element-int32-shape26-0-4]
45-
test_core.py::test_scan2d[get_first_element-float32-shape134-1-16]
46136
test_core.py::test_scan2d[get_first_element-int32-shape29-0-4]
47-
test_core.py::test_scan2d[get_first_element-int32-shape86-1-16]
48137
test_core.py::test_scan2d[get_first_element-int32-shape32-0-4]
49-
test_core.py::test_scan2d[get_first_element-int32-shape89-1-16]
50138
test_core.py::test_scan2d[get_first_element-int32-shape35-0-4]
51-
test_core.py::test_scan2d[get_first_element-int32-shape92-1-16]
52139
test_core.py::test_scan2d[get_first_element-int32-shape38-0-4]
140+
test_core.py::test_scan2d[get_first_element-int32-shape5-1-4]
141+
test_core.py::test_scan2d[get_first_element-int32-shape8-1-4]
142+
test_core.py::test_scan2d[get_first_element-int32-shape86-1-16]
143+
test_core.py::test_scan2d[get_first_element-int32-shape89-1-16]
144+
test_core.py::test_scan2d[get_first_element-int32-shape92-1-16]
53145
test_core.py::test_scan2d[get_first_element-int32-shape95-1-16]
54-
test_core.py::test_scan2d[get_first_element-float32-shape44-1-4]
55-
test_core.py::test_scan2d[get_first_element-float32-shape47-1-4]
56-
test_core.py::test_scan2d[get_first_element-int32-shape101-1-16]
57-
test_core.py::test_scan2d[get_first_element-float32-shape50-1-4]
58-
test_core.py::test_reduce[1-min-float32-shape93-0]
59-
test_core.py::test_enable_fp_fusion[False]
60-
test_core.py::test_enable_fp_fusion[True]
61-
test_core.py::test_reduce[1-max-float32-shape105-0]
62-
test_core.py::test_reduce[1-max-float32-shape106-1]
63-
test_core.py::test_reduce[1-max-float32-shape109-1]
64-
test_core.py::test_reduce[1-sum-float32-shape112-1]
65-
test_core.py::test_reduce[1-argmax-float32-shape136-1]
66-
test_core.py::test_reduce[1-sum-float32-shape115-1]
67-
test_core.py::test_reduce[1-argmin-float32-shape121-1]
68-
test_core.py::test_reduce[1-argmin-float32-shape124-1]
69-
test_core.py::test_reduce[1-max-float32-shape108-0]
70-
test_core.py::test_reduce[1-argmax-float32-shape129-0]
71-
test_core.py::test_reduce[1-argmax-float32-shape132-0]
72-
test_core.py::test_reduce[1-argmin-float32-shape120-0]
73-
test_core.py::test_reduce[1-argmax-float32-shape133-1]
74-
test_core.py::test_scan2d[get_first_element-int32-shape2-1-4]
75-
test_core.py::test_reduce[1-sum-float32-shape118-1]
76-
test_core.py::test_reduce[1-max-float32-shape102-0]
77-
test_core.py::test_reduce[1-min-float32-shape96-0]
78-
test_core.py::test_reduce[1-sum-float32-shape114-0]
79-
test_core.py::test_reduce[1-sum-float32-shape111-0]
80-
test_core.py::test_reduce[1-sum-float32-shape117-0]
81-
test_core.py::test_reduce[1-min-float32-shape94-1]
82-
test_core.py::test_reduce[1-min-float32-shape100-1]
83-
test_core.py::test_reduce[1-argmax-float32-shape130-1]
84-
test_core.py::test_reduce[1-min-float32-shape99-0]
85-
test_core.py::test_reduce[1-argmin-float32-shape126-0]
86-
test_core.py::test_reduce[1-min-float32-shape97-1]
87-
test_core.py::test_reduce[1-argmax-float32-shape135-0]
88-
test_core.py::test_reduce[1-argmin-float32-shape127-1]
89-
test_core.py::test_ptx_cast[int16]
90-
test_core.py::test_ptx_cast[float16]
91-
test_core.py::test_constexpr_propagation
146+
test_core.py::test_slice
147+
test_core.py::test_tensor_atomic_cas[1-acq_rel]
148+
test_core.py::test_tensor_atomic_cas[1-acquire]
149+
test_core.py::test_tensor_atomic_cas[1-None]
150+
test_core.py::test_tensor_atomic_cas[1-relaxed]
151+
test_core.py::test_tensor_atomic_cas[1-release]
152+
test_core.py::test_unsigned_name_mangling
153+
test_line_info.py::test_line_info[autotune]
154+
test_subprocess.py::test_print[device_print_large-int32]
155+
test_subprocess.py::test_print[device_print_multiple_args-int32]
156+
test_subprocess.py::test_print[print_multiple_args-int32]
157+
test_subprocess.py::test_print[print_no_arg-int32]

.github/workflows/triton_xpu_backend_nightly.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
run: |
5656
source ${HOME}/miniconda3/bin/activate triton-nightly-test
5757
cd ${HOME}/triton-nightly
58-
rm -rf triton
58+
rm -rf triton_src
5959
git clone https://github.com/openai/triton triton_src
6060
cd triton_src
6161
triton_commit=`git rev-parse HEAD`

lib/Conversion/TritonGPUToSPIRV/ElementwiseOpToSPIRV.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -504,15 +504,15 @@ static bool isBoolScalarOrVector(Type type) {
504504
}
505505

506506
struct CmpIOpSPIRVConversion
507-
: public ElementwiseOpSPIRVConversionBase<triton::gpu::CmpIOp,
507+
: public ElementwiseOpSPIRVConversionBase<mlir::arith::CmpIOp,
508508
CmpIOpSPIRVConversion> {
509-
using Base = ElementwiseOpSPIRVConversionBase<triton::gpu::CmpIOp,
509+
using Base = ElementwiseOpSPIRVConversionBase<mlir::arith::CmpIOp,
510510
CmpIOpSPIRVConversion>;
511511
using Base::Base;
512512
using Adaptor = typename Base::OpAdaptor;
513513

514514
// An interface to support variant DestOp builder.
515-
Value createDestOp(triton::gpu::CmpIOp op, OpAdaptor adaptor,
515+
Value createDestOp(mlir::arith::CmpIOp op, OpAdaptor adaptor,
516516
ConversionPatternRewriter &rewriter, Type elemTy,
517517
ValueRange operands, Location loc) const {
518518

@@ -557,15 +557,15 @@ struct CmpIOpSPIRVConversion
557557
};
558558

559559
struct CmpFOpSPIRVConversion
560-
: public ElementwiseOpSPIRVConversionBase<triton::gpu::CmpFOp,
560+
: public ElementwiseOpSPIRVConversionBase<mlir::arith::CmpFOp,
561561
CmpFOpSPIRVConversion> {
562-
using Base = ElementwiseOpSPIRVConversionBase<triton::gpu::CmpFOp,
562+
using Base = ElementwiseOpSPIRVConversionBase<mlir::arith::CmpFOp,
563563
CmpFOpSPIRVConversion>;
564564
using Base::Base;
565565
using Adaptor = typename Base::OpAdaptor;
566566

567567
// An interface to support variant DestOp builder.
568-
Value createDestOp(triton::gpu::CmpFOp op, OpAdaptor adaptor,
568+
Value createDestOp(mlir::arith::CmpFOp op, OpAdaptor adaptor,
569569
ConversionPatternRewriter &rewriter, Type elemTy,
570570
ValueRange operands, Location loc) const {
571571
switch (op.getPredicate()) {
@@ -991,7 +991,7 @@ void populateElementwiseOpToSPIRVPatterns(
991991
#define POPULATE_TERNARY_OP(SRC_OP, DST_OP) \
992992
patterns.add<ElementwiseOpSPIRVConversion<SRC_OP, DST_OP>>( \
993993
typeConverter, context, benefit);
994-
POPULATE_TERNARY_OP(triton::gpu::SelectOp, spirv::SelectOp)
994+
POPULATE_TERNARY_OP(mlir::arith::SelectOp, spirv::SelectOp)
995995
#undef POPULATE_TERNARY_OP
996996

997997
#define POPULATE_BINARY_OP(SRC_OP, DST_OP) \

triton_hash.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
30186f401ec52d9addac79a60f418792875f7d11
1+
f168b148ecdd067205c6066bc3e6939fd67ab893

0 commit comments

Comments
 (0)