Skip to content
This repository was archived by the owner on Apr 28, 2023. It is now read-only.

Commit 758ad94

Browse files
author
Sven Verdoolaege
committed
PolyhedralMapperTest: map to threads in the same way as TC mapper does
The TC mapper was changed in 497d3c4 (complete thread mapping in a single band, Thu Apr 12 10:00:09 2018 +0200) to only perform thread mapping on a single band. The test should do the same. This will allow the mapping to threads to be shared over all users in a subsequent commit.
1 parent 1349565 commit 758ad94

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

test/test_cuda_mapper.cc

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ struct PolyhedralMapperTest : public ::testing::Test {
8989
USING_MAPPING_SHORT_NAMES(BX, BY, BZ, TX, TY, TZ);
9090
auto ns = detail::ScheduleTree::collectDFSPostorder(
9191
root, detail::ScheduleTreeType::Band);
92-
mscop->map(ns[0], 0, TX);
92+
mscop->map(ns[1], 1, TX);
9393
mscop->map(ns[1], 0, TY);
9494
mscop->insertMappingContext();
9595
return mscop;
@@ -316,11 +316,9 @@ constexpr auto kExpectedMatmul_64_64_64 =
316316
for (int c0 = 0; c0 <= 63; c0 += 16) {
317317
for (int c1 = 0; c1 <= 63; c1 += 16) {
318318
for (int c2 = t1; c2 <= 15; c2 += 8) {
319-
for (int c3 = 0; c3 <= 15; c3 += 1) {
320-
O[(c0 + c2)][(c1 + c3)] = 0.000000f;
321-
for (int c4 = t0; c4 <= 63; c4 += 32) {
322-
O[(c0 + c2)][(c1 + c3)] = (O[(c0 + c2)][(c1 + c3)] + (A[(c0 + c2)][c4]*B[c4][(c1 + c3)]));
323-
}
319+
O[(c0 + c2)][(t0 + c1)] = 0.000000f;
320+
for (int c4 = 0; c4 <= 63; c4 += 1) {
321+
O[(c0 + c2)][(t0 + c1)] = (O[(c0 + c2)][(t0 + c1)] + (A[(c0 + c2)][c4]*B[c4][(t0 + c1)]));
324322
}
325323
}
326324
}
@@ -369,7 +367,7 @@ TEST_F(PolyhedralMapperTest, Match1) {
369367
filter([](isl::union_set f) {
370368
return f.get_space().dim(isl::dim_type::param) == 3;
371369
}),
372-
filter(mapping_filter(band()))),
370+
filter(band())),
373371
schedule);
374372
EXPECT_EQ(1u, f.size());
375373
}

0 commit comments

Comments
 (0)