This commit adds a tiling op to the transform dialect as an external op.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
| mlir/include/mlir/Dialect/Linalg/TransformOps/LinalgTransformOps.h | ||
|---|---|---|
| 1 | Nit: wrong filename | |
| 13 | Nit: wouldn't OpDefinition.h suffice in the header? | |
| mlir/include/mlir/Dialect/Linalg/TransformOps/LinalgTransformOps.td | ||
| 9 | These aren't really linear algebra operations, but transforms thereof. | |
| mlir/lib/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp | ||
| 63 | function_ref (std::function is only useful if the callee needs to outlive the caller) | |
| 66–67 | Is it possible to reserve space for these? | |
| 70 | I'd rather dyn_cast and report a user-visible error here. | |
| 81–83 | Nit: drop trivial braces. | |
| 87–89 | Nit: drop trivial braces. | |
| 117 | Ultra-nit: we tend to use single-quotes rather than backticks in user-visible text. | |
| 120 | Don't we have something like getSizesAttrName() to avoid magic strings? | |
| 123 | Nit: there is no need to use formatv to insert one statically known string into another statically known string, just write the full string. I suppose this could have been taken from some other place that used getSizesAttrName() instead of hardcoding the attribute name. Even in that case, something like parser.emitError(opLoc) << "expected " << getSizesAttrName() << " attribute"; is probably cheaper / easier for the compiler to optimize than formatv. | |
| 159 | We also need Read/Write effect on PayloadIRResource, not attached to a particular value. | |
| mlir/include/mlir/Dialect/Linalg/TransformOps/LinalgTransformOps.h | ||
|---|---|---|
| 13 | Actually requires OpImplementation.h because OpAsmOpInterface is needed. | |
| mlir/include/mlir/Dialect/Linalg/TransformOps/LinalgTransformOps.td | ||
| 9 | Ah, this was copy pasta... | |
| mlir/lib/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp | ||
| 120 | We do, but getSizesAttrName is a member function and TileOp::parse() is static. | |
| mlir/lib/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp | ||
|---|---|---|
| 120 | Isn't there a static version that takes OperationName as argument? You can get OperationName from OperationState. | |
address comments
| mlir/lib/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp | ||
|---|---|---|
| 120 | Nice I didn't know that | |
Nit: wrong filename