Depends On: D146052
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Note: This revision is separate from D146052 because it contains mostly cases where the exact type of the shaped value is known. I.e., in most cases we know whether a tensor.dim or a memref.dim should be generated. Going through reifyShapeDims saves a few lines of code each time, but it also goes through the interface method each time (which has some overhead). It's a tradeoff. Therefore, putting these change separately.
(We could still de-duplicate some parts of the code base a bit, even if we don't go the interface.)
LG for sparse with one nit
mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorRewriting.cpp | ||
---|---|---|
121 | please use for (int64_t dim = 0, rank = getRank(); dim < rank; ++dim) idiom we always use in sparse compiler module |
mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorRewriting.cpp | ||
---|---|---|
121 | If you like functional style, you also have: for (int64_t dim : llvm::seq(0, getRank())) :) |
This looks good to me. I am approving this change. I dont have comments on the depedent patch though. If that is good, this is good for me.
please use
idiom we always use in sparse compiler module