The promotion transformation is promoting all input and output buffers of the transformed op. The user might want to only promote some of these buffers.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
- Build Status
Buildable 53981 Build 61782: arc lint + arc unit
Event Timeline
mlir/include/mlir/Dialect/Linalg/Transforms/LinalgTransforms.h | ||
---|---|---|
124 | Please document this function | |
mlir/lib/Dialect/Linalg/Transforms/LinalgTransforms.cpp | ||
342 | Please reserve the space before populating a vector in a loop | |
343 | int64_t i = 0, e = linOp.getNumInputsAndOutputBuffers(); i < e; ++i) is a common LLVM pattern that avoids calling the function in a loop | |
376 | Nit: !linalgMarker.empty() may be more efficient | |
mlir/test/lib/DeclarativeTransforms/TestLinalgTransformPatterns.td | ||
153 | I don't follow this. The test name suggests you promote the _first_ view, but the list contains operands with indices 0 and 1... The .mlir file also seems to check only for one copy. Consider using only [0] here and CHECK-NOT for extra copies before matmul. |
mlir/test/lib/DeclarativeTransforms/TestLinalgTransformPatterns.td | ||
---|---|---|
153 | Nice catch! I believe there is a problem with test/Dialect/Linalg/transform-patterns.mlir and that the test is passing even when it should fail:
|
mlir/include/mlir/Dialect/Linalg/Transforms/LinalgTransforms.h | ||
---|---|---|
127 | Nit: typo "successful". And grammo: put a comma after an if-clause. | |
mlir/test/lib/DeclarativeTransforms/TestLinalgTransformPatterns.td | ||
153 | Indeed, after further investigation, the test above uses wrong syntax for FileCheck. There must be no spaces between CHECK and : @nicolasvasilache. |
mlir/test/Dialect/Linalg/transform-patterns.mlir | ||
---|---|---|
439–446 | These checks do not work because they refer to undefined variables because each CHECK-NOT is checked independently. Since these are patterns that should not occur the variables defined in them have nothing to be set to. Currently these will always succeed because the use of an undefined variable is interpreted by FileCheck as being a failure to match, and thus those CHECK-NOT are satisfied. I'd suggest replacing them with CHECK-NEXT as generated by update_test_checks.py. Alternatively you could join all CHECK-NOT in a CHECK-NOT block with {{(.*[[:space:]])+}} but that would become quite unreadable. |
Please wrap this at 80 characters, it seems to be edging over here.