[flang-commits] [flang] [flang][cuda] Lower cluster_dims values (PR #81636)
via flang-commits
flang-commits at lists.llvm.org
Tue Feb 13 09:45:48 PST 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 d79c3c50c45f2bd0acc0269dbedde9ddeed2d50e 2377c27c3940660da1d2c766d853fc051fc61f86 -- flang/include/flang/Optimizer/Dialect/FIROpsSupport.h flang/lib/Lower/CallInterface.cpp flang/lib/Optimizer/Dialect/FIRAttr.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/flang/lib/Lower/CallInterface.cpp b/flang/lib/Lower/CallInterface.cpp
index 6c71e88430..6b71aabf7f 100644
--- a/flang/lib/Lower/CallInterface.cpp
+++ b/flang/lib/Lower/CallInterface.cpp
@@ -560,12 +560,16 @@ setCUDAAttributes(mlir::func::FuncOp func,
if (!details->cudaClusterDims().empty()) {
assert(details->cudaClusterDims().size() == 3 && "expect 3 values");
- auto xAttr = mlir::IntegerAttr::get(i64Ty, details->cudaClusterDims()[0]);
- auto yAttr = mlir::IntegerAttr::get(i64Ty, details->cudaClusterDims()[1]);
- auto zAttr = mlir::IntegerAttr::get(i64Ty, details->cudaClusterDims()[2]);
+ auto xAttr =
+ mlir::IntegerAttr::get(i64Ty, details->cudaClusterDims()[0]);
+ auto yAttr =
+ mlir::IntegerAttr::get(i64Ty, details->cudaClusterDims()[1]);
+ auto zAttr =
+ mlir::IntegerAttr::get(i64Ty, details->cudaClusterDims()[2]);
func.getOperation()->setAttr(
fir::getCUDAClusterDimsAttrName(),
- fir::CUDAClusterDimsAttr::get(func.getContext(), xAttr, yAttr, zAttr));
+ fir::CUDAClusterDimsAttr::get(func.getContext(), xAttr, yAttr,
+ zAttr));
}
}
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/81636
More information about the flang-commits
mailing list