Arbitrary shifts have some complications, but shift by invariants
(viz. tensor index exp only at left hand side) can be easily
handled with the conjunctive rule.
Details
- Reviewers
gussmith23 bixia penpornk - Commits
- rG2b6e433230ab: [mlir][sparse] add shift ops support
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
This looks good -- I have some minor comments, do with them what you will!
mlir/lib/Dialect/SparseTensor/Utils/Merger.cpp | ||
---|---|---|
211–214 | Are c and inv in these comments referencing the same thing? An invariant? Mostly just wondering if we should use the same symbol for both. | |
238 | Is this tested anywhere? I can't help but think the new way of storing the op symbols may lead to a bug someday (if you forget to add a symbol for a new op, for example). |
mlir/lib/Dialect/SparseTensor/Utils/Merger.cpp | ||
---|---|---|
211–214 | For divs, it is really a nonzero const, and for shifts, any invariant. Hence, this difference. I will add some asserts in a follow up CL to make sure we keep that property. | |
238 | Agreed. I will do a follow up CL that adds a unit test + some asserts on this. |
Are c and inv in these comments referencing the same thing? An invariant? Mostly just wondering if we should use the same symbol for both.