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

Commit 9bc96e8

Browse files
Merge pull request #532 from facebookresearch/pr/clean_up
assorted clean-ups
2 parents 95b5afd + 221fa20 commit 9bc96e8

File tree

5 files changed

+8
-33
lines changed

5 files changed

+8
-33
lines changed

tc/core/islpp_wrap.h

Lines changed: 0 additions & 25 deletions
This file was deleted.

tc/core/polyhedral/cuda/codegen.cc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
#include "tc/core/check.h"
2424
#include "tc/core/cuda/cuda_libraries.h"
2525
#include "tc/core/flags.h"
26-
#include "tc/core/islpp_wrap.h"
2726
#include "tc/core/polyhedral/codegen.h"
2827
#include "tc/core/polyhedral/cuda/codegen.h"
2928
#include "tc/core/polyhedral/cuda/mapping_types.h"

tc/core/polyhedral/cuda/memory_promotion_heuristic.cc

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -421,15 +421,14 @@ bool isPromotableToRegistersBelow(
421421
const detail::ScheduleTree* scope,
422422
isl::multi_union_pw_aff outer,
423423
isl::multi_union_pw_aff thread) {
424-
auto originalAccesses = group.originalAccesses();
425-
426424
if (!accessSubscriptsAreUnrolledLoops(
427425
group, root, scope, outer.flat_range_product(thread))) {
428426
return false;
429427
}
430428

429+
auto originalAccesses = group.originalAccesses();
431430
auto map = isl::union_map::from(outer);
432-
map = map.range_product(group.originalAccesses());
431+
map = map.range_product(originalAccesses);
433432
map = map.apply_domain(isl::union_map::from(thread));
434433

435434
return map.is_injective();

tc/core/polyhedral/schedule_transforms.cc

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,14 +73,17 @@ isl::union_map partialScheduleImpl(
7373
const ScheduleTree* root,
7474
const ScheduleTree* node,
7575
bool useNode) {
76-
auto schedule = isl::null<isl::union_map>();
7776
auto nodes = node->ancestors(root);
7877
if (useNode) {
7978
nodes.push_back(node);
8079
}
80+
TC_CHECK_GT(nodes.size(), 0u) << "root node does not have a prefix schedule";
81+
auto domain = root->elemAs<ScheduleTreeElemDomain>();
82+
TC_CHECK(domain);
83+
auto schedule = isl::union_map::from_domain(domain->domain_);
8184
for (auto anc : nodes) {
82-
if (auto domainElem = anc->elemAs<ScheduleTreeElemDomain>()) {
83-
schedule = isl::union_map::from_domain(domainElem->domain_);
85+
if (anc->elemAs<ScheduleTreeElemDomain>()) {
86+
TC_CHECK(anc == root);
8487
} else {
8588
schedule = extendSchedule(anc, schedule);
8689
}

tc/external/detail/islpp.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
#include <isl/cpp.h>
2828

2929
#include "tc/core/check.h"
30-
#include "tc/core/islpp_wrap.h"
3130

3231
namespace isl {
3332

0 commit comments

Comments
 (0)