[Mlir-commits] [mlir] [mlir][affine][gpu] support unroll dynamic value and apply it to gpu.thread_id op (PR #128113)
Uday Bondhugula
llvmlistbot at llvm.org
Sun Feb 23 20:21:55 PST 2025
================
@@ -117,7 +118,8 @@ static void replaceIterArgsAndYieldResults(AffineForOp forOp) {
/// was known to have a single iteration.
LogicalResult mlir::affine::promoteIfSingleIteration(AffineForOp forOp) {
std::optional<uint64_t> tripCount = getConstantTripCount(forOp);
- if (!tripCount || *tripCount != 1)
+ std::optional<uint64_t> maxTripCount = getMaxConstantTripCount(forOp);
+ if (!tripCount || *tripCount != 1 || !maxTripCount || *maxTripCount != 1)
----------------
bondhugula wrote:
This logic doesn't seem to make sense to me. If `tripCount` itlself is already one, why are you checking for max trip count not being found or not being one? It has to be one.
https://github.com/llvm/llvm-project/pull/128113
More information about the Mlir-commits
mailing list