[Mlir-commits] [mlir] [mlir][python] Cache import of ir module in type casters. (PR #160000)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Sun Sep 21 12:24:27 PDT 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 h -- mlir/include/mlir/Bindings/Python/NanobindAdaptors.h
``````````

: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/include/mlir/Bindings/Python/NanobindAdaptors.h b/mlir/include/mlir/Bindings/Python/NanobindAdaptors.h
index aeb51542f..9bd5f2f50 100644
--- a/mlir/include/mlir/Bindings/Python/NanobindAdaptors.h
+++ b/mlir/include/mlir/Bindings/Python/NanobindAdaptors.h
@@ -37,7 +37,8 @@ namespace python {
 namespace {
 
 // Safely calls Python initialization code on first use, avoiding deadlocks.
-template <typename T> class SafeInit {
+template <typename T>
+class SafeInit {
 public:
   typedef std::unique_ptr<T> (*F)();
 

``````````

</details>


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


More information about the Mlir-commits mailing list