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

Commit 5b95adb

Browse files
committed
partialScheduleMupa: do not assume the given node is a band
The original implementation assumed that the given node is a band and used a CHECK macro to enforce that. In practice, it may be useful to call partialScheduleMupa to obtain the partial schedule including the schedule of the current node if it is a band, and the prefix schedule otherwise. Replace the CHECK by an early return of the result of prefixScheduleMupa.
1 parent 3e2da9c commit 5b95adb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tc/core/polyhedral/schedule_transforms.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -486,9 +486,9 @@ isl::multi_union_pw_aff prefixScheduleMupa(
486486
isl::multi_union_pw_aff partialScheduleMupa(
487487
const detail::ScheduleTree* root,
488488
const detail::ScheduleTree* tree) {
489+
auto prefix = prefixScheduleMupa(root, tree);
489490
auto band = tree->elemAs<ScheduleTreeElemBand>();
490-
TC_CHECK(band);
491-
return prefixScheduleMupa(root, tree).flat_range_product(band->mupa_);
491+
return band ? prefix.flat_range_product(band->mupa_) : prefix;
492492
}
493493

494494
void updateTopLevelContext(detail::ScheduleTree* root, isl::set context) {

0 commit comments

Comments
 (0)