[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:45 PDT 2026
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {darker}-->
:warning: Python code formatter, darker found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
darker --check --diff -r origin/main...HEAD mlir/test/python/dialects/nvvm.py
``````````
: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 darker here.
</summary>
``````````diff
--- nvvm.py 2026-03-24 12:21:10.000000 +0000
+++ nvvm.py 2026-03-24 12:52:09.490250 +0000
@@ -228,19 +228,19 @@
i32 = T.i32()
f32 = T.f32()
@func.FuncOp.from_py_func(i32, i32, f32, i32, i32)
def shfl_sync_ops(mask, i32val, f32val, offset, clamp):
- i32_result = nvvm.shfl_sync(
- mask, i32val, offset, clamp, nvvm.ShflKind.bfly
- )
- f32_result = nvvm.shfl_sync(
- mask, f32val, offset, clamp, nvvm.ShflKind.bfly
- )
+ i32_result = nvvm.shfl_sync(mask, i32val, offset, clamp, nvvm.ShflKind.bfly)
+ f32_result = nvvm.shfl_sync(mask, f32val, offset, clamp, nvvm.ShflKind.bfly)
struct_result = nvvm.shfl_sync(
- mask, i32val, offset, clamp, nvvm.ShflKind.bfly,
- return_value_and_is_valid=True
+ mask,
+ i32val,
+ offset,
+ clamp,
+ nvvm.ShflKind.bfly,
+ return_value_and_is_valid=True,
)
return i32_result
# CHECK-LABEL: func.func @shfl_sync_ops(
@@ -260,16 +260,20 @@
elt_b16 = Attribute.parse("#nvvm.ld_st_matrix_elt_type<b16>")
@func.FuncOp.from_py_func(ptr_shared)
def ldmatrix_ops(ptr):
r1 = nvvm.ldmatrix(
- ptr, num=1, layout=nvvm.MMALayout.row,
+ ptr,
+ num=1,
+ layout=nvvm.MMALayout.row,
shape=shape_8x8,
elt_type=elt_b16,
)
r4 = nvvm.ldmatrix(
- ptr, num=4, layout=nvvm.MMALayout.row,
+ ptr,
+ num=4,
+ layout=nvvm.MMALayout.row,
shape=shape_8x8,
elt_type=elt_b16,
)
return r1
``````````
</details>
https://github.com/llvm/llvm-project/pull/188238
More information about the Mlir-commits
mailing list