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

Commit e8d5082

Browse files
author
Sven Verdoolaege
committed
MappedScop::reductionMapSchedule: always map all thread identifiers
A reduction is always mapped to all thread identifiers. MappedScop::detectReductions will therefore not detect a band as a reduction if it does not have a sufficient number of (coincident) members. numThreads.view.size() is therefore never greater than reductionDim + 1. Taking the minimum (introduced in 88764d3 (split out reduction band after thread mapping to remove nested mapping, Mon Apr 9 17:43:18 2018 +0200)), is therefore not needed and in fact only causes confusion.
1 parent 4823738 commit e8d5082

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tc/core/polyhedral/cuda/mapped_scop.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ isl::multi_union_pw_aff MappedScop::reductionMapSchedule(
299299
auto reductionSchedule = reductionBand->mupa_;
300300
auto nMember = reductionBand->nMember();
301301
auto reductionDim = reductionBand->nOuterCoincident();
302-
auto nMappedThreads = std::min(numThreads.view.size(), reductionDim + 1);
302+
auto nMappedThreads = numThreads.view.size();
303303
TC_CHECK_GE(nMember, reductionDim);
304304
reductionSchedule = reductionSchedule.drop_dims(
305305
isl::dim_type::set, reductionDim + 1, nMember - (reductionDim + 1));

0 commit comments

Comments
 (0)