[Mlir-commits] [mlir] [amdgpu] Add Python bindings for TDM types (PR #172309)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Mon Dec 15 06:44:07 PST 2025


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,h -- mlir/lib/Bindings/Python/DialectAMDGPU.cpp mlir/include/mlir-c/Dialect/AMDGPU.h mlir/lib/CAPI/Dialect/AMDGPU.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/Bindings/Python/DialectAMDGPU.cpp b/mlir/lib/Bindings/Python/DialectAMDGPU.cpp
index 99e6b6564..d59351342 100644
--- a/mlir/lib/Bindings/Python/DialectAMDGPU.cpp
+++ b/mlir/lib/Bindings/Python/DialectAMDGPU.cpp
@@ -30,7 +30,6 @@ static void populateDialectAMDGPUSubmodule(const nb::module_ &m) {
       "Gets an instance of TDMBaseType in the same context", nb::arg("cls"),
       nb::arg("element_type"), nb::arg("ctx") = nb::none());
 
-
   auto amdgpuTDMDescriptorType = mlir_type_subclass(
       m, "TDMDescriptorType", mlirTypeIsAAMDGPUTDMDescriptorType);
 
@@ -42,7 +41,6 @@ static void populateDialectAMDGPUSubmodule(const nb::module_ &m) {
       "Gets an instance of TDMDescriptorType in the same context",
       nb::arg("cls"), nb::arg("ctx") = nb::none());
 
-
   auto amdgpuTDMGatherBaseType = mlir_type_subclass(
       m, "TDMGatherBaseType", mlirTypeIsAAMDGPUTDMGatherBaseType);
 
diff --git a/mlir/lib/CAPI/Dialect/AMDGPU.cpp b/mlir/lib/CAPI/Dialect/AMDGPU.cpp
index 26dfb27a5..6e58f78a2 100644
--- a/mlir/lib/CAPI/Dialect/AMDGPU.cpp
+++ b/mlir/lib/CAPI/Dialect/AMDGPU.cpp
@@ -25,8 +25,8 @@ bool mlirTypeIsAAMDGPUTDMBaseType(MlirType type) {
 }
 
 MlirType mlirAMDGPUTDMBaseTypeGet(MlirContext ctx, MlirType elementType) {
-  return wrap(amdgpu::TDMBaseType::get(unwrap(ctx),
-                                       cast<Type>(unwrap(elementType))));
+  return wrap(
+      amdgpu::TDMBaseType::get(unwrap(ctx), cast<Type>(unwrap(elementType))));
 }
 
 //===---------------------------------------------------------------------===//

``````````

</details>


https://github.com/llvm/llvm-project/pull/172309


More information about the Mlir-commits mailing list