Skip to content

Commit

Permalink
Adds call to use inserTemporaries
Browse files Browse the repository at this point in the history
  • Loading branch information
fredrikbk committed May 30, 2019
1 parent 4f4ac27 commit f4408d9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/index_notation/transformations.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -654,7 +654,9 @@ static IndexStmt optimizeSpMM(IndexStmt stmt) {
}

// It's an SpMM statement so return an optimized SpMM statement
TensorVar w("w", Type(Float64, {Dimension()}), dense);
TensorVar w("w",
Type(Float64, {A.getType().getShape().getDimension(1)}),
dense);
return forall(i,
where(forall(j,
A(i,j) = w(j)),
Expand Down
1 change: 1 addition & 0 deletions src/tensor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,7 @@ void TensorBase::compile(bool assembleWhileCompute) {
IndexStmt stmt = makeConcrete(assignment);
string reason;
stmt = reorderLoopsTopologically(stmt);
stmt = insertTemporaries(stmt);
taco_uassert(stmt != IndexStmt()) << reason;
stmt = parallelizeOuterLoop(stmt);
content->assembleFunc = lower(stmt, "assemble", true, false);
Expand Down
1 change: 1 addition & 0 deletions tools/taco.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -817,6 +817,7 @@ int main(int argc, char* argv[]) {

string reason;
stmt = reorderLoopsTopologically(stmt);
stmt = insertTemporaries(stmt);
taco_uassert(stmt != IndexStmt()) << reason;
stmt = parallelizeOuterLoop(stmt);
compute = lower(stmt, "compute", false, true);
Expand Down

0 comments on commit f4408d9

Please sign in to comment.