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

Commit 19ea5c1

Browse files
author
Sven Verdoolaege
committed
MappedScop::mapToThreads: split band after part mapped to threads
This will allow a marker to be introduced immediately below the innermost band member mapped to threads.
1 parent fadace1 commit 19ea5c1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tc/core/polyhedral/cuda/mapped_scop.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,10 @@ size_t MappedScop::mapToThreads(detail::ScheduleTree* band) {
341341
auto nMappedThreads =
342342
std::min(numThreads.view.size(), static_cast<size_t>(nCanMap));
343343

344+
if (nCanMap < bandNode->nMember()) {
345+
bandSplit(scop_->scheduleRoot(), band, nCanMap);
346+
}
347+
344348
CHECK_GT(nMappedThreads, 0) << "not mapping to threads";
345349
CHECK_LE(nMappedThreads, 3) << "mapping to too many threads";
346350

0 commit comments

Comments
 (0)