Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions .github/workflows/build-upload-conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
matrix:
# TODO: Add windows.
os: [ubuntu-latest, macos-latest, ubuntu-24.04-arm]
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14", "3.14t"]
steps:
- name: Determine conda label
run: |
Expand Down Expand Up @@ -62,15 +62,22 @@ jobs:
conda config --set anaconda_upload no
conda build --version

# Select the python variant; 3.14t needs the free-threaded ABI.
if [[ "${{ matrix.python-version }}" == "3.14t" ]]; then
PY_ARGS=(--python "3.14.* *_cp314t" -m buildscripts/conda-recipes/pyomp/freethreading.yaml)
else
PY_ARGS=(--python ${{ matrix.python-version }})
fi

# Build the package.
conda build \
-c conda-forge \
--python ${{ matrix.python-version }} \
"${PY_ARGS[@]}" \
buildscripts/conda-recipes/pyomp

# Get the output file path.
OUTPUT=$(conda build -c conda-forge --output \
--python ${{ matrix.python-version }} \
"${PY_ARGS[@]}" \
buildscripts/conda-recipes/pyomp)

# Upload the package.
Expand Down
15 changes: 13 additions & 2 deletions .github/workflows/build-upload-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,24 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, ubuntu-24.04-arm]
python-version: ['3.10', '3.11', '3.12', '3.13', '3.14']
numba-version: ['0.62.0', '0.62.1', '0.63.0', '0.63.1']
python-version: ['3.10', '3.11', '3.12', '3.13', '3.14', '3.14t']
numba-version: ['0.62.0', '0.62.1', '0.63.0', '0.63.1', '0.64.0', '0.65.0', '0.65.1']
exclude:
- python-version: '3.14'
numba-version: '0.62.0'
- python-version: '3.14'
numba-version: '0.62.1'
# Numba supports free-threaded Python starting with 0.65.
- python-version: '3.14t'
numba-version: '0.62.0'
- python-version: '3.14t'
numba-version: '0.62.1'
- python-version: '3.14t'
numba-version: '0.63.0'
- python-version: '3.14t'
numba-version: '0.63.1'
- python-version: '3.14t'
numba-version: '0.64.0'

steps:
- name: Download built wheels
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,12 @@ conda install -c python-for-hpc -c conda-forge pyomp

| PyOMP | Numba |
| ----- | --------------- |
| 0.5.x | 0.62.x - 0.63.x |
| 0.5.x | 0.62.x - 0.65.x |
| 0.4.x | 0.61.x |
| 0.3.x | 0.57.x - 0.60.x |

Python 3.14t (free-threaded) requires Numba 0.65.x.

Besides a standard installation, we also provide the following options to
quickly try out PyOMP online or through a container.

Expand Down
5 changes: 5 additions & 0 deletions buildscripts/conda-recipes/pyomp/conda_build_config.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# --- Free-threading ---
# Default for the is_freethreading selector in meta.yaml; override for 3.14t.
is_freethreading:
- false

# --- Compilers ---
c_compiler_version:
- 9 # [linux]
Expand Down
4 changes: 4 additions & 0 deletions buildscripts/conda-recipes/pyomp/freethreading.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Variant for free-threaded Python (3.14t) builds, passed with -m. Use this
# instead of --variants, which `conda build --output` ignores.
is_freethreading:
- true
6 changes: 4 additions & 2 deletions buildscripts/conda-recipes/pyomp/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ requirements:
- sysroot_linux-aarch64 # [aarch64]
- setuptools
- setuptools_scm
- numba >=0.62, <0.64
- numba >=0.62, <0.66
- numba >=0.65, <0.66 # [is_freethreading]
- clang {{ LLVM_VERSION }}
- clangxx {{ LLVM_VERSION }}
- clang-tools {{ LLVM_VERSION }}
Expand All @@ -59,7 +60,8 @@ requirements:
run:
- python
- setuptools
- numba >=0.62, <0.64
- numba >=0.62, <0.66
- numba >=0.65, <0.66 # [is_freethreading]
# require llvm-openmp for the openmp cpu runtime.
- llvm-openmp 21.1.8.* # [osx]
- llvm-openmp {{ LLVM_VERSION }} # [not osx]
Expand Down
5 changes: 3 additions & 2 deletions buildscripts/modal/test_gpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@


PYTHON_VERSIONS = ("3.10", "3.11", "3.12", "3.13", "3.14")
NUMBA_VERSION = "0.63.1"
NUMBA_VERSION = "0.65.1"
MINIFORGE_VERSION = "26.3.2-3"
MINIFORGE_SHA256 = "848194851a98903134187fbb4ab50efe87b003e0c0f808f97644b7524a62bf2c"
WHEEL_DIRECTORY = (
Expand All @@ -26,7 +26,8 @@ def find_linux_wheels() -> dict[str, Path]:
wheels = {}
for python_version in PYTHON_VERSIONS:
abi = python_version.replace(".", "")
matches = sorted(WHEEL_DIRECTORY.glob(f"*cp{abi}-*x86_64.whl"))
# Match the ABI tag too, so cp314 does not also match cp314t wheels.
matches = sorted(WHEEL_DIRECTORY.glob(f"*-cp{abi}-cp{abi}-*x86_64.whl"))
if len(matches) != 1:
raise RuntimeError(
f"Expected one cp{abi} Linux x86-64 wheel in {WHEEL_DIRECTORY}, "
Expand Down
4 changes: 3 additions & 1 deletion docs/source/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,15 @@ supported.
+--------+---------------------+
| PyOMP | Numba |
+========+=====================+
| 0.5.x | 0.62.x - 0.63.x |
| 0.5.x | 0.62.x - 0.65.x |
+--------+---------------------+
| 0.4.x | 0.61.x |
+--------+---------------------+
| 0.3.x | 0.57.x - 0.60.x |
+--------+---------------------+

Python 3.14t (free-threaded) requires Numba 0.65.x.

Additional options
------------------

Expand Down
5 changes: 2 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ classifiers = [
"Intended Audience :: Developers",
"Topic :: Software Development :: Compilers",
]
dependencies = ["numba>=0.62, <0.64", "lark", "cffi", "setuptools"]
dependencies = ["numba>=0.62, <0.66", "lark", "cffi", "setuptools"]
maintainers = [
{ name = "Giorgis Georgakoudis", email = "georgakoudis1@llnl.gov" },
]
Expand All @@ -42,8 +42,7 @@ archs = ["native"]
environment-pass = ["LLVM_VERSION"]
# We use miniconda3 to get the clang/llvm toolchain on Linux.
before-build = ["rm -rf build dist src/*.egg-info"]
# Skip building 3.14t wheels as they are not supported by the current numba/llvmlite version.
skip = ["*-musllinux_*", "cp38-*", "cp314t-*"]
skip = ["*-musllinux_*", "cp38-*"]
test-command = [
# Run host OpenMP tests.
"RUN_TARGET=0 python -m numba.runtests -v -- numba.openmp.tests.test_openmp",
Expand Down
12 changes: 12 additions & 0 deletions src/numba/openmp/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
import llvmlite.binding as ll
import sys
import sysconfig

import numba

# Numba supports free-threaded Python starting with 0.65.
if sysconfig.get_config_var("Py_GIL_DISABLED") and tuple(
int(x) for x in numba.__version__.split(".")[:2]
) < (0, 65):
raise ImportError(
f"PyOMP on free-threaded Python requires numba>=0.65, found {numba.__version__}"
)

from ._version import version as __version__ # noqa: F401

from .config import (
Expand Down
Loading