A few more dots on the i's of the sparse vectorizer.
Also makes reduction matching less brittle.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
LGTM, nits below.
mlir/lib/Dialect/SparseTensor/Transforms/SparseVectorization.cpp | ||
---|---|---|
106 | Thanks for adding that! Do we have a verifier/assert for that? | |
146 | Nit: no else after return. | |
192 | Should we turn this into an assert? |
mlir/lib/Dialect/SparseTensor/Transforms/SparseVectorization.cpp | ||
---|---|---|
106 | I plan to add a few more checks in a follow up cl (that adds "index") | |
146 | You are right! This is one minor case where I disagree with style since for a chain of if-else with braces { } that form becomes so much longer. But one cannot argue with rules, so done ;-) | |
192 | no, assert is DEBUG only, unreachable is in PROD also |
mlir/lib/Dialect/SparseTensor/Transforms/SparseVectorization.cpp | ||
---|---|---|
146 |
+1 x) | |
192 | If we want to keep that in PROD, we should switch to something like emitError or other because llvm_unreachable can also be stripped with some cmake options. |
Thanks for adding that!
Do we have a verifier/assert for that?