[Mlir-commits] [llvm] [mlir] [mlir python] Port Python core code to nanobind. (PR #120473)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Wed Dec 18 12:09:00 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 6e8b3a3e0cad614954fc387df22d59d941f081c3 2fb5aa37053e4c160cbad4edcf18b5d9609bde19 --extensions cpp,h -- mlir/include/mlir/Bindings/Python/IRTypes.h mlir/include/mlir/Bindings/Python/NanobindAdaptors.h mlir/include/mlir/Bindings/Python/PybindAdaptors.h mlir/lib/Bindings/Python/Globals.h mlir/lib/Bindings/Python/IRAffine.cpp mlir/lib/Bindings/Python/IRAttributes.cpp mlir/lib/Bindings/Python/IRCore.cpp mlir/lib/Bindings/Python/IRInterfaces.cpp mlir/lib/Bindings/Python/IRModule.cpp mlir/lib/Bindings/Python/IRModule.h mlir/lib/Bindings/Python/IRTypes.cpp mlir/lib/Bindings/Python/MainModule.cpp mlir/lib/Bindings/Python/Pass.cpp mlir/lib/Bindings/Python/Pass.h mlir/lib/Bindings/Python/Rewrite.cpp mlir/lib/Bindings/Python/Rewrite.h mlir/lib/Bindings/Python/NanobindUtils.h
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/mlir/lib/Bindings/Python/IRAttributes.cpp b/mlir/lib/Bindings/Python/IRAttributes.cpp
index 9332077666..a7278d7e48 100644
--- a/mlir/lib/Bindings/Python/IRAttributes.cpp
+++ b/mlir/lib/Bindings/Python/IRAttributes.cpp
@@ -1028,7 +1028,7 @@ public:
static void bindDerived(ClassTy &c) {
#if PY_VERSION_HEX < 0x03090000
- PyTypeObject* tp = reinterpret_cast<PyTypeObject *>(c.ptr());
+ PyTypeObject *tp = reinterpret_cast<PyTypeObject *>(c.ptr());
tp->tp_as_buffer->bf_getbuffer = nd_ndarray_tpbuffer;
tp->tp_as_buffer->bf_releasebuffer = nb_ndarray_releasebuffer;
#endif
``````````
</details>
https://github.com/llvm/llvm-project/pull/120473
More information about the Mlir-commits
mailing list