This is to simplify creating TiledLoops without having conditional code
at every call site to see if a previous TiledLoop had the attribute set
or not.
Details
- Reviewers
nicolasvasilache frgossen
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp | ||
---|---|---|
1763 | Is this a check for a nullptr? This seems dangerous, especially when distributionTypes is optional, I would expect this to not happen. |
mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp | ||
---|---|---|
1763 | Yes, this is because of the fact that TiledLoopOpAdaptor returns a null attribute when there are no distributionTypes, while TiledLoopOp returns llvm::none. This is bad, so I'm trying to handle that case until I see how much work fixing this Adaptor vs Op inconsistency will be (as that will affect all code rather than being localized). The alternative is handling all call sites that currently exist, but that's more work/uglier and would only be temporary. |
mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp | ||
---|---|---|
1763 | In that case, maybe add a comment/TODO here that this is only temporary and when it will disappear? |
I've been somewhat convinced that this could lead to subtle bugs in the future, so we should leave it to the callers to handle this issue each time they want to build this op during dialect conversion, so I'm going to abandon this.
Is this a check for a nullptr? This seems dangerous, especially when distributionTypes is optional, I would expect this to not happen.