Skip to content

Commit 49aa7d8

Browse files
ggeorgakoudisclaude
andcommitted
Support numba up to 0.65.1 and Python 3.14t
Numba 0.64 and 0.65 keep llvmlite on LLVM 20, so no pass or runtime changes are needed; this extends the supported range and enables the free-threaded build that Numba 0.65 introduces. Packaging: - Widen the numba requirement to >=0.62, <0.66 in pyproject.toml and the conda recipe - Build cp314t wheels by removing the cibuildwheel skip - Require numba >=0.65 for free-threaded conda builds via the is_freethreading selector (default false in conda_build_config.yaml) - Raise ImportError at import time on free-threaded Python with numba < 0.65 CI: - Test wheels against numba 0.64.0, 0.65.0 and 0.65.1, and add Python 3.14t (numba 0.65.x only) - Build and upload a 3.14t conda package, selecting the free-threaded variant with a variant file (freethreading.yaml) because `conda build --output` ignores --variants - Modal GPU tests: match the ABI tag when selecting wheels, so cp314 no longer also matches cp314t, and test with numba 0.65.1 Docs: - Update the compatibility matrix to 0.62.x - 0.65.x and note that Python 3.14t requires numba 0.65.x Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
1 parent b4b024d commit 49aa7d8

10 files changed

Lines changed: 59 additions & 14 deletions

File tree

‎.github/workflows/build-upload-conda.yml‎

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
matrix:
2525
# TODO: Add windows.
2626
os: [ubuntu-latest, macos-latest, ubuntu-24.04-arm]
27-
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
27+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14", "3.14t"]
2828
steps:
2929
- name: Determine conda label
3030
run: |
@@ -62,15 +62,22 @@ jobs:
6262
conda config --set anaconda_upload no
6363
conda build --version
6464
65+
# Select the python variant; 3.14t needs the free-threaded ABI.
66+
if [[ "${{ matrix.python-version }}" == "3.14t" ]]; then
67+
PY_ARGS=(--python "3.14.* *_cp314t" -m buildscripts/conda-recipes/pyomp/freethreading.yaml)
68+
else
69+
PY_ARGS=(--python ${{ matrix.python-version }})
70+
fi
71+
6572
# Build the package.
6673
conda build \
6774
-c conda-forge \
68-
--python ${{ matrix.python-version }} \
75+
"${PY_ARGS[@]}" \
6976
buildscripts/conda-recipes/pyomp
7077
7178
# Get the output file path.
7279
OUTPUT=$(conda build -c conda-forge --output \
73-
--python ${{ matrix.python-version }} \
80+
"${PY_ARGS[@]}" \
7481
buildscripts/conda-recipes/pyomp)
7582
7683
# Upload the package.

‎.github/workflows/build-upload-wheels.yml‎

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,13 +84,24 @@ jobs:
8484
strategy:
8585
matrix:
8686
os: [ubuntu-latest, macos-latest, ubuntu-24.04-arm]
87-
python-version: ['3.10', '3.11', '3.12', '3.13', '3.14']
88-
numba-version: ['0.62.0', '0.62.1', '0.63.0', '0.63.1']
87+
python-version: ['3.10', '3.11', '3.12', '3.13', '3.14', '3.14t']
88+
numba-version: ['0.62.0', '0.62.1', '0.63.0', '0.63.1', '0.64.0', '0.65.0', '0.65.1']
8989
exclude:
9090
- python-version: '3.14'
9191
numba-version: '0.62.0'
9292
- python-version: '3.14'
9393
numba-version: '0.62.1'
94+
# Numba supports free-threaded Python starting with 0.65.
95+
- python-version: '3.14t'
96+
numba-version: '0.62.0'
97+
- python-version: '3.14t'
98+
numba-version: '0.62.1'
99+
- python-version: '3.14t'
100+
numba-version: '0.63.0'
101+
- python-version: '3.14t'
102+
numba-version: '0.63.1'
103+
- python-version: '3.14t'
104+
numba-version: '0.64.0'
94105

95106
steps:
96107
- name: Download built wheels

‎README.md‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,12 @@ conda install -c python-for-hpc -c conda-forge pyomp
4545

4646
| PyOMP | Numba |
4747
| ----- | --------------- |
48-
| 0.5.x | 0.62.x - 0.63.x |
48+
| 0.5.x | 0.62.x - 0.65.x |
4949
| 0.4.x | 0.61.x |
5050
| 0.3.x | 0.57.x - 0.60.x |
5151

52+
Python 3.14t (free-threaded) requires Numba 0.65.x.
53+
5254
Besides a standard installation, we also provide the following options to
5355
quickly try out PyOMP online or through a container.
5456

‎buildscripts/conda-recipes/pyomp/conda_build_config.yaml‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# --- Free-threading ---
2+
# Default for the is_freethreading selector in meta.yaml; override for 3.14t.
3+
is_freethreading:
4+
- false
5+
16
# --- Compilers ---
27
c_compiler_version:
38
- 9 # [linux]
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Variant for free-threaded Python (3.14t) builds, passed with -m. Use this
2+
# instead of --variants, which `conda build --output` ignores.
3+
is_freethreading:
4+
- true

