[Mlir-commits] [mlir] [mlir][scf] Implement conversion from scf.forall to scf.parallel (PR #94109)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Sat Jun 1 05:38:56 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 2db190fda609b4df3aa0bf17336ab64bc15f6115 163f4638c72027d262277a331021e5f73fd31321 -- mlir/lib/Dialect/SCF/Transforms/ForallToParallel.cpp mlir/include/mlir/Dialect/SCF/Transforms/Passes.h mlir/include/mlir/Dialect/SCF/Transforms/Transforms.h mlir/lib/Conversion/SCFToControlFlow/SCFToControlFlow.cpp mlir/lib/Dialect/SCF/TransformOps/SCFTransformOps.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/mlir/include/mlir/Dialect/SCF/Transforms/Transforms.h b/mlir/include/mlir/Dialect/SCF/Transforms/Transforms.h
index 02ad7ab135..186331738d 100644
--- a/mlir/include/mlir/Dialect/SCF/Transforms/Transforms.h
+++ b/mlir/include/mlir/Dialect/SCF/Transforms/Transforms.h
@@ -41,8 +41,7 @@ LogicalResult forallToForLoop(RewriterBase &rewriter, ForallOp forallOp,
/// Try converting scf.forall into an scf.parallel loop.
/// The conversion is only supported for forall operations with no results.
-LogicalResult forallToParallelLoop(RewriterBase &rewriter,
- ForallOp forallOp,
+LogicalResult forallToParallelLoop(RewriterBase &rewriter, ForallOp forallOp,
ParallelOp *result = nullptr);
/// Fuses all adjacent scf.parallel operations with identical bounds and step
diff --git a/mlir/lib/Dialect/SCF/TransformOps/SCFTransformOps.cpp b/mlir/lib/Dialect/SCF/TransformOps/SCFTransformOps.cpp
index 7bdf3ac1d6..30699ecdde 100644
--- a/mlir/lib/Dialect/SCF/TransformOps/SCFTransformOps.cpp
+++ b/mlir/lib/Dialect/SCF/TransformOps/SCFTransformOps.cpp
@@ -133,8 +133,8 @@ transform::ForallToParallelOp::apply(transform::TransformRewriter &rewriter,
scf::ParallelOp opResult;
if (failed(scf::forallToParallelLoop(rewriter, target, &opResult))) {
- DiagnosedSilenceableFailure diag = emitSilenceableError()
- << "failed to convert forall into parallel";
+ DiagnosedSilenceableFailure diag =
+ emitSilenceableError() << "failed to convert forall into parallel";
return diag;
}
diff --git a/mlir/lib/Dialect/SCF/Transforms/ForallToParallel.cpp b/mlir/lib/Dialect/SCF/Transforms/ForallToParallel.cpp
index 8882d08363..37ded4e2e3 100644
--- a/mlir/lib/Dialect/SCF/Transforms/ForallToParallel.cpp
+++ b/mlir/lib/Dialect/SCF/Transforms/ForallToParallel.cpp
@@ -10,7 +10,6 @@
//
//===----------------------------------------------------------------------===//
-
#include "mlir/Dialect/SCF/IR/SCF.h"
#include "mlir/Dialect/SCF/Transforms/Passes.h"
#include "mlir/Dialect/SCF/Transforms/Transforms.h"
``````````
</details>
https://github.com/llvm/llvm-project/pull/94109
More information about the Mlir-commits
mailing list