Skip to content

[mlir][Python] Bump MLIR Python minimum version to 3.10 - #163499

Merged
makslevental merged 1 commit into
mainfrom
users/makslevental/bump-python-3.10
Jan 5, 2026
Merged

[mlir][Python] Bump MLIR Python minimum version to 3.10#163499
makslevental merged 1 commit into
mainfrom
users/makslevental/bump-python-3.10

Conversation

@makslevental

@makslevental makslevental commented Oct 15, 2025

Copy link
Copy Markdown
Contributor

This PR bumps the minimum Python version required for MLIR to be Python 3.10. See https://discourse.llvm.org/t/rfc-adopt-regularly-scheduled-python-minimum-version-bumps/88841 for a discussion about the expected bump schedule going forward.

@makslevental
makslevental force-pushed the users/makslevental/bump-python-3.10 branch from 9b4faa7 to 0e1862e Compare November 11, 2025 18:14
@makslevental makslevental changed the title [Python] Bump Python minimum version to 3.10 [Python] Bump MLIR Python minimum version to 3.10 Nov 11, 2025
@makslevental
makslevental force-pushed the users/makslevental/bump-python-3.10 branch from 0e1862e to 0c71423 Compare January 4, 2026 17:37
@makslevental makslevental changed the title [Python] Bump MLIR Python minimum version to 3.10 [mlir][Python] Bump MLIR Python minimum version to 3.10 Jan 4, 2026
@makslevental

makslevental commented Jan 4, 2026

Copy link
Copy Markdown
Contributor Author

All builder bot runs (you can check that fails are unrelated to Python/MLIR/etc):