‎buildscripts/conda-recipes/pyomp/meta.yaml‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ requirements:
4545
- sysroot_linux-aarch64 # [aarch64]
4646
- setuptools
4747
- setuptools_scm
48-
- numba >=0.62, <0.64
48+
- numba >=0.62, <0.66
49+
- numba >=0.65, <0.66 # [is_freethreading]
4950
- clang {{ LLVM_VERSION }}
5051
- clangxx {{ LLVM_VERSION }}
5152
- clang-tools {{ LLVM_VERSION }}
@@ -59,7 +60,8 @@ requirements:
5960
run:
6061
- python
6162
- setuptools
62-
- numba >=0.62, <0.64
63+
- numba >=0.62, <0.66
64+
- numba >=0.65, <0.66 # [is_freethreading]
6365
# require llvm-openmp for the openmp cpu runtime.
6466
- llvm-openmp 21.1.8.* # [osx]
6567
- llvm-openmp {{ LLVM_VERSION }} # [not osx]

‎buildscripts/modal/test_gpu.py‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99

1010
PYTHON_VERSIONS = ("3.10", "3.11", "3.12", "3.13", "3.14")
11-
NUMBA_VERSION = "0.63.1"
11+
NUMBA_VERSION = "0.65.1"
1212
MINIFORGE_VERSION = "26.3.2-3"
1313
MINIFORGE_SHA256 = "848194851a98903134187fbb4ab50efe87b003e0c0f808f97644b7524a62bf2c"
1414
WHEEL_DIRECTORY = (
@@ -26,7 +26,8 @@ def find_linux_wheels() -> dict[str, Path]:
2626
wheels = {}
2727
for python_version in PYTHON_VERSIONS:
2828
abi = python_version.replace(".", "")
29-
matches = sorted(WHEEL_DIRECTORY.glob(f"*cp{abi}-*x86_64.whl"))
29+
# Match the ABI tag too, so cp314 does not also match cp314t wheels.
30+
matches = sorted(WHEEL_DIRECTORY.glob(f"*-cp{abi}-cp{abi}-*x86_64.whl"))
3031
if len(matches) != 1:
3132
raise RuntimeError(
3233
f"Expected one cp{abi} Linux x86-64 wheel in {WHEEL_DIRECTORY}, "

‎docs/source/installation.rst‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,15 @@ supported.
2424
+--------+---------------------+
2525
| PyOMP | Numba |
2626
+========+=====================+
27-
| 0.5.x | 0.62.x - 0.63.x |
27+
| 0.5.x | 0.62.x - 0.65.x |
2828
+--------+---------------------+
2929
| 0.4.x | 0.61.x |
3030
+--------+---------------------+
3131
| 0.3.x | 0.57.x - 0.60.x |
3232
+--------+---------------------+
3333

34+
Python 3.14t (free-threaded) requires Numba 0.65.x.
35+
3436
Additional options
3537
------------------
3638

‎pyproject.toml‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ classifiers = [
1717
"Intended Audience :: Developers",
1818
"Topic :: Software Development :: Compilers",
1919
]
20-
dependencies = ["numba>=0.62, <0.64", "lark", "cffi", "setuptools"]
20+
dependencies = ["numba>=0.62, <0.66", "lark", "cffi", "setuptools"]
2121
maintainers = [
2222
{ name = "Giorgis Georgakoudis", email = "georgakoudis1@llnl.gov" },
2323
]
@@ -42,8 +42,7 @@ archs = ["native"]
4242
environment-pass = ["LLVM_VERSION"]
4343
# We use miniconda3 to get the clang/llvm toolchain on Linux.
4444
before-build = ["rm -rf build dist src/*.egg-info"]
45-
# Skip building 3.14t wheels as they are not supported by the current numba/llvmlite version.
46-
skip = ["*-musllinux_*", "cp38-*", "cp314t-*"]
45+
skip = ["*-musllinux_*", "cp38-*"]
4746
test-command = [
4847
# Run host OpenMP tests.
4948
"RUN_TARGET=0 python -m numba.runtests -v -- numba.openmp.tests.test_openmp",

‎src/numba/openmp/__init__.py‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
import llvmlite.binding as ll
22
import sys
3+
import sysconfig
4+
5+
import numba
6+
7+
# Numba supports free-threaded Python starting with 0.65.
8+
if sysconfig.get_config_var("Py_GIL_DISABLED") and tuple(
9+
int(x) for x in numba.__version__.split(".")[:2]
10+
) < (0, 65):
11+
raise ImportError(
12+
f"PyOMP on free-threaded Python requires numba>=0.65, found {numba.__version__}"
13+
)
14+
315
from ._version import version as __version__ # noqa: F401
416

517
from .config import (

0 commit comments

Comments
 (0)