Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorRewriting.cpp | ||
---|---|---|
391 | I'm pretty sure that should be dstTp |
mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorRewriting.cpp | ||
---|---|---|
390–391 | I think it'd be cleaner to use SparseTensorType from the beginning, instead of having both RankedTensorType and SparseTensorType variants floating around. That's very easily doable by changing the first few lines of this method to: const auto srcTp = getSparseTensorType(srcTensor); const auto dstTp = getSparseTensorType(op.getResult()); if (!srcTp.hasEncoding() || !dstTp.hasEncoding()) return failure(); Since RankedTensorType supports all the helper methods of SparseTensorEncodingAttr, you shouldn't need the srcEnc/dstEnc variables anymore (can just use srcTp/dstTp instead). But if there are places where you need them, you can always: const auto srcEnc = srcTp.getEncoding(); const auto dstEnc = dstTp.getEndocing(); |
These comment doc needs some updating