llvm-clang-win-x-aarch64-release
clang-m68k-linux-cross
aosp-O3-polly-before-vectorizer-unprofitable
clang-hexagon-elf
publish-lnt-sphinx-docs
flang-aarch64-libcxx
bolt-x86_64-ubuntu-nfc
clang-ppc64le-linux-test-suite
reverse-iteration
libunwind-sphinx-docs
ppc64le-lld-multistage-test
bolt-aarch64-ubuntu-nfc
llvm-clang-x86_64-win-fast
arc-builder
clang-aarch64-sve-vls-2stage
clang-x86_64-linux-abi-test
openmp-offload-amdgpu-runtime-2
fuchsia-x86_64-linux
clang-solaris11-sparcv9
clang-cuda-p4
clang-aarch64-sve-vla
lldb-arm-ubuntu
flang-aarch64-debug-reverse-iteration
llvm-clang-x86_64-darwin
sanitizer-aarch64-linux-bootstrap-asan
sanitizer-x86_64-linux-bootstrap-ubsan
polly-x86_64-linux-noassert
flang-aarch64-rel-assert
sanitizer-x86_64-linux-fuzzer
lld-x86_64-ubuntu-fast
llvm-clang-win-x-armv7l-release
__Janitor
llvm-clang-win-x-armv7l
clang-armv7-global-isel
clang-aarch64-sve-vla-2stage
libc-x86_64-debian
publish-sphinx-docs
llvm-clang-x86_64-sie-win
llvm-clang-x86_64-win-release
flang-aarch64-dylib
sanitizer-aarch64-linux
sanitizer-x86_64-linux-bootstrap-asan
flang-aarch64-out-of-tree
llvm-nvptx-nvidia-win
sanitizer-aarch64-linux-bootstrap-hwasan
llvm-clang-aarch64-darwin-release
lldb-aarch64-ubuntu
lld-x86_64-ubuntu-release
clang-aarch64-quick
sanitizer-x86_64-linux
clang-cuda-t4
libc-aarch64-ubuntu-fullbuild-dbg
sanitizer-ppc64le-linux
llvm-clang-x86_64-sie-win-release
polly-x86_64-linux-shlib-plugin
flang-aarch64-sharedlibs
sanitizer-aarch64-linux-bootstrap-ubsan
clang-riscv-rva20-2stage
polly-arm-linux
libc-x86_64-debian-dbg
sanitizer-aarch64-linux-bootstrap-msan
polly-x86_64-linux-shared
polly-x86_64-linux-shlib
llvm-clang-x86_64-expensive-checks-ubuntu-release
clang-cuda-l4
llvm-clang-x86_64-gcc-ubuntu-release
libc-aarch64-ubuntu-dbg
polly-x86_64-linux
lld-sphinx-docs
sanitizer-windows
clang-debian-cpp20
publish-doxygen-docs
bolt-x86_64-ubuntu-clang
clang-with-thin-lto-ubuntu-release
mlir-nvidia-gcc7
polly-x86_64-linux-shared-plugin
bolt-x86_64-ubuntu-dylib
clang-hip-vega20
clang-aarch64-global-isel
clang-with-thin-lto-ubuntu
bolt-aarch64-ubuntu-clang
ppc64le-mlir-rhel-clang
flang-aarch64-latest-gcc
libc-x86_64-debian-gcc-fullbuild-dbg
clang-riscv-rva23-evl-vec-2stage
clangd-ubuntu-tsan
clang-armv7-vfpv3-2stage
ml-opt-dev-x86-64
mlir-nvidia
sanitizer-x86_64-linux-qemu
openmp-offload-sles-build-only
lldb-aarch64-windows
clang-aarch64-sve-vls
llvm-clang-x86_64-sie-ubuntu-fast
clang-ppc64le-rhel
libc-x86_64-debian-dbg-asan
polly-sphinx-docs
bolt-x86_64-ubuntu-shared
clang-armv8-quick
llvm-nvptx64-nvidia-win
ppc64le-flang-rhel-clang
polly-x86_64-linux-plugin
sanitizer-aarch64-linux-fuzzer
clang-arm64-windows-msvc
lldb-x86_64-debian
cross-project-tests-sie-ubuntu-dwarf5
sanitizer-x86_64-linux-bootstrap-msan
sanitizer-x86_64-linux-fast
libc-x86_64-debian-fullbuild-dbg-asan
flang-aarch64-release
llvm-clang-x86_64-gcc-ubuntu
ml-opt-devrel-x86-64
mlir-rocm-mi200
publish-runtimes-sphinx-docs
libc-x86_64-debian-fullbuild-dbg
cross-project-tests-sie-ubuntu
ml-opt-rel-x86-64
sanitizer-x86_64-linux-android
llvm-clang-x86_64-expensive-checks-ubuntu
llvm-clang-aarch64-darwin
llvm-clang-win-x-aarch64
libc-riscv32-qemu-yocto-fullbuild-dbg
lldb-remote-linux-win
clang-aarch64-sve2-vla
clang-aarch64-sve2-vla-2stage
libc-x86_64-debian-dbg-bootstrap-build
llvm-clang-x86_64-gcc-ubuntu-no-asserts
amdgpu-offload-ubuntu-22-cmake-build-only
amdgpu-offload-rhel-8-cmake-build-only
amdgpu-offload-rhel-9-cmake-build-only
hip-third-party-libs-test
flang-arm64-windows-msvc
clang-riscv-gauntlet
lldb-x86_64-win
clang-riscv-rva23-zvl512b-2stage
clang-riscv-rva23-zvl1024b-2stage
clang-riscv-x60-mrvv-vec-bits-2stage
libc-arm32-qemu-debian-dbg
bolt-aarch64-ubuntu-dylib
bolt-aarch64-ubuntu-shared
flang-arm64-windows-msvc-testsuite
llvm-clang-x86_64-expensive-checks-win
clang-with-lto-ubuntu
clang-ppc64-aix
clang-armv7-2stage
https://lab.llvm.org/buildbot/#/buildrequests/6672018?redirect_to_build=true
https://lab.llvm.org/buildbot/#/buildrequests/6672053?redirect_to_build=true
https://lab.llvm.org/buildbot/#/buildrequests/6672055?redirect_to_build=true
https://lab.llvm.org/buildbot/#/buildrequests/6672114?redirect_to_build=true

@makslevental
makslevental marked this pull request as ready for review January 5, 2026 01:12
@llvmbot llvmbot added the mlir label Jan 5, 2026
@llvmbot

llvmbot commented Jan 5, 2026

Copy link
Copy Markdown
Member

@llvm/pr-subscribers-mlir

Author: Maksim Levental (makslevental)

Changes

This PR bumps the minimum Python version required for MLIR to be Python 3.10.


Full diff: https://github.com/llvm/llvm-project/pull/163499.diff

1 Files Affected:

  • (modified) mlir/cmake/modules/MLIRDetectPythonEnv.cmake (+4-3)
