Skip to content

[mlir] Refactor ConvertVectorToLLVMPass options #128219

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Mar 10, 2025
13 changes: 9 additions & 4 deletions mlir/test/Conversion/VectorToLLVM/test-serialisable.mlir
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
// RUN: mlir-opt --convert-vector-to-llvm --dump-pass-pipeline %s 2>&1 | FileCheck %s

// Simple regression test that ensures ConvertVectorToLLVMPass options remain
// serialisable. We don't need to actually parse any IR to print the pass
// options. We just need to provide --dump-pass-pipeline

// RUN: mlir-opt --convert-vector-to-llvm --dump-pass-pipeline %s 2>&1 | FileCheck %s --check-prefix=DEFAULT

// RUN: mlir-opt --convert-vector-to-llvm='vector-contract-lowering=matmul vector-transpose-lowering=flat' \
// RUN: --dump-pass-pipeline 2>&1 | FileCheck %s --check-prefix=CHANGED

// CHECK: builtin.module(
// CHECK-SAME: convert-vector-to-llvm{
// CHECK-SAME: enable-amx={{[aA-zZ0-9]+}}
Expand All @@ -12,5 +15,7 @@
// CHECK-SAME: enable-x86vector={{[aA-zZ0-9]+}}
// CHECK-SAME: force-32bit-vector-indices={{[aA-zZ0-9]+}}
// CHECK-SAME: reassociate-fp-reductions={{[aA-zZ0-9]+}}
// CHECK-SAME: vector-contract-lowering={{[aA-zZ0-9]+}}
// CHECK-SAME: vector-transpose-lowering={{[aA-zZ0-9]+}}})
// DEFAULT: vector-contract-lowering=dot
// DEFAULT: vector-transpose-lowering=eltwise
// CHANGED: vector-contract-lowering=matmul
// CHANGED: vector-transpose-lowering=flat