[Mlir-commits] [mlir] [mlir][Python] create MLIRPythonSupport (PR #171775)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Thu Dec 25 13:00:10 PST 2025


github-actions[bot] wrote:

<!--PREMERGE ADVISOR COMMENT: Windows-->
# :window: Windows x64 Test Results

* 3380 tests passed
* 411 tests skipped
* 1 test failed

## Failed Tests
(click on a test name to see its output)

### MLIR
<details>
<summary>MLIR.Examples/standalone/test.toy</summary>

```
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 1
"C:/BuildTools/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/bin/cmake.exe" "C:/_work/llvm-project/llvm-project/mlir/examples/standalone" -G "Ninja"  -DCMAKE_BUILD_TYPE=Release  -DCMAKE_CXX_COMPILER=C:/clang/clang-msvc/bin/clang-cl.exe -DCMAKE_C_COMPILER=C:/clang/clang-msvc/bin/clang-cl.exe  -DLLVM_ENABLE_LIBCXX=OFF -DMLIR_DIR=C:/_work/llvm-project/llvm-project/build/lib/cmake/mlir  -DLLVM_USE_LINKER=  -DMLIR_PYTHON_PACKAGE_PREFIX=mlir_standalone  -DPython3_EXECUTABLE="C:\Python312\python.exe"  -DPython_EXECUTABLE="C:\Python312\python.exe"
# executed command: C:/BuildTools/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/bin/cmake.exe C:/_work/llvm-project/llvm-project/mlir/examples/standalone -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=C:/clang/clang-msvc/bin/clang-cl.exe -DCMAKE_C_COMPILER=C:/clang/clang-msvc/bin/clang-cl.exe -DLLVM_ENABLE_LIBCXX=OFF -DMLIR_DIR=C:/_work/llvm-project/llvm-project/build/lib/cmake/mlir -DLLVM_USE_LINKER= -DMLIR_PYTHON_PACKAGE_PREFIX=mlir_standalone '-DPython3_EXECUTABLE=C:\Python312\python.exe' '-DPython_EXECUTABLE=C:\Python312\python.exe'
# .---command stdout------------
# | -- The CXX compiler identification is Clang 21.1.2 with MSVC-like command-line
# | -- The C compiler identification is Clang 21.1.2 with MSVC-like command-line
# | -- Detecting CXX compiler ABI info
# | -- Detecting CXX compiler ABI info - done
# | -- Check for working CXX compiler: C:/clang/clang-msvc/bin/clang-cl.exe - skipped
# | -- Detecting CXX compile features
# | -- Detecting CXX compile features - done
# | -- Detecting C compiler ABI info
# | -- Detecting C compiler ABI info - done
# | -- Check for working C compiler: C:/clang/clang-msvc/bin/clang-cl.exe - skipped
# | -- Detecting C compile features
# | -- Detecting C compile features - done
# | -- Using MLIRConfig.cmake in: C:/_work/llvm-project/llvm-project/build/lib/cmake/mlir
# | -- Using LLVMConfig.cmake in: C:/_work/llvm-project/llvm-project/build/lib/cmake/llvm
# | -- Performing Test LLVM_USES_LIBSTDCXX
# | -- Performing Test LLVM_USES_LIBSTDCXX - Failed
# | -- Performing Test LLVM_DEFAULT_TO_GLIBCXX_USE_CXX11_ABI
# | -- Performing Test LLVM_DEFAULT_TO_GLIBCXX_USE_CXX11_ABI - Failed
# | -- Performing Test CXX_SUPPORTS_SUGGEST_OVERRIDE_FLAG
# | -- Performing Test CXX_SUPPORTS_SUGGEST_OVERRIDE_FLAG - Success
# | -- Performing Test CXX_WSUGGEST_OVERRIDE_ALLOWS_ONLY_FINAL
# | -- Performing Test CXX_WSUGGEST_OVERRIDE_ALLOWS_ONLY_FINAL - Success
# | -- Performing Test C_WCOMMENT_ALLOWS_LINE_WRAP
# | -- Performing Test C_WCOMMENT_ALLOWS_LINE_WRAP - Success
# | -- Performing Test C_SUPPORTS_MISLEADING_INDENTATION_FLAG
# | -- Performing Test C_SUPPORTS_MISLEADING_INDENTATION_FLAG - Success
# | -- Performing Test CXX_SUPPORTS_MISLEADING_INDENTATION_FLAG
# | -- Performing Test CXX_SUPPORTS_MISLEADING_INDENTATION_FLAG - Success
# | -- Performing Test C_SUPPORTS_CTAD_MAYBE_UNSPPORTED_FLAG
# | -- Performing Test C_SUPPORTS_CTAD_MAYBE_UNSPPORTED_FLAG - Success
# | -- Performing Test CXX_SUPPORTS_CTAD_MAYBE_UNSPPORTED_FLAG
# | -- Performing Test CXX_SUPPORTS_CTAD_MAYBE_UNSPPORTED_FLAG - Success
# | -- Looking for os_signpost_interval_begin
# | -- Looking for os_signpost_interval_begin - not found
# | -- Looking for flock
# | -- Looking for flock - not found
# | -- Found Python3: C:\Python312\python.exe (found version "3.12.3") found components: Interpreter Development.Module 
# | -- Found Python: C:\Python312\python.exe (found version "3.12.3") found components: Interpreter Development.Module 
# | -- Found python include dirs: C:/Python312/include
# | -- Found python libraries: C:/Python312/libs/python312.lib
# | -- Found numpy v: 
# | -- Python extension suffix for modules: 'cp312-win_amd64'
# | -- Checking for nanobind in python path...
# | -- found (C:\Python312\Lib\site-packages\nanobind\cmake)
# | -- Found nanobind v2.9.2: C:\Python312\Lib\site-packages\nanobind\include
# | -- Python prefix = '', suffix = '', extension = '
# | -- Performing Test LLVM_LINKER_SUPPORTS_B_SYMBOLIC_FUNCTIONS
# | -- Performing Test LLVM_LINKER_SUPPORTS_B_SYMBOLIC_FUNCTIONS - Success
# | -- Enabling Python API
# | -- Found python include dirs: C:/Python312/include
# | -- Found python libraries: C:/Python312/libs/python312.lib
# | -- Found numpy v: 
# | -- Python extension suffix for modules: 'cp312-win_amd64'
# | -- Using explicit nanobind cmake directory: C:\Python312\Lib\site-packages\nanobind\cmake (-Dnanobind_DIR to change)
# | -- Found nanobind v2.9.2: C:\Python312\Lib\site-packages\nanobind\include
# | -- Python prefix = '', suffix = '', extension = '
# | -- Configuring done
# | -- Generating done
# | -- Build files have been written to: C:/_work/llvm-project/llvm-project/build/tools/mlir/test/Examples/standalone
# `-----------------------------
# RUN: at line 9
export PYTHONPATH="C:/_work/llvm-project/llvm-project/build/tools/mlir/python_packages/mlir_core"
# executed command: export PYTHONPATH=C:/_work/llvm-project/llvm-project/build/tools/mlir/python_packages/mlir_core
# note: command had no output on stdout or stderr
# RUN: at line 10
"C:/BuildTools/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/bin/cmake.exe" --build . --target check-standalone | tee C:\_work\llvm-project\llvm-project\build\tools\mlir\test\Examples\standalone\Output\test.toy.tmp
# executed command: C:/BuildTools/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/bin/cmake.exe --build . --target check-standalone
# .---command stderr------------
# | llvm-lit.py: C:\_work\llvm-project\llvm-project\llvm\utils\lit\lit\llvm\config.py:60: note: using lit tools: c:\program files\git\usr\bin
# `-----------------------------
# error: command failed with exit status: 1
# executed command: tee 'C:\_work\llvm-project\llvm-project\build\tools\mlir\test\Examples\standalone\Output\test.toy.tmp'
# .---command stdout------------
# | [1/61] Building StandaloneOps.cpp.inc...
# | [2/61] Building StandaloneOps.h.inc...
# | [3/61] Building StandaloneOpsDialect.cpp.inc...
# | [4/61] Building StandaloneOpsDialect.h.inc...
# | [5/61] Building StandaloneOpsTypes.cpp.inc...
# | [6/61] Building StandaloneOpsTypes.h.inc...
# | [7/61] Building StandalonePasses.h.inc...
# | [8/61] Building dialects/_standalone_ops_gen.py...
# | [9/61] Copying python source C:/_work/llvm-project/llvm-project/mlir/examples/standalone/python/mlir_standalone/_mlir_libs/_standaloneDialectsNanobind/py.typed -> C:/_work/llvm-project/llvm-project/build/tools/mlir/test/Examples/standalone/python_packages/standalone/mlir_standalone/_mlir_libs/_standaloneDialectsNanobind/py.typed
# | [10/61] Copying python source C:/_work/llvm-project/llvm-project/mlir/examples/standalone/python/mlir_standalone/dialects/standalone_nanobind.py -> C:/_work/llvm-project/llvm-project/build/tools/mlir/test/Examples/standalone/python_packages/standalone/mlir_standalone/dialects/standalone_nanobind.py
# | [11/61] Copying python source C:/_work/llvm-project/llvm-project/mlir/python/mlir/_mlir_libs/__init__.py -> C:/_work/llvm-project/llvm-project/build/tools/mlir/test/Examples/standalone/python_packages/standalone/mlir_standalone/_mlir_libs/__init__.py
# | [12/61] Copying python source C:/_work/llvm-project/llvm-project/mlir/python/mlir/_mlir_libs/_mlir/py.typed -> C:/_work/llvm-project/llvm-project/build/tools/mlir/test/Examples/standalone/python_packages/standalone/mlir_standalone/_mlir_libs/_mlir/py.typed
# | [13/61] Copying python source C:/_work/llvm-project/llvm-project/mlir/python/mlir/dialects/_ods_common.py -> C:/_work/llvm-project/llvm-project/build/tools/mlir/test/Examples/standalone/python_packages/standalone/mlir_standalone/dialects/_ods_common.py
# | [14/61] Copying python source C:/_work/llvm-project/llvm-project/mlir/python/mlir/ir.py -> C:/_work/llvm-project/llvm-project/build/tools/mlir/test/Examples/standalone/python_packages/standalone/mlir_standalone/ir.py
# | [15/61] Copying python source C:/_work/llvm-project/llvm-project/mlir/python/mlir/passmanager.py -> C:/_work/llvm-project/llvm-project/build/tools/mlir/test/Examples/standalone/python_packages/standalone/mlir_standalone/passmanager.py
# | [16/61] Copying python source C:/_work/llvm-project/llvm-project/mlir/python/mlir/rewrite.py -> C:/_work/llvm-project/llvm-project/build/tools/mlir/test/Examples/standalone/python_packages/standalone/mlir_standalone/rewrite.py
# | [17/61] Copying python source C:/_work/llvm-project/llvm-project/mlir/python/mlir/extras/meta.py -> C:/_work/llvm-project/llvm-project/build/tools/mlir/test/Examples/standalone/python_packages/standalone/mlir_standalone/extras/meta.py
# | [18/61] Copying python source C:/_work/llvm-project/llvm-project/mlir/python/mlir/extras/types.py -> C:/_work/llvm-project/llvm-project/build/tools/mlir/test/Examples/standalone/python_packages/standalone/mlir_standalone/extras/types.py
# | [19/61] Copying python source C:/_work/llvm-project/llvm-project/mlir/python/mlir/dialects/builtin.py -> C:/_work/llvm-project/llvm-project/build/tools/mlir/test/Examples/standalone/python_packages/standalone/mlir_standalone/dialects/builtin.py
# | [20/61] Copying python source C:/_work/llvm-project/llvm-project/build/tools/mlir/python/dialects/_builtin_ops_gen.py -> C:/_work/llvm-project/llvm-project/build/tools/mlir/test/Examples/standalone/python_packages/standalone/mlir_standalone/dialects/_builtin_ops_gen.py
# | [21/61] Copying python source C:/_work/llvm-project/llvm-project/build/tools/mlir/test/Examples/standalone/python/dialects/_standalone_ops_gen.py -> C:/_work/llvm-project/llvm-project/build/tools/mlir/test/Examples/standalone/python_packages/standalone/mlir_standalone/dialects/_standalone_ops_gen.py
# | [22/61] Building C object test\CAPI\CMakeFiles\standalone-capi-test.dir\standalone-capi-test.c.obj
# | [23/61] Building CXX object python\CMakeFiles\nanobind-mlir_standalone.dir\C_\Python312\Lib\site-packages\nanobind\src\nb_ft.cpp.obj
# | [24/61] Building CXX object python\CMakeFiles\nanobind-mlir_standalone.dir\C_\Python312\Lib\site-packages\nanobind\src\implicit.cpp.obj
# | [25/61] Building CXX object python\CMakeFiles\nanobind-mlir_standalone.dir\C_\Python312\Lib\site-packages\nanobind\src\nb_static_property.cpp.obj
# | [26/61] Building CXX object python\CMakeFiles\nanobind-mlir_standalone.dir\C_\Python312\Lib\site-packages\nanobind\src\trampoline.cpp.obj
# | [27/61] Building CXX object python\CMakeFiles\nanobind-mlir_standalone.dir\C_\Python312\Lib\site-packages\nanobind\src\nb_ndarray.cpp.obj
# | [28/61] Building CXX object python\CMakeFiles\nanobind-mlir_standalone.dir\C_\Python312\Lib\site-packages\nanobind\src\error.cpp.obj
# | [29/61] Building CXX object python\CMakeFiles\nanobind-mlir_standalone.dir\C_\Python312\Lib\site-packages\nanobind\src\nb_internals.cpp.obj
# | [30/61] Building CXX object python\CMakeFiles\nanobind-mlir_standalone.dir\C_\Python312\Lib\site-packages\nanobind\src\common.cpp.obj
# | [31/61] Building CXX object python\CMakeFiles\nanobind-mlir_standalone.dir\C_\Python312\Lib\site-packages\nanobind\src\nb_func.cpp.obj
# | [32/61] Building CXX object python\CMakeFiles\nanobind-mlir_standalone.dir\C_\Python312\Lib\site-packages\nanobind\src\nb_enum.cpp.obj
# | [33/61] Building CXX object python\CMakeFiles\nanobind-mlir_standalone.dir\C_\Python312\Lib\site-packages\nanobind\src\nb_type.cpp.obj
# | [34/61] Linking CXX shared library python_packages\standalone\mlir_standalone\_mlir_libs\nanobind-mlir_standalone.dll
# | [35/61] Building CXX object standalone-translate\CMakeFiles\standalone-translate.dir\standalone-translate.cpp.obj
# | [36/61] Building CXX object lib\Standalone\CMakeFiles\obj.MLIRStandalone.dir\StandaloneOps.cpp.obj
# | [37/61] Building CXX object lib\Standalone\CMakeFiles\obj.MLIRStandalone.dir\StandaloneTypes.cpp.obj
# | [38/61] Building CXX object lib\CAPI\CMakeFiles\obj.StandaloneCAPI.dir\Dialects.cpp.obj
# | [39/61] Building CXX object lib\Standalone\CMakeFiles\obj.MLIRStandalone.dir\StandaloneDialect.cpp.obj
# | [40/61] Building CXX object python\CMakeFiles\StandalonePythonModules.extension._standaloneDialectsNanobind.dso.dir\StandaloneExtensionNanobind.cpp.obj
# | clang-cl: warning: argument unused during compilation: '/MP' [-Wunused-command-line-argument]
# | [41/61] Building CXX object lib\Standalone\CMakeFiles\obj.MLIRStandalone.dir\StandalonePasses.cpp.obj
# | [42/61] Linking CXX static library lib\MLIRStandalone.lib
# | [43/61] Building CXX object python\CMakeFiles\StandalonePythonModules.extension._mlir.dso.dir\C_\_work\llvm-project\llvm-project\mlir\lib\Bindings\Python\Pass.cpp.obj
# | clang-cl: warning: argument unused during compilation: '/MP' [-Wunused-command-line-argument]
# | [44/61] Building CXX object python\CMakeFiles\StandalonePythonModules.extension._mlir.dso.dir\C_\_work\llvm-project\llvm-project\mlir\lib\Bindings\Python\IRInterfaces.cpp.obj
# | clang-cl: warning: argument unused during compilation: '/MP' [-Wunused-command-line-argument]
# | [45/61] Linking CXX shared library bin\StandaloneCAPITestLib.dll
# | [46/61] Building CXX object python\CMakeFiles\StandalonePythonModules.extension._mlir.dso.dir\C_\_work\llvm-project\llvm-project\mlir\lib\Bindings\Python\Rewrite.cpp.obj
# | clang-cl: warning: argument unused during compilation: '/MP' [-Wunused-command-line-argument]
# | [47/61] Linking CXX shared library python_packages\standalone\mlir_standalone\_mlir_libs\StandalonePythonCAPI.dll
# | [48/61] Linking C executable bin\standalone-capi-test.exe
# | [49/61] Building CXX object standalone-opt\CMakeFiles\standalone-opt.dir\standalone-opt.cpp.obj
# | [50/61] Building CXX object python\CMakeFiles\StandalonePythonModules.extension.MLIRPythonSupport-mlir_standalone.dso.dir\C_\_work\llvm-project\llvm-project\mlir\lib\Bindings\Python\Globals.cpp.obj
# | [51/61] Building CXX object python\CMakeFiles\StandalonePythonModules.extension.MLIRPythonSupport-mlir_standalone.dso.dir\C_\_work\llvm-project\llvm-project\mlir\lib\Bindings\Python\IRCore.cpp.obj
# | [52/61] Linking CXX shared library python_packages\standalone\mlir_standalone\_mlir_libs\MLIRPythonSupport-mlir_standalone.dll
# | [53/61] Linking CXX executable bin\standalone-translate.exe
# | [54/61] Linking CXX shared module python_packages\standalone\mlir_standalone\_mlir_libs\_standaloneDialectsNanobind.cp312-win_amd64.pyd
# | [55/61] Building CXX object python\CMakeFiles\StandalonePythonModules.extension._mlir.dso.dir\C_\_work\llvm-project\llvm-project\mlir\lib\Bindings\Python\IRAffine.cpp.obj
# | clang-cl: warning: argument unused during compilation: '/MP' [-Wunused-command-line-argument]
# | [56/61] Building CXX object python\CMakeFiles\StandalonePythonModules.extension._mlir.dso.dir\C_\_work\llvm-project\llvm-project\mlir\lib\Bindings\Python\IRTypes.cpp.obj
# | clang-cl: warning: argument unused during compilation: '/MP' [-Wunused-command-line-argument]
# | [57/61] Building CXX object python\CMakeFiles\StandalonePythonModules.extension._mlir.dso.dir\C_\_work\llvm-project\llvm-project\mlir\lib\Bindings\Python\IRAttributes.cpp.obj
# | clang-cl: warning: argument unused during compilation: '/MP' [-Wunused-command-line-argument]
# | [58/61] Linking CXX executable bin\standalone-opt.exe
# | [59/61] Building CXX object python\CMakeFiles\StandalonePythonModules.extension._mlir.dso.dir\C_\_work\llvm-project\llvm-project\mlir\lib\Bindings\Python\MainModule.cpp.obj
# | clang-cl: warning: argument unused during compilation: '/MP' [-Wunused-command-line-argument]
# | [60/61] Linking CXX shared module python_packages\standalone\mlir_standalone\_mlir_libs\_mlir.cp312-win_amd64.pyd
# | [60/61] Running the standalone regression tests
# | -- Testing: 7 tests, 7 workers --
# | Testing:  0.. 10.. 20.. 30.. 40.. 50.. 
# | FAIL: STANDALONE :: python/smoketest.py (7 of 7)
# | ******************** TEST 'STANDALONE :: python/smoketest.py' FAILED ********************
# | Exit Code: 1
# | 
# | Command Output (stdout):
# | --
# | # RUN: at line 1
# | "C:\Python312\python.exe" C:\_work\llvm-project\llvm-project\mlir\examples\standalone\test\python\smoketest.py 2>&1 | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\mlir\examples\standalone\test\python\smoketest.py
# | # executed command: 'C:\Python312\python.exe' 'C:\_work\llvm-project\llvm-project\mlir\examples\standalone\test\python\smoketest.py'
# | # note: command had no output on stdout or stderr
# | # error: command failed with exit status: 1
# | # executed command: 'c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe' 'C:\_work\llvm-project\llvm-project\mlir\examples\standalone\test\python\smoketest.py'
# | 
# | --
# | 
# | ********************
# | Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90.. 
# | ********************
# | Failed Tests (1):
# |   STANDALONE :: python/smoketest.py
# | 
# | 
# | Testing Time: 0.53s
# | 
# | Total Discovered Tests: 7
# |   Unsupported: 2 (28.57%)
# |   Passed     : 4 (57.14%)
# |   Failed     : 1 (14.29%)
# | FAILED: [code=1] test/CMakeFiles/check-standalone 
# | cmd.exe /C "cd /D C:\_work\llvm-project\llvm-project\build\tools\mlir\test\Examples\standalone\test && C:\Python312\python.exe C:/_work/llvm-project/llvm-project/build/./bin/llvm-lit.py -sv C:/_work/llvm-project/llvm-project/build/tools/mlir/test/Examples/standalone/test"
# | ninja: build stopped: subcommand failed.
# `-----------------------------

--

```
</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/171775


More information about the Mlir-commits mailing list