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

Commit e3c26cb

Browse files
committed
memory_promotion_heuristic.cc: drop fullSchedule
The last use of this function was removed in the previous commit. The function itself is dangerous because of its misleading name: it ignores sequence and set nodes making the caller believe statement instances separated by the sequence/set are scheduled to the same logical date. It was never intended to be used outside the memory promotion heuristic. Drop it.
1 parent a2aecd3 commit e3c26cb

File tree

1 file changed

+0
-54
lines changed

1 file changed

+0
-54
lines changed

tc/core/polyhedral/cuda/memory_promotion_heuristic.cc

Lines changed: 0 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -132,60 +132,6 @@ std::vector<T> collectBranchMarkers(T root, T node) {
132132
return findThreadSpecificMarkers(node);
133133
}
134134

135-
/*
136-
* Transform schedule bands into a union_map.
137-
* Takes all partial schedules at leaves as MUPAs (without accounting for
138-
* intermediate non-band nodes), intersects
139-
* their domain with the filters between the root and the
140-
* current leaves and transforms them into union maps.
141-
* Mapping filters are ignored.
142-
*/
143-
isl::union_map fullSchedule(const detail::ScheduleTree* root) {
144-
using namespace tc::polyhedral::detail;
145-
146-
if (!root->as<ScheduleTreeDomain>()) {
147-
throw promotion::PromotionLogicError("expected root to be a domain node");
148-
}
149-
150-
std::function<bool(const ScheduleTree* tree)> isLeaf =
151-
[](const ScheduleTree* tree) { return tree->numChildren() == 0; };
152-
153-
// Find all innermost nodes.
154-
auto leaves = functional::Filter(isLeaf, ScheduleTree::collect(root));
155-
156-
// Take a union of partial schedules of the innermost nodes. Because they
157-
// are innermost, the partial schedule can no longer be affected by deeper
158-
// nodes and hence is full.
159-
auto schedule = isl::union_map::empty(
160-
root->as<ScheduleTreeDomain>()->domain_.get_space());
161-
for (auto node : leaves) {
162-
auto domain = root->as<ScheduleTreeDomain>()->domain_;
163-
auto prefixMupa = prefixScheduleMupa(root, node);
164-
if (auto band = node->as<ScheduleTreeBand>()) {
165-
prefixMupa = prefixMupa.flat_range_product(band->mupa_);
166-
}
167-
168-
auto pathToRoot = node->ancestors(root);
169-
pathToRoot.push_back(node);
170-
for (auto n : pathToRoot) {
171-
if (auto filterNode = n->as<ScheduleTreeFilter>()) {
172-
domain = domain.intersect(filterNode->filter_);
173-
}
174-
}
175-
176-
prefixMupa = prefixMupa.intersect_domain(domain);
177-
178-
schedule = schedule.unite(isl::union_map::from(prefixMupa));
179-
if (!schedule.is_single_valued()) {
180-
std::stringstream ss;
181-
ss << "schedules must be single-valued " << schedule << std::endl
182-
<< *root;
183-
throw promotion::PromotionLogicError(ss.str());
184-
}
185-
}
186-
return schedule;
187-
}
188-
189135
/*
190136
* Check if a reference group features reuse within the "outer" schedule.
191137
* In particular, check that for some given point in the outer schedule and

0 commit comments

Comments
 (0)