diff --git a/mlir/cmake/modules/MLIRDetectPythonEnv.cmake b/mlir/cmake/modules/MLIRDetectPythonEnv.cmake
index fb0fbf3457ade..098d12aedeb91 100644
--- a/mlir/cmake/modules/MLIRDetectPythonEnv.cmake
+++ b/mlir/cmake/modules/MLIRDetectPythonEnv.cmake
@@ -1,5 +1,6 @@
 # Macros and functions related to detecting details of the Python environment.
 
+set(MLIR_MINIMUM_PYTHON_VERSION 3.10)
 # Finds and configures python packages needed to build MLIR Python bindings.
 macro(mlir_configure_python_dev_packages)
   if(NOT MLIR_DISABLE_CONFIGURE_PYTHON_DEV_PACKAGES)
@@ -8,7 +9,7 @@ macro(mlir_configure_python_dev_packages)
       # package. This seems to work around cmake bugs searching only for
       # Development.Module in some environments. However, in other environments
       # it may interfere with the subsequent search for Development.Module.
-      find_package(Python3 ${LLVM_MINIMUM_PYTHON_VERSION}
+      find_package(Python3 ${MLIR_MINIMUM_PYTHON_VERSION}
         COMPONENTS Interpreter Development)
     endif()
 
@@ -19,7 +20,7 @@ macro(mlir_configure_python_dev_packages)
     # See https://pybind11.readthedocs.io/en/stable/compiling.html#findpython-mode
     set(_python_development_component Development.Module)
 
-    find_package(Python3 ${LLVM_MINIMUM_PYTHON_VERSION}
+    find_package(Python3 ${MLIR_MINIMUM_PYTHON_VERSION}
       COMPONENTS Interpreter ${_python_development_component} REQUIRED)
 
     # We look for both Python3 and Python, the search algorithm should be
@@ -39,7 +40,7 @@ macro(mlir_configure_python_dev_packages)
 
     # It's a little silly to detect Python a second time, but nanobind's cmake
     # code looks for Python_ not Python3_.
-    find_package(Python ${LLVM_MINIMUM_PYTHON_VERSION}
+    find_package(Python ${MLIR_MINIMUM_PYTHON_VERSION}
       COMPONENTS Interpreter ${_python_development_component} REQUIRED)
 
     unset(_python_development_component)

@boomanaiden154 boomanaiden154 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This LGTM as long as all of the bots building MLIR have greater than the minimum Python version.

Please link the RFC from the description as that's where the discussion actually happened.

@makslevental
makslevental merged commit f5dab90 into main Jan 5, 2026
13 checks passed
@makslevental
makslevental deleted the users/makslevental/bump-python-3.10 branch January 5, 2026 01:43
mahesh-attarde pushed a commit to mahesh-attarde/llvm-project that referenced this pull request Jan 6, 2026
This PR bumps the minimum Python version required for MLIR to be Python
3.10. See
https://discourse.llvm.org/t/rfc-adopt-regularly-scheduled-python-minimum-version-bumps/88841
for a discussion about the expected bump schedule going forward.
kuhar pushed a commit that referenced this pull request Feb 27, 2026
According to PR #163499, minimum Python version for mlir-py is now 3.10,
we no longer need patches for py<=3.9.

This change aligns with the Python version bump policy discussed
[here](https://discourse.llvm.org/t/rfc-adopt-regularly-scheduled-python-minimum-version-bumps/88841).
kuhar pushed a commit to iree-org/llvm-project that referenced this pull request Mar 1, 2026
According to PR llvm#163499, minimum Python version for mlir-py is now 3.10,
we no longer need patches for py<=3.9.

This change aligns with the Python version bump policy discussed
[here](https://discourse.llvm.org/t/rfc-adopt-regularly-scheduled-python-minimum-version-bumps/88841).
RattataKing added a commit to iree-org/llvm-project that referenced this pull request Mar 2, 2026
According to PR llvm#163499, minimum Python version for mlir-py is now 3.10,
we no longer need patches for py<=3.9.

This change aligns with the Python version bump policy discussed
[here](https://discourse.llvm.org/t/rfc-adopt-regularly-scheduled-python-minimum-version-bumps/88841).
sujianIBM pushed a commit to sujianIBM/llvm-project that referenced this pull request Mar 5, 2026
According to PR llvm#163499, minimum Python version for mlir-py is now 3.10,
we no longer need patches for py<=3.9.

This change aligns with the Python version bump policy discussed
[here](https://discourse.llvm.org/t/rfc-adopt-regularly-scheduled-python-minimum-version-bumps/88841).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants