Skip to content

Commit 045fc4a

Browse files
committed
Enable triton kernels matmul tests
Signed-off-by: Witold Dziurdz <witold.dziurdz@intel.com>
1 parent 0794e64 commit 045fc4a

File tree

7 files changed

+53
-108
lines changed

7 files changed

+53
-108
lines changed

python/triton_kernels/triton_kernels/matmul_ogs.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ def init_allocation(x, w, precision_config, fused_activation,
292292
# ---- scratchpad -----#
293293
scratchpad = dict()
294294
if opt_flags.split_k > 1 or (scatter_indx is not None and not opt_flags.fused_scatter):
295-
scratch_out_dtype = torch.float32 if opt_flags.split_k > 1 else out_dtype
295+
scratch_out_dtype = torch.float32
296296
scratchpad["matmul"] = ((opt_flags.split_k, batch_dim, M, N), scratch_out_dtype)
297297
if "matmul" in scratchpad and precision_config.out_scale is not None:
298298
assert batch_dim == 1, "batch_dim > 1 not supported yet"
@@ -598,7 +598,7 @@ def matmul_ogs(x, w, bias,
598598
out_matmul_scale = out_matmul_scale.data.view(torch.uint8)
599599
if has_scratchpad and "mx_out_scale" in memory["scratchpad"]:
600600
out_matmul_scale = memory["scratchpad"]["mx_out_scale"]
601-
out_matmul_has_mx = out_matmul_scale is not None and out_matmul.element_size() == 1
601+
out_matmul_has_mx = out_matmul_scale is not None and bitwidth(out_dtype) == 8
602602
# matrix multiplication
603603
flex = precision_config.flex_ctx
604604
bias_stride = None if bias is None else bias.stride(0)
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
1-
tests/test_matmul.py::test_op
21
tests/test_matmul.py::test_fused_act
32
tests/test_matmul.py::test_zero_reduction_dim
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
1-
tests/test_matmul.py::test_op
21
tests/test_matmul.py::test_fused_act
32
tests/test_matmul.py::test_zero_reduction_dim
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
1-
tests/test_matmul.py::test_op
21
tests/test_matmul.py::test_fused_act
32
tests/test_matmul.py::test_zero_reduction_dim
Lines changed: 17 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,17 @@
1-
# https://github.com/intel/intel-xpu-backend-for-triton/issues/5074
2-
tests/test_matmul.py::test_op[False-False-False-False-False-None-128-1000-700-700-ragged-float16-float16-8-2-1-False-None-False-False-False-True]
3-
tests/test_matmul.py::test_op[False-False-False-False-False-None-128-1000-704-800-ragged-mxfloat8_e4m3fn-mxfloat4_e2m1-8-2-9-False-None-False-False-False-False]
4-
tests/test_matmul.py::test_op[False-False-False-False-False-None-128-1000-704-800-ragged-mxfloat8_e4m3fn-mxfloat4_e2m1-8-2-9-False-None-False-False-False-True]
5-
tests/test_matmul.py::test_op[False-False-False-False-False-None-128-1000-704-800-ragged-mxfloat8_e4m3fn-mxfloat4_e2m1-8-2-9-True-None-False-False-False-True]
6-
tests/test_matmul.py::test_op[False-False-False-False-False-None-16-1000-704-800-ragged-mxfloat8_e4m3fn-mxfloat4_e2m1-8-2-9-False-None-False-False-False-True]
7-
tests/test_matmul.py::test_op[False-False-False-False-False-None-16-1000-704-800-ragged-mxfloat8_e4m3fn-mxfloat4_e2m1-8-2-9-True-None-False-False-False-True]
8-
tests/test_matmul.py::test_op[False-False-False-True-False-None-128-1000-400-400-ragged-float8_e4m3fn-float8_e4m3fn-3-1-1-False-None-False-False-False-True]
9-
tests/test_matmul.py::test_op[False-False-False-True-False-None-128-1000-704-800-ragged-mxfloat8_e4m3fn-mxfloat4_e2m1-8-2-9-False-None-False-False-False-False]
10-
tests/test_matmul.py::test_op[False-False-False-True-False-None-128-1000-704-800-ragged-mxfloat8_e4m3fn-mxfloat4_e2m1-8-2-9-False-None-False-False-False-True]
11-
tests/test_matmul.py::test_op[False-False-False-True-False-None-128-1000-704-800-ragged-mxfloat8_e4m3fn-mxfloat4_e2m1-8-2-9-True-None-False-False-False-True]
12-
tests/test_matmul.py::test_op[False-False-False-True-False-None-16-1000-400-400-ragged-float8_e4m3fn-float8_e4m3fn-3-1-1-False-None-False-False-False-True]
13-
tests/test_matmul.py::test_op[False-False-False-True-False-None-16-1000-704-800-ragged-mxfloat8_e4m3fn-mxfloat4_e2m1-8-2-9-False-None-False-False-False-True]
14-
tests/test_matmul.py::test_op[False-False-False-True-False-None-16-1000-704-800-ragged-mxfloat8_e4m3fn-mxfloat4_e2m1-8-2-9-True-None-False-False-False-True]
15-
tests/test_matmul.py::test_op[False-False-True-False-False-None-128-1000-704-800-ragged-mxfloat8_e4m3fn-mxfloat4_e2m1-8-2-9-False-None-False-False-False-False]
16-
tests/test_matmul.py::test_op[False-False-True-False-False-None-128-1000-704-800-ragged-mxfloat8_e4m3fn-mxfloat4_e2m1-8-2-9-False-None-False-False-False-True]
17-
tests/test_matmul.py::test_op[False-False-True-False-False-None-128-1000-704-800-ragged-mxfloat8_e4m3fn-mxfloat4_e2m1-8-2-9-True-None-False-False-False-True]
18-
tests/test_matmul.py::test_op[False-False-True-False-False-None-16-1000-704-800-ragged-mxfloat8_e4m3fn-mxfloat4_e2m1-8-2-9-False-None-False-False-False-True]
19-
tests/test_matmul.py::test_op[False-False-True-False-False-None-16-1000-704-800-ragged-mxfloat8_e4m3fn-mxfloat4_e2m1-8-2-9-True-None-False-False-False-True]
20-
tests/test_matmul.py::test_op[False-False-True-True-False-None-128-1000-400-400-ragged-float8_e4m3fn-float8_e4m3fn-3-1-1-False-None-False-False-False-True]
21-
tests/test_matmul.py::test_op[False-False-True-True-False-None-128-1000-704-800-ragged-mxfloat8_e4m3fn-mxfloat4_e2m1-8-2-9-False-None-False-False-False-False]
22-
tests/test_matmul.py::test_op[False-False-True-True-False-None-128-1000-704-800-ragged-mxfloat8_e4m3fn-mxfloat4_e2m1-8-2-9-False-None-False-False-False-True]
23-
tests/test_matmul.py::test_op[False-False-True-True-False-None-128-1000-704-800-ragged-mxfloat8_e4m3fn-mxfloat4_e2m1-8-2-9-True-None-False-False-False-True]
24-
tests/test_matmul.py::test_op[False-False-True-True-False-None-16-1000-400-400-ragged-float8_e4m3fn-float8_e4m3fn-3-1-1-False-None-False-False-False-True]
25-
tests/test_matmul.py::test_op[False-False-True-True-False-None-16-1000-704-800-ragged-mxfloat8_e4m3fn-mxfloat4_e2m1-8-2-9-False-None-False-False-False-True]
26-
tests/test_matmul.py::test_op[False-False-True-True-False-None-16-1000-704-800-ragged-mxfloat8_e4m3fn-mxfloat4_e2m1-8-2-9-True-None-False-False-False-True]
27-
tests/test_matmul.py::test_op[False-True-False-False-False-None-128-1000-700-700-ragged-float16-float16-8-2-9-False-None-False-False-False-True]
28-
tests/test_matmul.py::test_op[False-True-False-False-False-None-128-1000-704-800-ragged-mxfloat8_e4m3fn-mxfloat4_e2m1-8-2-9-False-None-False-False-False-False]
29-
tests/test_matmul.py::test_op[False-True-False-False-False-None-128-1000-704-800-ragged-mxfloat8_e4m3fn-mxfloat4_e2m1-8-2-9-False-None-False-False-False-True]
30-
tests/test_matmul.py::test_op[False-True-False-False-False-None-128-1000-704-800-ragged-mxfloat8_e4m3fn-mxfloat4_e2m1-8-2-9-True-None-False-False-False-True]
31-
tests/test_matmul.py::test_op[False-True-False-False-False-None-16-1000-704-800-ragged-mxfloat8_e4m3fn-mxfloat4_e2m1-8-2-9-False-None-False-False-False-True]
32-
tests/test_matmul.py::test_op[False-True-False-False-False-None-16-1000-704-800-ragged-mxfloat8_e4m3fn-mxfloat4_e2m1-8-2-9-True-None-False-False-False-True]
33-
tests/test_matmul.py::test_op[False-True-False-True-False-None-128-1000-400-400-ragged-float8_e4m3fn-float8_e4m3fn-3-1-1-False-None-False-False-False-True]
34-
tests/test_matmul.py::test_op[False-True-False-True-False-None-128-1000-704-800-ragged-mxfloat8_e4m3fn-mxfloat4_e2m1-8-2-9-False-None-False-False-False-False]
35-
tests/test_matmul.py::test_op[False-True-False-True-False-None-128-1000-704-800-ragged-mxfloat8_e4m3fn-mxfloat4_e2m1-8-2-9-False-None-False-False-False-True]
36-
tests/test_matmul.py::test_op[False-True-False-True-False-None-128-1000-704-800-ragged-mxfloat8_e4m3fn-mxfloat4_e2m1-8-2-9-True-None-False-False-False-True]
37-
tests/test_matmul.py::test_op[False-True-False-True-False-None-16-1000-400-400-ragged-float8_e4m3fn-float8_e4m3fn-3-1-1-False-None-False-False-False-True]
38-
tests/test_matmul.py::test_op[False-True-False-True-False-None-16-1000-704-800-ragged-mxfloat8_e4m3fn-mxfloat4_e2m1-8-2-9-False-None-False-False-False-True]
39-
tests/test_matmul.py::test_op[False-True-False-True-False-None-16-1000-704-800-ragged-mxfloat8_e4m3fn-mxfloat4_e2m1-8-2-9-True-None-False-False-False-True]
40-
tests/test_matmul.py::test_op[False-True-True-False-False-None-128-1000-700-700-ragged-float16-float16-8-2-9-False-None-False-False-False-True]
41-
tests/test_matmul.py::test_op[False-True-True-False-False-None-128-1000-704-800-ragged-mxfloat8_e4m3fn-mxfloat4_e2m1-8-2-9-False-None-False-False-False-False]
42-
tests/test_matmul.py::test_op[False-True-True-False-False-None-128-1000-704-800-ragged-mxfloat8_e4m3fn-mxfloat4_e2m1-8-2-9-False-None-False-False-False-True]
43-
tests/test_matmul.py::test_op[False-True-True-False-False-None-128-1000-704-800-ragged-mxfloat8_e4m3fn-mxfloat4_e2m1-8-2-9-True-None-False-False-False-True]
44-
tests/test_matmul.py::test_op[False-True-True-False-False-None-16-1000-704-800-ragged-mxfloat8_e4m3fn-mxfloat4_e2m1-8-2-9-False-None-False-False-False-True]
45-
tests/test_matmul.py::test_op[False-True-True-False-False-None-16-1000-704-800-ragged-mxfloat8_e4m3fn-mxfloat4_e2m1-8-2-9-True-None-False-False-False-True]
46-
tests/test_matmul.py::test_op[False-True-True-True-False-None-128-1000-400-400-ragged-float8_e4m3fn-float8_e4m3fn-3-1-1-False-None-False-False-False-True]
47-
tests/test_matmul.py::test_op[False-True-True-True-False-None-128-1000-704-800-ragged-mxfloat8_e4m3fn-mxfloat4_e2m1-8-2-9-False-None-False-False-False-False]
48-
tests/test_matmul.py::test_op[False-True-True-True-False-None-128-1000-704-800-ragged-mxfloat8_e4m3fn-mxfloat4_e2m1-8-2-9-False-None-False-False-False-True]
49-
tests/test_matmul.py::test_op[False-True-True-True-False-None-128-1000-704-800-ragged-mxfloat8_e4m3fn-mxfloat4_e2m1-8-2-9-True-None-False-False-False-True]
50-
tests/test_matmul.py::test_op[False-True-True-True-False-None-16-1000-400-400-ragged-float8_e4m3fn-float8_e4m3fn-3-1-1-False-None-False-False-False-True]
51-
tests/test_matmul.py::test_op[False-True-True-True-False-None-16-1000-704-800-ragged-mxfloat8_e4m3fn-mxfloat4_e2m1-8-2-9-False-None-False-False-False-True]
52-
tests/test_matmul.py::test_op[False-True-True-True-False-None-16-1000-704-800-ragged-mxfloat8_e4m3fn-mxfloat4_e2m1-8-2-9-True-None-False-False-False-True]
1+
#hang
2+
tests/test_matmul.py::test_op[False-False-False-False-False-None-128-16-16-1000-batched-float16-float16-5-1-None-False-None-False-False-False]
3+
tests/test_matmul.py::test_op[False-False-False-False-False-None-16-16-16-1000-batched-float16-float16-5-1-None-False-None-False-False-False]
4+
tests/test_matmul.py::test_op[False-False-False-True-False-None-128-16-16-1000-batched-float16-float16-5-1-None-False-None-False-False-False]
5+
tests/test_matmul.py::test_op[False-False-False-True-False-None-16-16-16-1000-batched-float16-float16-5-1-None-False-None-False-False-False]
6+
tests/test_matmul.py::test_op[False-False-True-False-False-None-128-16-16-1000-batched-float16-float16-5-1-None-False-None-False-False-False]
7+
tests/test_matmul.py::test_op[False-False-True-False-False-None-16-16-16-1000-batched-float16-float16-5-1-None-False-None-False-False-False]
8+
tests/test_matmul.py::test_op[False-False-True-True-False-None-128-16-16-1000-batched-float16-float16-5-1-None-False-None-False-False-False]
9+
tests/test_matmul.py::test_op[False-False-True-True-False-None-16-16-16-1000-batched-float16-float16-5-1-None-False-None-False-False-False]
10+
tests/test_matmul.py::test_op[False-True-False-False-False-None-128-16-16-1000-batched-float16-float16-5-1-None-False-None-False-False-False]
11+
tests/test_matmul.py::test_op[False-True-False-False-False-None-16-16-16-1000-batched-float16-float16-5-1-None-False-None-False-False-False]
12+
tests/test_matmul.py::test_op[False-True-False-True-False-None-128-16-16-1000-batched-float16-float16-5-1-None-False-None-False-False-False]
13+
tests/test_matmul.py::test_op[False-True-False-True-False-None-16-16-16-1000-batched-float16-float16-5-1-None-False-None-False-False-False]
14+
tests/test_matmul.py::test_op[False-True-True-False-False-None-128-16-16-1000-batched-float16-float16-5-1-None-False-None-False-False-False]
15+
tests/test_matmul.py::test_op[False-True-True-False-False-None-16-16-16-1000-batched-float16-float16-5-1-None-False-None-False-False-False]
16+
tests/test_matmul.py::test_op[False-True-True-True-False-None-128-16-16-1000-batched-float16-float16-5-1-None-False-None-False-False-False]
17+
tests/test_matmul.py::test_op[False-True-True-True-False-None-16-16-16-1000-batched-float16-float16-5-1-None-False-None-False-False-False]
Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,17 @@
1-
# https://github.com/intel/intel-xpu-backend-for-triton/issues/5074
2-
tests/test_matmul.py::test_op
1+
#hang
2+
tests/test_matmul.py::test_op[False-False-False-False-False-None-128-16-16-1000-batched-float16-float16-5-1-None-False-None-False-False-False]
3+
tests/test_matmul.py::test_op[False-False-False-False-False-None-16-16-16-1000-batched-float16-float16-5-1-None-False-None-False-False-False]
4+
tests/test_matmul.py::test_op[False-False-False-True-False-None-128-16-16-1000-batched-float16-float16-5-1-None-False-None-False-False-False]
5+
tests/test_matmul.py::test_op[False-False-False-True-False-None-16-16-16-1000-batched-float16-float16-5-1-None-False-None-False-False-False]
6+
tests/test_matmul.py::test_op[False-False-True-False-False-None-128-16-16-1000-batched-float16-float16-5-1-None-False-None-False-False-False]
7+
tests/test_matmul.py::test_op[False-False-True-False-False-None-16-16-16-1000-batched-float16-float16-5-1-None-False-None-False-False-False]
8+
tests/test_matmul.py::test_op[False-False-True-True-False-None-128-16-16-1000-batched-float16-float16-5-1-None-False-None-False-False-False]
9+
tests/test_matmul.py::test_op[False-False-True-True-False-None-16-16-16-1000-batched-float16-float16-5-1-None-False-None-False-False-False]
10+
tests/test_matmul.py::test_op[False-True-False-False-False-None-128-16-16-1000-batched-float16-float16-5-1-None-False-None-False-False-False]
11+
tests/test_matmul.py::test_op[False-True-False-False-False-None-16-16-16-1000-batched-float16-float16-5-1-None-False-None-False-False-False]
12+
tests/test_matmul.py::test_op[False-True-False-True-False-None-128-16-16-1000-batched-float16-float16-5-1-None-False-None-False-False-False]
13+
tests/test_matmul.py::test_op[False-True-False-True-False-None-16-16-16-1000-batched-float16-float16-5-1-None-False-None-False-False-False]
14+
tests/test_matmul.py::test_op[False-True-True-False-False-None-128-16-16-1000-batched-float16-float16-5-1-None-False-None-False-False-False]
15+
tests/test_matmul.py::test_op[False-True-True-False-False-None-16-16-16-1000-batched-float16-float16-5-1-None-False-None-False-False-False]
16+
tests/test_matmul.py::test_op[False-True-True-True-False-None-128-16-16-1000-batched-float16-float16-5-1-None-False-None-False-False-False]
17+
tests/test_matmul.py::test_op[False-True-True-True-False-None-16-16-16-1000-batched-float16-float16-5-1-None-False-None-False-False-False]

0 commit comments

Comments
 (0)