Skip to content

Commit b8fc722

Browse files
committed
Fix type conversion between int to long and size_t
1 parent f63d440 commit b8fc722

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/index_notation/index_notation.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1538,7 +1538,7 @@ IndexStmt IndexStmt::precompute(IndexExpr expr, std::vector<IndexVar> i_vars,
15381538
// FIXME: need to re-enable this later
15391539
taco_uassert(i_vars.size() == iw_vars.size()) << "The precompute transformation requires"
15401540
<< "i_vars and iw_vars to be the same size";
1541-
for (int l = 0; l < i_vars.size(); l++) {
1541+
for (int l = 0; l < (int) i_vars.size(); l++) {
15421542
IndexVar i = i_vars.at(l);
15431543
IndexVar iw = iw_vars.at(l);
15441544

@@ -2417,14 +2417,14 @@ bool isReductionNotationScheduled(IndexStmt stmt, ProvenanceGraph provGraph, std
24172417
auto ancestors = provGraph.getUnderivedAncestors(var);
24182418
for (auto& ancestor: ancestors) {
24192419
if (boundVars.contains(ancestor)) {
2420-
return true;
2420+
isReduction = true;
24212421
}
24222422
}
24232423
} else {
24242424
auto descendants = provGraph.getFullyDerivedDescendants(var);
24252425
for (auto& descendant : descendants) {
24262426
if (boundVars.contains(descendant)) {
2427-
return true;
2427+
isReduction = true;
24282428
}
24292429
}
24302430
}

test/tests-scheduling-eval.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ IndexStmt scheduleMTTKRPCPU(IndexStmt stmt, Tensor<double> B, int CHUNK_SIZE=16,
165165
IndexExpr precomputeExpr = stmt.as<Forall>().getStmt().as<Forall>().getStmt()
166166
.as<Forall>().getStmt().as<Forall>().getStmt()
167167
.as<Assignment>().getRhs().as<Mul>().getA();
168-
TensorVar w("w", Type(Float64, {NUM_J}), taco::dense);
168+
TensorVar w("w", Type(Float64, {(size_t)NUM_J}), taco::dense);
169169

170170
stmt = stmt.split(i, i1, i2, CHUNK_SIZE)
171171
.reorder({i1, i2, k, l, j});

0 commit comments

Comments
 (0)