[Mlir-commits] [mlir] [mlir][vector] Add a check to ensure input vector rank equals target shape rank (PR #127706)
Kai Sasaki
llvmlistbot at llvm.org
Mon Feb 24 22:50:33 PST 2025
Lewuathe wrote:
In `vector-unrole-option` case, the signature of the variable can be changed. We need to use the wildcard (e.g. or assignment `%[[ARG0:.*]]`) instead of hard-coding `%a`.
```
# .---command stderr------------
# | C:\ws\src\mlir\test\Dialect\Vector\vector-unroll-options.mlir:198:11: error: CHECK: expected string not found in input
# | // CHECK: %0 = vector.fma %a, %a, %a : vector<3x2x2xf32>
# | ^
# | <stdin>:104:35: note: scanning from here
# | func.func @negative_vector_fma_3d(%arg0: vector<3x2x2xf32>) {
# | ^
# |
# | Input file: <stdin>
# | Check file: C:\ws\src\mlir\test\Dialect\Vector\vector-unroll-options.mlir
# |
# | -dump-input=help explains the following input dump.
# |
# | Input was:
# | <<<<<<
# | .
# | .
# | .
# | 99: %17 = vector.extract_strided_slice %arg2 {offsets = [2, 2], sizes = [2, 2], strides = [1, 1]} : vector<4x4xf32> to vector<2x2xf32>
# | 100: %18 = vector.fma %15, %16, %17 : vector<2x2xf32>
# | 101: %19 = vector.insert_strided_slice %18, %14 {offsets = [2, 2], strides = [1, 1]} : vector<2x2xf32> into vector<4x4xf32>
# | 102: return %19 : vector<4x4xf32>
# | 103: }
# | 104: func.func @negative_vector_fma_3d(%arg0: vector<3x2x2xf32>) {
# | check:198 X~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found
# | 105: return
# | check:198 ~~~~~~~~
# | 106: }
# | check:198 ~~~
# | 107: func.func @vector_multi_reduction(%arg0: vector<4x6xf32>, %arg1: vector<4xf32>) -> vector<4xf32> {
# | check:198 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 108: %cst = arith.constant dense<0.000000e+00> : vector<4xf32>
# | 109: %0 = vector.extract_strided_slice %arg0 {offsets = [0, 0], sizes = [2, 2], strides = [1, 1]} : vector<4x6xf32> to vector<2x2xf32>
# | .
# | .
# | .
# | >>>>>>
# `-----------------------------
```
https://github.com/llvm/llvm-project/pull/127706
More information about the Mlir-commits
mailing list