This repository was archived by the owner on Apr 28, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +13
-15
lines changed Expand file tree Collapse file tree 2 files changed +13
-15
lines changed Original file line number Diff line number Diff line change @@ -617,7 +617,6 @@ void promoteToRegistersBelowThreads(
617
617
// per-thread-group access relations.
618
618
auto points = activeDomainPoints (root, band);
619
619
auto partialSched = partialSchedule (root, band);
620
- auto activeStmts = activeStatements (root, band);
621
620
622
621
size_t nMappedThreads = 0 ;
623
622
for (int j = 0 ; j < points.dim (isl::dim_type::param); ++j) {
@@ -666,7 +665,6 @@ void promoteToRegistersBelowThreads(
666
665
tensorId,
667
666
std::move (group),
668
667
band,
669
- activeStmts,
670
668
partialSched);
671
669
}
672
670
}
Original file line number Diff line number Diff line change @@ -188,19 +188,19 @@ void Scop::promoteGroup(
188
188
bool forceLastExtentOdd) {
189
189
auto activePoints = activeDomainPoints (scheduleRoot (), tree);
190
190
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 ;
204
204
}
205
205
}
206
206
You can’t perform that action at this time.
0 commit comments