[Mlir-commits] [mlir] [mlir][NVVM] Add InferTypeOpInterface to sync and ldmatrix ops (PR #188238)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Tue Mar 24 05:52:44 PDT 2026
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 origin/main HEAD --extensions cpp -- mlir/lib/Dialect/LLVMIR/IR/NVVMDialect.cpp --diff_from_common_commit
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/mlir/lib/Dialect/LLVMIR/IR/NVVMDialect.cpp b/mlir/lib/Dialect/LLVMIR/IR/NVVMDialect.cpp
index f0e2fbf2a..3dd1f3756 100644
--- a/mlir/lib/Dialect/LLVMIR/IR/NVVMDialect.cpp
+++ b/mlir/lib/Dialect/LLVMIR/IR/NVVMDialect.cpp
@@ -2244,10 +2244,10 @@ LogicalResult ShflOp::verify() {
return success();
}
-LogicalResult ShflOp::inferReturnTypes(
- MLIRContext *context, std::optional<Location> location,
- ShflOp::Adaptor adaptor,
- SmallVectorImpl<Type> &inferredReturnTypes) {
+LogicalResult
+ShflOp::inferReturnTypes(MLIRContext *context, std::optional<Location> location,
+ ShflOp::Adaptor adaptor,
+ SmallVectorImpl<Type> &inferredReturnTypes) {
Type valType = adaptor.getVal().getType();
if (adaptor.getReturnValueAndIsValid()) {
SmallVector<Type> body = {valType, IntegerType::get(context, 1)};
@@ -2467,8 +2467,7 @@ LogicalResult NVVM::LdMatrixOp::verify() {
LogicalResult LdMatrixOp::inferReturnTypes(
MLIRContext *context, std::optional<Location> location,
- LdMatrixOp::Adaptor adaptor,
- SmallVectorImpl<Type> &inferredReturnTypes) {
+ LdMatrixOp::Adaptor adaptor, SmallVectorImpl<Type> &inferredReturnTypes) {
uint32_t num = adaptor.getNum();
uint32_t m = adaptor.getShape().getM();
uint32_t n = adaptor.getShape().getN();
@@ -2478,9 +2477,8 @@ LogicalResult LdMatrixOp::inferReturnTypes(
if (numElements == 1) {
inferredReturnTypes.push_back(i32);
} else {
- inferredReturnTypes.push_back(
- LLVM::LLVMStructType::getLiteral(context,
- SmallVector<Type>(numElements, i32)));
+ inferredReturnTypes.push_back(LLVM::LLVMStructType::getLiteral(
+ context, SmallVector<Type>(numElements, i32)));
}
return success();
}
@@ -2877,8 +2875,7 @@ LogicalResult NVVM::MatchSyncOp::verify() {
LogicalResult MatchSyncOp::inferReturnTypes(
MLIRContext *context, std::optional<Location> location,
- MatchSyncOp::Adaptor adaptor,
- SmallVectorImpl<Type> &inferredReturnTypes) {
+ MatchSyncOp::Adaptor adaptor, SmallVectorImpl<Type> &inferredReturnTypes) {
if (adaptor.getKind() == NVVM::MatchSyncKind::all) {
SmallVector<Type> body = {IntegerType::get(context, 32),
IntegerType::get(context, 1)};
@@ -2905,8 +2902,7 @@ LogicalResult NVVM::VoteSyncOp::verify() {
LogicalResult VoteSyncOp::inferReturnTypes(
MLIRContext *context, std::optional<Location> location,
- VoteSyncOp::Adaptor adaptor,
- SmallVectorImpl<Type> &inferredReturnTypes) {
+ VoteSyncOp::Adaptor adaptor, SmallVectorImpl<Type> &inferredReturnTypes) {
if (adaptor.getKind() == NVVM::VoteSyncKind::ballot)
inferredReturnTypes.push_back(IntegerType::get(context, 32));
else
``````````
</details>
https://github.com/llvm/llvm-project/pull/188238
More information about the Mlir-commits
mailing list