[Mlir-commits] [mlir] [mlir][Vector] Add vector bitwidth target to xfer op flattening (PR #81966)

Andrzej WarzyƄski llvmlistbot at llvm.org
Sat Feb 17 00:22:16 PST 2024


================
@@ -1,4 +1,5 @@
 // RUN: mlir-opt %s -test-vector-transfer-flatten-patterns -split-input-file | FileCheck %s
+// RUN: mlir-opt %s -test-vector-transfer-flatten-patterns=target-vector-bitwidth=128 -split-input-file | FileCheck %s --check-prefix=CHECK-128B
----------------
banach-space wrote:

```suggestion
// RUN: mlir-opt %s -test-vector-transfer-flatten-patterns -split-input-file | FileCheck %s --check-prefixex=CHECK,CHECK-DEFAULT

// RUN: mlir-opt %s -test-vector-transfer-flatten-patterns=target-vector-bitwidth=128 -split-input-file | FileCheck %s --check-prefix=CHECK,CHECK-128B
```

This way, you don't need to add `CHECK-128B` to every "sub-file" in this file and only update checks for e.g. `transfer_read_dims_mismatch_non_zero_indices`:
```
// CHECK-DEFAULT-LABEL: func @transfer_read_dims_match_contiguous
//       CHECK-DEFAULT:   memref.collapse_shape
// ...
// CHECK-128B-LABEL: func @transfer_read_dims_match_contiguous
//       CHECK-128B:   memref.collapse_shape
// ...
```
https://llvm.org/docs/CommandGuide/FileCheck.html#options

[nit] Side note. IMHO, Once "prefixes" are involved, "CHECK" in prefix name becomes noise.

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


More information about the Mlir-commits mailing list