[Mlir-commits] [mlir] [mlir][vector] Refactor linearize.mlir (PR #86648)

Andrzej WarzyƄski llvmlistbot at llvm.org
Tue Mar 26 08:52:25 PDT 2024


================
@@ -1,92 +1,89 @@
-// RUN: mlir-opt %s -split-input-file -test-vector-linearize | FileCheck %s
-// RUN: mlir-opt %s -split-input-file -test-vector-linearize=target-vector-bitwidth=128 | FileCheck %s --check-prefix=CHECK128
-// RUN: mlir-opt %s -split-input-file -test-vector-linearize=target-vector-bitwidth=0 | FileCheck %s --check-prefix=CHECK0
-
-// CHECK-LABEL: test_linearize
-// CHECK128-LABEL: test_linearize
-// CHECK0-LABEL: test_linearize
-//  CHECK-SAME: (%[[ORIG_ARG:.*]]: vector<2x2xf32>)
-//  CHECK128-SAME: (%[[ORIG_ARG:.*]]: vector<2x2xf32>)
-//       CHECK: %[[ARG:.*]] = vector.shape_cast %[[ORIG_ARG]] : vector<2x2xf32> to vector<4xf32>
-//       CHECK128: %[[ARG:.*]] = vector.shape_cast %[[ORIG_ARG]] : vector<2x2xf32> to vector<4xf32>
+// RUN: mlir-opt %s -split-input-file -test-vector-linearize | FileCheck %s --check-prefixes=ALL,DEFAULT
----------------
banach-space wrote:

`DEFAULT` documents the fact that the _default config_ is being tested. And `-test-vector-linearize` means "default". When using `CHECK`, we are missing an opportunity to document what configuration is being tested.

I appreciate that it's a matter of style/preference and both approaches are 100% valid. Happy to revert this change if that's your preference.

https://github.com/llvm/llvm-project/pull/86648


More information about the Mlir-commits mailing list