@@ -114,12 +114,15 @@ std::unique_ptr<TensorReferenceGroup> TensorReferenceGroup::makeSingleton(
114
114
return group;
115
115
}
116
116
117
- isl::map TensorReferenceGroup::approximateScopedAccesses () const {
117
+ isl::Map<Scope, Tensor> TensorReferenceGroup::approximateScopedAccesses ()
118
+ const {
118
119
auto scopedDomain = scopedAccesses ().domain ();
119
120
auto space = approximation.box .get_space ();
120
- auto accessed = isl::map::universe (space).intersect_domain (scopedDomain);
121
+ auto accessed =
122
+ isl::Map<Scope, Tensor>::universe (space).intersect_domain (scopedDomain);
121
123
122
- auto identity = isl::multi_aff::identity (space.range ().map_from_set ());
124
+ auto identity =
125
+ isl::MultiAff<Tensor, Tensor>::identity (space.range ().map_from_set ());
123
126
for (size_t i = 0 ; i < approximation.dim (); ++i) {
124
127
auto offset = approximation.lowerBound (i);
125
128
auto stride = approximation.stride (i);
@@ -128,8 +131,8 @@ isl::map TensorReferenceGroup::approximateScopedAccesses() const {
128
131
auto rhs = identity.get_aff (i);
129
132
auto lowerBound = offset * stride + strideOffset;
130
133
auto upperBound = (offset + size) * stride + strideOffset;
131
- auto partial =
132
- ( isl::aff_map (lowerBound) <= rhs) & ( isl::aff_map (upperBound) > rhs );
134
+ auto partial = lowerBound. asPwAff (). lt_map ((rhs + 1 ). asPwAff ()) &
135
+ upperBound. asPwAff (). gt_map ( rhs. asPwAff () );
133
136
134
137
accessed = accessed & partial;
135
138
}
@@ -525,9 +528,9 @@ ScheduleTree* insertCopiesUnder(
525
528
auto arrayId = promotionSpace.domain ().unwrap ().get_map_range_tuple_id ();
526
529
auto approximatedRead =
527
530
group.approximateScopedAccesses ().intersect_range (tensorElements).wrap ();
528
- approximatedRead = approximatedRead.product (promotedFootprint);
531
+ auto product = approximatedRead.product (promotedFootprint);
529
532
auto readExtension =
530
- extension.intersect_range (approximatedRead ).set_range_tuple_id (readId);
533
+ extension.intersect_range (product ).set_range_tuple_id (readId);
531
534
auto writtenElements = group.scopedWrites ()
532
535
.intersect_range (tensorElements)
533
536
.wrap ()
0 commit comments