Skip to content

Commit a5d0ef4

Browse files
author
Peiming Liu
committed
address comments
1 parent d91da20 commit a5d0ef4

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

mlir/lib/Dialect/SparseTensor/Transforms/SparseIterationToScf.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ static std::optional<LogicalResult>
3838
convertIteratorType(IteratorType itTp, SmallVectorImpl<Type> &fields) {
3939
// The actually Iterator Values (that are updated every iteration).
4040
auto idxTp = IndexType::get(itTp.getContext());
41-
// TODO: This assumes there is no batch dimenstion in the sparse tensor.
41+
// TODO: handle batch dimension.
42+
assert(itTp.getEncoding().getBatchLvlRank() == 0);
4243
if (!itTp.isUnique()) {
4344
// Segment high for non-unqiue iterator.
4445
fields.push_back(idxTp);
@@ -77,7 +78,8 @@ class SparseIterateOpConverter : public OneToNOpConversionPattern<IterateOp> {
7778
matchAndRewrite(IterateOp op, OpAdaptor adaptor,
7879
OneToNPatternRewriter &rewriter) const override {
7980
if (!op.getCrdUsedLvls().empty())
80-
llvm_unreachable("Not implemented.");
81+
return rewriter.notifyMatchFailure(
82+
op, "non-empty coordinates list not implemented.");
8183

8284
Location loc = op.getLoc();
8385

0 commit comments

Comments
 (0)