Skip to content

Commit 46aed13

Browse files
committed
Checks if first mode of last tensor has locate for spmm transform
1 parent 2eb298e commit 46aed13

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/index_notation/transformations.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1123,7 +1123,7 @@ static IndexStmt optimizeSpMM(IndexStmt stmt) {
11231123
// We need random access into the first mode or this tensor in order to perform a linear combination of rows
11241124
// algorithm. (I think?)
11251125
TensorVar C = Caccess.getTensorVar();
1126-
if (C.getFormat().getModeFormats()[0].getName() == "compressed" ||
1126+
if (!C.getFormat().getModeFormats()[0].hasLocate() ||
11271127
C.getFormat().getModeOrdering()[0] != 0 ||
11281128
C.getFormat().getModeOrdering()[1] != 1) {
11291129
return stmt;

0 commit comments

Comments
 (0)