Skip to content

Commit 3ac1fc4

Browse files
committed
remove print statements fix more int to size_t conversions
1 parent b48b3e2 commit 3ac1fc4

File tree

2 files changed

+9
-30
lines changed

2 files changed

+9
-30
lines changed

src/index_notation/index_notation.cpp

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1466,15 +1466,11 @@ map<IndexVar,Dimension> IndexStmt::getIndexVarDomains() const {
14661466
IndexStmt IndexStmt::concretizeScheduled(ProvenanceGraph provGraph, vector<IndexVar> forallIndexVarList) const {
14671467
IndexStmt stmt = *this;
14681468
string r;
1469-
cout << "Pre concretized stmt: " << stmt << endl;
14701469
if (isEinsumNotation(stmt, &r)) {
14711470
stmt = makeReductionNotationScheduled(stmt, provGraph);
1472-
cout << "Post Reduction Stmt: " << stmt << endl;
14731471
}
1474-
cout << r << endl;
14751472
if (isReductionNotationScheduled(stmt, provGraph, &r)) {
14761473
stmt = makeConcreteNotationScheduled(stmt, provGraph, forallIndexVarList);
1477-
cout << "Post Concretize Stmt: " << stmt << endl;
14781474
}
14791475
return stmt;
14801476
}
@@ -2851,23 +2847,6 @@ IndexStmt makeConcreteNotationScheduled(IndexStmt stmt, ProvenanceGraph provGrap
28512847
})
28522848
);
28532849

2854-
cout << "freeVars: ";
2855-
for (auto &i : freeVars) {
2856-
cout << i << ", ";
2857-
}
2858-
cout << endl;
2859-
2860-
cout << "rhsVars: ";
2861-
for (auto &i : rhsVars) {
2862-
cout << i << ", ";
2863-
}
2864-
cout << endl;
2865-
2866-
cout << "forallIndexVars: ";
2867-
for (auto &i : forallIndexVars) {
2868-
cout << i << ", ";
2869-
}
2870-
cout << endl;
28712850
// Emit the freeVars as foralls if the freeVars are fully derived
28722851
// else emit the fully derived descendant of the freeVar found in rhsVars
28732852
if (forallIndexVars.empty()) {

test/tests-workspaces.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ TEST(workspaces, precompute2D_add) {
213213
A(i, j) = precomputedExpr + D(i, j);
214214

215215
IndexStmt stmt = A.getAssignment().concretize();
216-
TensorVar ws("ws", Type(Float64, {N, N}), Format{Dense, Dense});
216+
TensorVar ws("ws", Type(Float64, {(size_t)N, (size_t)N}), Format{Dense, Dense});
217217
stmt = stmt.precompute(precomputedExpr, {i, j}, {i, j}, ws);
218218

219219
A.compile(stmt.concretize());
@@ -254,8 +254,8 @@ TEST(workspaces, precompute4D_add) {
254254

255255

256256
IndexStmt stmt = A.getAssignment().concretize();
257-
TensorVar ws1("ws1", Type(Float64, {N, N, N, N}), Format{Dense, Dense, Dense, Dense});
258-
TensorVar ws2("ws2", Type(Float64, {N, N, N, N}), Format{Dense, Dense, Dense, Dense});
257+
TensorVar ws1("ws1", Type(Float64, {(size_t)N, (size_t)N, (size_t)N, (size_t)N}), Format{Dense, Dense, Dense, Dense});
258+
TensorVar ws2("ws2", Type(Float64, {(size_t)N, (size_t)N, (size_t)N, (size_t)N}), Format{Dense, Dense, Dense, Dense});
259259
stmt = stmt.precompute(precomputedExpr, {i, j, k, l}, {i, j, k, l}, ws1)
260260
.precompute(ws1(i, j, k, l) + D(i, j, k, l), {i, j, k, l}, {i, j, k ,l}, ws2);
261261

@@ -296,8 +296,8 @@ TEST(workspaces, precompute4D_multireduce) {
296296

297297

298298
IndexStmt stmt = A.getAssignment().concretize();
299-
TensorVar ws1("ws1", Type(Float64, {N, N, N}), Format{Dense, Dense, Dense});
300-
TensorVar ws2("ws2", Type(Float64, {N, N}), Format{Dense, Dense});
299+
TensorVar ws1("ws1", Type(Float64, {(size_t)N, (size_t)N, (size_t)N}), Format{Dense, Dense, Dense});
300+
TensorVar ws2("ws2", Type(Float64, {(size_t)N, (size_t)N}), Format{Dense, Dense});
301301
stmt = stmt.precompute(precomputedExpr, {i, j, m}, {i, j, m}, ws1)
302302
.precompute(ws1(i, j, m) * D(m, n), {i, j}, {i, j}, ws2);
303303

@@ -336,7 +336,7 @@ TEST(workspaces, precompute3D_MspV) {
336336

337337

338338
IndexStmt stmt = A.getAssignment().concretize();
339-
TensorVar ws("ws", Type(Float64, {N, N, N}), Format{Dense, Dense, Dense});
339+
TensorVar ws("ws", Type(Float64, {(size_t)N, (size_t)N, (size_t)N}), Format{Dense, Dense, Dense});
340340
stmt = stmt.precompute(precomputedExpr, {i, j, k}, {i, j, k}, ws);
341341
stmt = stmt.concretize();
342342
cout << "----------STMT----------" << endl;
@@ -355,7 +355,7 @@ TEST(workspaces, precompute3D_MspV) {
355355
}
356356

357357
TEST(workspaces, precompute3D_multipleWS) {
358-
size_t N = 16;
358+
int N = 16;
359359
Tensor<double> A("A", {N, N}, Format{Dense, Dense});
360360
Tensor<double> B("B", {N, N, N, N}, Format{Dense, Dense, Dense, Dense});
361361
Tensor<double> c("c", {N}, Format{Sparse});
@@ -378,8 +378,8 @@ TEST(workspaces, precompute3D_multipleWS) {
378378

379379

380380
IndexStmt stmt = A.getAssignment().concretize();
381-
TensorVar ws("ws", Type(Float64, {N, N, N}), Format{Dense, Dense, Dense});
382-
TensorVar t("t", Type(Float64, {N, N}), Format{Dense, Dense});
381+
TensorVar ws("ws", Type(Float64, {(size_t)N, (size_t)N, (size_t)N}), Format{Dense, Dense, Dense});
382+
TensorVar t("t", Type(Float64, {(size_t) N, (size_t)N}), Format{Dense, Dense});
383383
cout << "----------STMT1----------" << endl;
384384
stmt = stmt.precompute(precomputedExpr, {i, j, k}, {i, j, k}, ws);
385385
cout << stmt << endl;

0 commit comments

Comments
 (0)