Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -710,6 +710,8 @@ struct SparseSortCOOConverter : public OpConversionPattern<ConvertOp> {

// Otherwise we need another data shuffle and a non-identity map.
assert(dstStt.hasSameDimToLvl(srcStt));
(void)dstStt; // to silence warning when assertion is disabled

auto id = AffineMap::getMultiDimIdentityMap(srcStt.getLvlRank(), ctx);

rewriter.create<SortOp>(loc, nnz, crd, ValueRange{val}, id,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ struct StageUnorderedConvert : public OpRewritePattern<ConvertOp> {
// source -> coo
// The tmp COO must be unordered, otherwise it is a direct conversion.
assert(!(srcStt.hasSameDimToLvl(dstStt) && srcStt.isAllOrdered()));
(void)srcStt; // to silence warning when assertion is disabled

Type srcCOOTp = getCOOFromTypeWithOrdering(
dstStt.getRankedTensorType(), dstStt.getDimToLvl(), /*ordered=*/false);
Value srcCOO = rewriter.create<ConvertOp>(loc, srcCOOTp, op.getSource());
Expand Down