[Mlir-commits] [llvm] [mlir] [mlir python] Port Python core code to nanobind. (PR #118583)

LLVM Continuous Integration llvmlistbot at llvm.org
Wed Dec 18 11:19:41 PST 2024


llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder `mlir-rocm-mi200` running on `mi200-buildbot` while building `mlir,utils` at step 6 "build-check-mlir-build-only".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/177/builds/10232

<details>
<summary>Here is the relevant piece of the build log for the reference</summary>

```
Step 6 (build-check-mlir-build-only) failure: build (failure)
...
82.607 [19/23/4770] Linking CXX executable bin/mlir-reduce
82.676 [19/22/4771] Linking CXX executable bin/mlir-opt
82.681 [19/21/4772] Linking CXX executable bin/transform-opt-ch2
82.695 [19/20/4773] Linking CXX executable bin/mlir-lsp-server
82.737 [19/19/4774] Linking CXX executable bin/transform-opt-ch3
82.743 [19/18/4775] Linking CXX executable bin/mlir-capi-execution-engine-test
82.786 [19/17/4776] Linking CXX shared library tools/mlir/python_packages/mlir_core/mlir/_mlir_libs/libMLIRPythonCAPI.so.20.0git
82.789 [18/17/4777] Creating library symlink tools/mlir/python_packages/mlir_core/mlir/_mlir_libs/libMLIRPythonCAPI.so
82.919 [13/21/4778] Linking CXX shared module tools/mlir/python_packages/mlir_core/mlir/_mlir_libs/_mlirPythonTestNanobind.cpython-38-x86_64-linux-gnu.so
83.492 [13/20/4779] Building CXX object tools/mlir/python/CMakeFiles/MLIRPythonModules.extension._mlir.dso.dir/vol/worker/mi200-buildbot/mlir-rocm-mi200/llvm-project/mlir/lib/Bindings/Python/IRAttributes.cpp.o
FAILED: tools/mlir/python/CMakeFiles/MLIRPythonModules.extension._mlir.dso.dir/vol/worker/mi200-buildbot/mlir-rocm-mi200/llvm-project/mlir/lib/Bindings/Python/IRAttributes.cpp.o 
CCACHE_CPP2=yes CCACHE_HASHDIR=yes /usr/bin/ccache /usr/bin/clang++ -DMLIRPythonModules_extension__mlir_dso_EXPORTS -DMLIR_INCLUDE_TESTS -DNB_DOMAIN=mlir -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/vol/worker/mi200-buildbot/mlir-rocm-mi200/build/tools/mlir/python -I/vol/worker/mi200-buildbot/mlir-rocm-mi200/llvm-project/mlir/python -I/vol/worker/mi200-buildbot/mlir-rocm-mi200/build/include -I/vol/worker/mi200-buildbot/mlir-rocm-mi200/llvm-project/llvm/include -I/vol/worker/mi200-buildbot/mlir-rocm-mi200/llvm-project/mlir/include -I/vol/worker/mi200-buildbot/mlir-rocm-mi200/build/tools/mlir/include -I/usr/include/python3.8 -I/home/buildbot/.local/lib/python3.8/site-packages/nanobind/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -Wundef -Werror=mismatched-tags -O3 -DNDEBUG -fPIC -fvisibility=hidden -UNDEBUG -fno-stack-protector -Os -frtti -fexceptions -ffunction-sections -fdata-sections -std=c++17 -MD -MT tools/mlir/python/CMakeFiles/MLIRPythonModules.extension._mlir.dso.dir/vol/worker/mi200-buildbot/mlir-rocm-mi200/llvm-project/mlir/lib/Bindings/Python/IRAttributes.cpp.o -MF tools/mlir/python/CMakeFiles/MLIRPythonModules.extension._mlir.dso.dir/vol/worker/mi200-buildbot/mlir-rocm-mi200/llvm-project/mlir/lib/Bindings/Python/IRAttributes.cpp.o.d -o tools/mlir/python/CMakeFiles/MLIRPythonModules.extension._mlir.dso.dir/vol/worker/mi200-buildbot/mlir-rocm-mi200/llvm-project/mlir/lib/Bindings/Python/IRAttributes.cpp.o -c /vol/worker/mi200-buildbot/mlir-rocm-mi200/llvm-project/mlir/lib/Bindings/Python/IRAttributes.cpp
In file included from /vol/worker/mi200-buildbot/mlir-rocm-mi200/llvm-project/mlir/lib/Bindings/Python/IRAttributes.cpp:9:
In file included from /home/buildbot/.local/lib/python3.8/site-packages/nanobind/include/nanobind/nanobind.h:48:
/home/buildbot/.local/lib/python3.8/site-packages/nanobind/include/nanobind/nb_types.h:182:64: warning: cast from 'const _object *' to '_object *' drops const qualifier [-Wcast-qual]
  182 |     NB_INLINE handle(const PyObject *ptr) : m_ptr((PyObject *) ptr) { }
      |                                                                ^
/home/buildbot/.local/lib/python3.8/site-packages/nanobind/include/nanobind/nb_types.h:183:68: warning: cast from 'const _typeobject *' to '_object *' drops const qualifier [-Wcast-qual]
  183 |     NB_INLINE handle(const PyTypeObject *ptr) : m_ptr((PyObject *) ptr) { }
      |                                                                    ^
In file included from /vol/worker/mi200-buildbot/mlir-rocm-mi200/llvm-project/mlir/lib/Bindings/Python/IRAttributes.cpp:9:
In file included from /home/buildbot/.local/lib/python3.8/site-packages/nanobind/include/nanobind/nanobind.h:56:
/home/buildbot/.local/lib/python3.8/site-packages/nanobind/include/nanobind/nb_class.h:115:9: warning: anonymous types declared in an anonymous union are an extension [-Wnested-anon-types]
  115 |         struct {
      |         ^
/home/buildbot/.local/lib/python3.8/site-packages/nanobind/include/nanobind/nb_class.h:121:9: warning: anonymous types declared in an anonymous union are an extension [-Wnested-anon-types]
  121 |         struct {
      |         ^
In file included from /vol/worker/mi200-buildbot/mlir-rocm-mi200/llvm-project/mlir/lib/Bindings/Python/IRAttributes.cpp:10:
/home/buildbot/.local/lib/python3.8/site-packages/nanobind/include/nanobind/ndarray.h:82:41: warning: extra ';' outside of a function is incompatible with C++98 [-Wc++98-compat-extra-semi]
   82 | NB_FRAMEWORK(no_framework, 0, "ndarray");
      |                                         ^
/home/buildbot/.local/lib/python3.8/site-packages/nanobind/include/nanobind/ndarray.h:83:40: warning: extra ';' outside of a function is incompatible with C++98 [-Wc++98-compat-extra-semi]
   83 | NB_FRAMEWORK(numpy, 1, "numpy.ndarray");
      |                                        ^
/home/buildbot/.local/lib/python3.8/site-packages/nanobind/include/nanobind/ndarray.h:84:41: warning: extra ';' outside of a function is incompatible with C++98 [-Wc++98-compat-extra-semi]
   84 | NB_FRAMEWORK(pytorch, 2, "torch.Tensor");
      |                                         ^
/home/buildbot/.local/lib/python3.8/site-packages/nanobind/include/nanobind/ndarray.h:85:75: warning: extra ';' outside of a function is incompatible with C++98 [-Wc++98-compat-extra-semi]
   85 | NB_FRAMEWORK(tensorflow, 3, "tensorflow.python.framework.ops.EagerTensor");
      |                                                                           ^
/home/buildbot/.local/lib/python3.8/site-packages/nanobind/include/nanobind/ndarray.h:86:57: warning: extra ';' outside of a function is incompatible with C++98 [-Wc++98-compat-extra-semi]
   86 | NB_FRAMEWORK(jax, 4, "jaxlib.xla_extension.DeviceArray");
      |                                                         ^
/home/buildbot/.local/lib/python3.8/site-packages/nanobind/include/nanobind/ndarray.h:87:38: warning: extra ';' outside of a function is incompatible with C++98 [-Wc++98-compat-extra-semi]
   87 | NB_FRAMEWORK(cupy, 5, "cupy.ndarray");
      |                                      ^
/home/buildbot/.local/lib/python3.8/site-packages/nanobind/include/nanobind/ndarray.h:90:19: warning: extra ';' outside of a function is incompatible with C++98 [-Wc++98-compat-extra-semi]
   90 | NB_DEVICE(none, 0); NB_DEVICE(cpu, 1); NB_DEVICE(cuda, 2);

```

</details>

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


More information about the Mlir-commits mailing list