Details
- Reviewers
aartbik - Commits
- rG180bf5f9403d: [mlir][sparse] fix a bug in sparse2sparse reshape.
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorConversion.cpp | ||
---|---|---|
567 | The reason why I change it to a template function is that I can use more meaningful op.getSrc() instead of op.getOperand()[0], but let me know if you prefer the previous one. |
mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorConversion.cpp | ||
---|---|---|
567 | I am fine with the template, looks cleaner. But as discussed offline, the fact you can change this without hitting a test change probably indicates we are missing a test case ;-) Please see if you can find one. |
mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorConversion.cpp | ||
---|---|---|
575 | note that this one sets the size to 0 for dynamic (used for new to simply verify that the static sizes are as expected), but for EmptyCOO that is not allowed so should we assert on the dynamic size then? | |
766 | yeah, much cleaner like this! |
mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorConversion.cpp | ||
---|---|---|
575 | Or assert on the dstTp before calling it? I am not sure whether 0 is chose for some special purposes in other converters. |
mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorConversion.cpp | ||
---|---|---|
575 | yeah, you don't have to change the util, but just check for static shape prior to using it |
The reason why I change it to a template function is that I can use more meaningful op.getSrc() instead of op.getOperand()[0], but let me know if you prefer the previous one.