[Mlir-commits] [mlir] [MLIR][Python] Support `has_trait` for operations (PR #188492)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Thu Mar 26 08:29:27 PDT 2026


github-actions[bot] wrote:

<!--PREMERGE ADVISOR COMMENT: Linux-->
# :penguin: Linux x64 Test Results

* 4126 tests passed
* 201 tests skipped

All executed tests passed, but another part of the build **failed**. Click on a failure below to see the details.

<details>
<summary>tools/mlir/python/type_stubs/_mlir_libs/_mlir/__init__.pyi tools/mlir/python/type_stubs/_mlir_libs/_mlir/ir.pyi tools/mlir/python/type_stubs/_mlir_libs/_mlir/passmanager.pyi tools/mlir/python/type_stubs/_mlir_libs/_mlir/rewrite.pyi /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/mlir/python/type_stubs/_mlir_libs/_mlir/__init__.pyi /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/mlir/python/type_stubs/_mlir_libs/_mlir/ir.pyi /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/mlir/python/type_stubs/_mlir_libs/_mlir/passmanager.pyi /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/mlir/python/type_stubs/_mlir_libs/_mlir/rewrite.pyi</summary>

```
FAILED: tools/mlir/python/type_stubs/_mlir_libs/_mlir/__init__.pyi tools/mlir/python/type_stubs/_mlir_libs/_mlir/ir.pyi tools/mlir/python/type_stubs/_mlir_libs/_mlir/passmanager.pyi tools/mlir/python/type_stubs/_mlir_libs/_mlir/rewrite.pyi /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/mlir/python/type_stubs/_mlir_libs/_mlir/__init__.pyi /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/mlir/python/type_stubs/_mlir_libs/_mlir/ir.pyi /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/mlir/python/type_stubs/_mlir_libs/_mlir/passmanager.pyi /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/mlir/python/type_stubs/_mlir_libs/_mlir/rewrite.pyi
cd /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/cmake/modules && /usr/bin/cmake -E env PYTHONPATH="" /usr/bin/python3 /home/gha/.local/lib/python3.12/site-packages/nanobind/stubgen.py --module _mlir -i /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/mlir/python_packages/mlir_core/mlir/_mlir_libs --recursive --include-private --output-dir /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/mlir/python/type_stubs/_mlir_libs --quiet && /usr/bin/cmake -E cmake_transform_depfile Ninja gccdepfile /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/python /home/gha/actions-runner/_work/llvm-project/llvm-project/build /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/mlir/python /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/mlir/python/type_stubs/_mlir_libs/_mlir.d /home/gha/actions-runner/_work/llvm-project/llvm-project/build/CMakeFiles/d/45f3bd76fbe5e05fabebfbcdebb4510514848aa0676592d634eea04dea469a7a.d
Traceback (most recent call last):
File "/home/gha/.local/lib/python3.12/site-packages/nanobind/stubgen.py", line 1488, in <module>
main()
File "/home/gha/.local/lib/python3.12/site-packages/nanobind/stubgen.py", line 1408, in main
mod_imported = importlib.import_module(mod)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/importlib/__init__.py", line 90, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 921, in _load_unlocked
File "<frozen importlib._bootstrap>", line 813, in module_from_spec
File "<frozen importlib._bootstrap_external>", line 1289, in create_module
File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
ImportError: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/mlir/python_packages/mlir_core/mlir/_mlir_libs/libMLIRPythonSupport-mlir.so: undefined symbol: mlirOperationHasTrait
```
</details>
<details>
<summary>tools/mlir/python/type_stubs/_mlir_libs/_mlirPythonTestNanobind.pyi /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/mlir/python/type_stubs/_mlir_libs/_mlirPythonTestNanobind.pyi</summary>

```
FAILED: tools/mlir/python/type_stubs/_mlir_libs/_mlirPythonTestNanobind.pyi /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/mlir/python/type_stubs/_mlir_libs/_mlirPythonTestNanobind.pyi
cd /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/cmake/modules && /usr/bin/cmake -E env PYTHONPATH="" /usr/bin/python3 /home/gha/.local/lib/python3.12/site-packages/nanobind/stubgen.py --module mlir._mlir_libs._mlirPythonTestNanobind -i /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/mlir/python_packages/mlir_core --recursive --include-private --output-dir /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/mlir/python/type_stubs/_mlir_libs --quiet && /usr/bin/cmake -E cmake_transform_depfile Ninja gccdepfile /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm /home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/python /home/gha/actions-runner/_work/llvm-project/llvm-project/build /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/mlir/python /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/mlir/python/type_stubs/_mlir_libs/mlir._mlir_libs._mlirPythonTestNanobind.d /home/gha/actions-runner/_work/llvm-project/llvm-project/build/CMakeFiles/d/9462d93d3b47369369806ff84dd034c4c1cf3f7f703b2b85dc28db4d96a6d9f8.d
Traceback (most recent call last):
File "/home/gha/.local/lib/python3.12/site-packages/nanobind/stubgen.py", line 1488, in <module>
main()
File "/home/gha/.local/lib/python3.12/site-packages/nanobind/stubgen.py", line 1408, in main
mod_imported = importlib.import_module(mod)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/importlib/__init__.py", line 90, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
File "<frozen importlib._bootstrap>", line 1310, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 995, in exec_module
File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
File "/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/mlir/python_packages/mlir_core/mlir/_mlir_libs/__init__.py", line 218, in <module>
_site_initialize()
File "/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/mlir/python_packages/mlir_core/mlir/_mlir_libs/__init__.py", line 95, in _site_initialize
from ._mlir import ir
ImportError: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/mlir/python_packages/mlir_core/mlir/_mlir_libs/libMLIRPythonSupport-mlir.so: undefined symbol: mlirOperationHasTrait
```
</details>

If these failures are unrelated to your changes (for example tests are broken or flaky at HEAD), please open an issue at https://github.com/llvm/llvm-project/issues and add the `infrastructure` label.

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


More information about the Mlir-commits mailing list