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

Commit 49200ae

Browse files
committed
private memory: don't use statement ids
1 parent dfe48ca commit 49200ae

File tree

2 files changed

+13
-15
lines changed

2 files changed

+13
-15
lines changed

src/core/polyhedral/memory_promotion_heuristic.cc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -617,7 +617,6 @@ void promoteToRegistersBelowThreads(
617617
// per-thread-group access relations.
618618
auto points = activeDomainPoints(root, band);
619619
auto partialSched = partialSchedule(root, band);
620-
auto activeStmts = activeStatements(root, band);
621620

622621
size_t nMappedThreads = 0;
623622
for (int j = 0; j < points.dim(isl::dim_type::param); ++j) {
@@ -666,7 +665,6 @@ void promoteToRegistersBelowThreads(
666665
tensorId,
667666
std::move(group),
668667
band,
669-
activeStmts,
670668
partialSched);
671669
}
672670
}

src/core/polyhedral/scop.cc

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -188,19 +188,19 @@ void Scop::promoteGroup(
188188
bool forceLastExtentOdd) {
189189
auto activePoints = activeDomainPoints(scheduleRoot(), tree);
190190

191-
for (const auto& id : activeStmts) {
192-
for (const auto& prom : activePromotions_[id]) {
193-
if (promotedDecls_.count(prom.groupId) != 0 &&
194-
promotedDecls_[prom.groupId].tensorId == tensorId) {
195-
// FIXME: allow double promotion if copies are inserted properly,
196-
// in particular if the new promotion is strictly smaller in scope
197-
// and size than the existing ones (otherwise we would need to find
198-
// the all the existing ones and change their copy relations).
199-
std::cerr << "FIXME: not promoting because another promotion of tensor "
200-
<< promotedDecls_[prom.groupId].tensorId << " is active in "
201-
<< id << std::endl;
202-
return;
203-
}
191+
for (const auto& kvp : activePromotions_) {
192+
if (kvp.first.intersect(activePoints).is_empty()) {
193+
continue;
194+
}
195+
196+
auto groupId = kvp.second.groupId;
197+
if (promotedDecls_.count(groupId) != 0 &&
198+
promotedDecls_[groupId].tensorId == tensorId) {
199+
// FIXME: allow double promotion if copies are inserted properly,
200+
// in particular if the new promotion is strictly smaller in scope
201+
// and size than the existing ones (otherwise we would need to find
202+
// the all the existing ones and change their copy relations).
203+
return;
204204
}
205205
}
206206

0 commit comments

Comments
 (0)