[Mlir-commits] [mlir] [mlir][linalg] Emit a warning when tile_using_forall generates non thread-safe code (PR #80813)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Thu Mar 21 09:34:28 PDT 2024
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff 60732c0fae56829c5475091de678ad46f0ce6287 903e883c316e44cd3361408b2580e667f8bba9cf -- mlir/lib/Dialect/Linalg/Transforms/Tiling.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/mlir/lib/Dialect/Linalg/Transforms/Tiling.cpp b/mlir/lib/Dialect/Linalg/Transforms/Tiling.cpp
index 19a74b15c9..462f692615 100644
--- a/mlir/lib/Dialect/Linalg/Transforms/Tiling.cpp
+++ b/mlir/lib/Dialect/Linalg/Transforms/Tiling.cpp
@@ -371,8 +371,8 @@ static FailureOr<ForallTilingResult> tileToForallOpImpl(
LinalgOp linalgOp = dyn_cast<LinalgOp>(op.getOperation());
if (linalgOp) {
// Check if tiling is thread safe and print a warning if not.
- SmallVector<bool> tilingSafety = safeToTileToForall(
- b.getContext(), linalgOp, numThreads);
+ SmallVector<bool> tilingSafety =
+ safeToTileToForall(b.getContext(), linalgOp, numThreads);
for (size_t i = 0; i < tilingSafety.size(); i++)
if (!tilingSafety[i])
op.emitWarning() << "tiling is not thread safe at axis #" << i;
``````````
</details>
https://github.com/llvm/llvm-project/pull/80813
More information about the Mlir-commits
mailing list