[mlir][sparse] extend unpack operation to support unpacking a batched COO type

Reviewed By: aartbik

Differential Revision: https://reviews.llvm.org/D149103
This commit is contained in:
Peiming Liu
2023-04-21 20:06:36 +00:00
parent f9fbda7102
commit d4db528938
13 changed files with 393 additions and 125 deletions

View File

@@ -719,7 +719,11 @@ LogicalResult UnpackOp::verify() {
const auto coordinatesTp = getRankedTensorType(getCoordinates());
const auto srcTp = getSparseTensorType(getTensor());
return verifyPackUnPack(*this, false, srcTp, valuesTp, coordinatesTp,
nullptr);
getBatchedLvlsAttr());
}
unsigned UnpackOp::getNumBatchedLvls() {
return getBatchedLvls().has_value() ? getBatchedLvls()->getZExtValue() : 0;
}
LogicalResult ConvertOp::verify() {