Note that by sparse compiler convention, dense output
is zerod out when not set, so complement results in
zeros where elements were present.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
mlir/lib/Dialect/SparseTensor/Transforms/Sparsification.cpp | ||
---|---|---|
1067–1068 | Even though it'd make the diff larger, I think it'd be a lot clearer to invert this conditional. That way we'd have if (isSparseOut) { if (kind != kSelect) { genInsertionStore; return; } ...everything_else; return; } which helps "resolve" the conditional right away so the reader doesn't have to keep it pending in the back of their mind while reading that long everything_else part. |
Even though it'd make the diff larger, I think it'd be a lot clearer to invert this conditional. That way we'd have if (isSparseOut) { if (kind != kSelect) { genInsertionStore; return; } ...everything_else; return; } which helps "resolve" the conditional right away so the reader doesn't have to keep it pending in the back of their mind while reading that long everything_else part.