[Mlir-commits] [mlir] [mlir][CAPI][python] expose the python bindings for linalg::isaContractionOpInterface and linalg::inferContractionDims (PR #134935)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Tue Apr 8 15:06:00 PDT 2025
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 HEAD~1...HEAD mlir/test/python/dialects/linalg/ops.py
``````````
</details>
<details>
<summary>
View the diff from darker here.
</summary>
``````````diff
--- ops.py 2025-04-08 22:03:11.000000 +0000
+++ ops.py 2025-04-08 22:05:32.777488 +0000
@@ -609,22 +609,24 @@
@run
def test_infer_contraction_dimensions():
with Context(), Location.unknown():
- module = ir.Module.parse(r"""
+ module = ir.Module.parse(
+ r"""
module {
func.func @matmul(%arg0: tensor<4x4xf32>, %arg1: tensor<4x4xf32>)
-> tensor<4x4xf32> {
%cst = arith.constant 0.0 : f32
%0 = linalg.fill ins(%cst : f32) outs(%arg0 : tensor<4x4xf32>) -> tensor<4x4xf32>
%1 = linalg.matmul ins(%arg0, %arg1 : tensor<4x4xf32>, tensor<4x4xf32>)
outs(%0 : tensor<4x4xf32>) -> tensor<4x4xf32>
return %1 : tensor<4x4xf32>
}
}
- """)
+ """
+ )
func_op = module.body.operations[0]
body_block = func_op.regions[0].blocks[0]
fill_op = body_block.operations[1]
matmul_op = body_block.operations[2]
``````````
</details>
https://github.com/llvm/llvm-project/pull/134935
More information about the Mlir-commits
mailing list