@@ -316,18 +316,17 @@ bool isCoalesced(
316
316
/*
317
317
* Check if the given "group" can be promoted to registers for the given active
318
318
* domain points under full "schedule" where "nThreads" consecutive dimensions
319
- * are mapped to threads (the innermost of them being mapped to thread x) and
320
- * the depth of this mapping can be obtained from threadIdxXScheduleDepthState .
319
+ * at "depth"
320
+ * are mapped to threads ( the innermost of them being mapped to thread x) .
321
321
*
322
322
* In particular, the group's footprint must contain only one element and the
323
323
* same tensor element should never be accessed by two different threads.
324
324
*/
325
325
bool isPromotableToRegisterBelowThreads (
326
- const ThreadIdxXScheduleDepthState& threadIdxXScheduleDepthState,
327
326
const TensorReferenceGroup& group,
328
327
isl::union_map schedule,
329
- size_t nThreads ,
330
- isl::union_set activePoints ) {
328
+ size_t depth ,
329
+ size_t nThreads ) {
331
330
auto originalAccesses = group.originalAccesses ();
332
331
333
332
// Return early if more than one element needs to be stored in registers.
@@ -340,14 +339,6 @@ bool isPromotableToRegisterBelowThreads(
340
339
return false ;
341
340
}
342
341
343
- // Since this function is only supposed to be called on groups seen _below_
344
- // thread mapping, all refs in the group must all have the same thread-x
345
- // depth.
346
- auto depth = 1 +
347
- computeThreadIdxXScheduleDepth (
348
- threadIdxXScheduleDepthState,
349
- originalAccesses.domain ().intersect (activePoints));
350
-
351
342
auto scheduledAccesses = originalAccesses.apply_domain (schedule);
352
343
353
344
// Scheduled accesses contain maps from schedule dimensions to tensor
@@ -635,11 +626,7 @@ void promoteToRegistersBelowThreads(
635
626
continue ;
636
627
}
637
628
if (!isPromotableToRegisterBelowThreads (
638
- threadIdxXScheduleDepthState,
639
- *group,
640
- fullSched,
641
- nMappedThreads,
642
- points)) {
629
+ *group, fullSched, depth, nMappedThreads)) {
643
630
continue ;
644
631
}
645
632
if (!hasReuseWithin (*group, partialSchedMupa)) {
0 commit comments