Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Generates this message:
benoitjacob@cloud:~/mlir-build$ cmake --build . --target mlir-opt && bin/mlir-opt /tmp/x.mlir [6/6] Linking CXX executable bin/mlir-opt /tmp/x.mlir:2:13: error: 'vector.contract' op expected all input dimensions to be used by either the LHS or the RHS. %result = vector.contract { ^ /tmp/x.mlir:2:13: note: see current operation: %0 = "vector.contract"(%arg0, %arg1, %arg2) {indexing_maps = [affine_map<(d0, d1, d2) -> (d0, d2)>, affine_map<(d0, d1, d2) -> (d2)>, affine_map<(d0, d1, d2) -> (d1)>], iterator_types = ["reduction", "parallel", "reduction"], kind = #vector.kind<add>} : (vector<1x2xi32>, vector<2xi32>, vector<1xi32>) -> vector<1xi32>
On this testcase:
benoitjacob@cloud:~/mlir-build$ cat /tmp/x.mlir func.func @bad_broadcast(%arg0 : vector<1x2xi32>, %arg1 : vector<2xi32>, %arg2 : vector<1xi32>) -> vector<1xi32> { %result = vector.contract { indexing_maps = [ affine_map<(d0, d1, d2) -> (d0, d2)>, affine_map<(d0, d1, d2) -> (d2)>, affine_map<(d0, d1, d2) -> (d1)> ], iterator_types = ["reduction", "parallel", "reduction"], kind = #vector.kind<add>} %arg0, %arg1, %arg2 : vector<1x2xi32>, vector<2xi32> into vector<1xi32> return %result : vector<1xi32> }
mlir/lib/Dialect/Vector/IR/VectorOps.cpp | ||
---|---|---|
702 | Convention for error message are sentence fragments (no capitalization at start and no punctuation at end), https://llvm.org/docs/CodingStandards.html#error-and-warning-messages Is it helpful to say which input dimension are unused? |
mlir/lib/Dialect/Vector/IR/VectorOps.cpp | ||
---|---|---|
702 | The unused input dimension is plain to see in the op dump which follows this error message, see example in this review's comment thread. |
Convention for error message are sentence fragments (no capitalization at start and no punctuation at end), https://llvm.org/docs/CodingStandards.html#error-and-warning-messages
Is it helpful to say which input dimension are unused?