[all-commits] [llvm/llvm-project] 2bff9d: [mlir] Don't hoist transfers from potentially zero...
Max191 via All-commits
all-commits at lists.llvm.org
Fri Oct 18 13:11:42 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 2bff9d9ffe3a4813961c1cf3af2e9ac5a20190bd
https://github.com/llvm/llvm-project/commit/2bff9d9ffe3a4813961c1cf3af2e9ac5a20190bd
Author: Max191 <44243577+Max191 at users.noreply.github.com>
Date: 2024-10-18 (Fri, 18 Oct 2024)
Changed paths:
M mlir/include/mlir/Dialect/Linalg/TransformOps/LinalgTransformOps.td
M mlir/include/mlir/Dialect/Linalg/Transforms/Hoisting.h
M mlir/lib/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp
M mlir/lib/Dialect/Linalg/Transforms/Hoisting.cpp
M mlir/test/Dialect/Linalg/hoisting.mlir
Log Message:
-----------
[mlir] Don't hoist transfers from potentially zero trip loops (#112752)
The hoistRedundantVectorTransfers function does not verification of loop
bounds when hoisting vector transfers. This is not safe in general,
since it is possible that the loop will have zero trip count. This PR
uses ValueBounds to verify that the lower bound is less than the upper
bound of the loop before hoisting. Trip count verification is currently
behind an option `verifyNonZeroTrip`, which is false by default.
Zero trip count loops can arise in GPU code generation, where a loop
bound can be dependent on a thread id. If not all threads execute the
loop body, then hoisting out of the loop can cause these threads to
execute the transfers when they are not supposed to.
---------
Signed-off-by: Max Dawkins <max.dawkins at gmail.com>
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list