Skip to content

Commit 79e9745

Browse files
committed
[ArmSME][test] Make use of the TransposeMatmulPass for e2e matmuls
We should also test peeling here, but that is currently waiting on llvm/llvm-project#92402 (to fix one of the small cases). Signed-off-by: Benjamin Maxwell <[email protected]>
1 parent 1316c92 commit 79e9745

File tree

2 files changed

+75
-4
lines changed

2 files changed

+75
-4
lines changed

tests/e2e/matmul/BUILD.bazel

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,23 @@ py_binary(
6464
"large",
6565
]]
6666

67+
PREPROCESSING_TRANSPOSE_LHS = "--iree-preprocessing-pass-pipeline=builtin.module\\(util.func\\(iree-preprocessing-transpose-matmul-pass{input=lhs}\\)\\)"
68+
69+
PREPROCESSING_PEEL = "--iree-llvmcpu-vector-pproc-strategy=peel"
70+
6771
# LLVMCPU, non-data-tiling, no microkernels, ArmSME
6872
[iree_generated_e2e_runner_test(
69-
name = "e2e_matmul_cpu_arm_sme_nondt_%s_%s" % (dtype, size),
73+
name = "e2e_matmul_cpu_arm_sme_nondt_%s_%s%s%s" % (
74+
dtype,
75+
size,
76+
"_transpose_lhs" if transpose_lhs else "",
77+
"_peel" if peel else "",
78+
),
7079
compiler_flags = [
71-
"--iree-opt-data-tiling=false",
72-
"--iree-llvmcpu-enable-scalable-vectorization",
73-
],
80+
"--iree-opt-data-tiling=false",
81+
"--iree-llvmcpu-enable-scalable-vectorization",
82+
] + ([PREPROCESSING_TRANSPOSE_LHS] if transpose_lhs else []) +
83+
([PREPROCESSING_PEEL] if peel else []),
7484
generator = ":generate_e2e_matmul_tests",
7585
generator_args = [
7686
"--lhs_rhs_type=%s" % dtype,
@@ -92,6 +102,13 @@ py_binary(
92102
] for size in [
93103
"small",
94104
"large",
105+
] for transpose_lhs in [
106+
True,
107+
False,
108+
] for peel in [
109+
# TODO(macdue): Enable peeling tests after next LLVM integration.
110+
# True,
111+
False,
95112
]]
96113

97114
X86_64_AVX2 = [

tests/e2e/matmul/CMakeLists.txt

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,33 @@
1010

1111
iree_add_all_subdirs()
1212

13+
iree_generated_e2e_runner_test(
14+
NAME
15+
e2e_matmul_cpu_arm_sme_nondt_f32_small_transpose_lhs
16+
TEST_TYPE
17+
matmul
18+
GENERATOR
19+
"generate_e2e_matmul_tests.py"
20+
GENERATOR_ARGS
21+
"--lhs_rhs_type=f32"
22+
"--acc_type=f32"
23+
"--shapes=small"
24+
TEST_RUNNER
25+
iree_tools_testing_e2e_iree-e2e-matmul-test
26+
TARGET_BACKENDS
27+
"llvm-cpu"
28+
DRIVERS
29+
"local-task"
30+
COMPILER_FLAGS
31+
"--iree-opt-data-tiling=false"
32+
"--iree-llvmcpu-enable-scalable-vectorization"
33+
"--iree-preprocessing-pass-pipeline=builtin.module\(util.func\(iree-preprocessing-transpose-matmul-pass{input=lhs}\)\)"
34+
LABELS
35+
"requires-arm-sme"
36+
TARGET_CPU_FEATURES_VARIANTS
37+
"arm_64:sme:+sve,+sme"
38+
)
39+
1340
iree_generated_e2e_runner_test(
1441
NAME
1542
e2e_matmul_cpu_arm_sme_nondt_f32_small
@@ -36,6 +63,33 @@ iree_generated_e2e_runner_test(
3663
"arm_64:sme:+sve,+sme"
3764
)
3865

66+
iree_generated_e2e_runner_test(
67+
NAME
68+
e2e_matmul_cpu_arm_sme_nondt_f32_large_transpose_lhs
69+
TEST_TYPE
70+
matmul
71+
GENERATOR
72+
"generate_e2e_matmul_tests.py"
73+
GENERATOR_ARGS
74+
"--lhs_rhs_type=f32"
75+
"--acc_type=f32"
76+
"--shapes=large"
77+
TEST_RUNNER
78+
iree_tools_testing_e2e_iree-e2e-matmul-test
79+
TARGET_BACKENDS
80+
"llvm-cpu"
81+
DRIVERS
82+
"local-task"
83+
COMPILER_FLAGS
84+
"--iree-opt-data-tiling=false"
85+
"--iree-llvmcpu-enable-scalable-vectorization"
86+
"--iree-preprocessing-pass-pipeline=builtin.module\(util.func\(iree-preprocessing-transpose-matmul-pass{input=lhs}\)\)"
87+
LABELS
88+
"requires-arm-sme"
89+
TARGET_CPU_FEATURES_VARIANTS
90+
"arm_64:sme:+sve,+sme"
91+
)
92+
3993
iree_generated_e2e_runner_test(
4094
NAME
4195
e2e_matmul_cpu_arm_sme_nondt_f32_large

0 commit comments

Comments
 (0)