Skip to content
Open
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
11 changes: 3 additions & 8 deletions .github/workflows/build-upload-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
# Set LLVM_VERSION for the host to forward to the cibuildwheel
# environment.
env:
LLVM_VERSION: "20.1.8"
LLVM_VERSION: "22.1.8"
run: python -m cibuildwheel --output-dir wheelhouse

- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
Expand All @@ -69,7 +69,7 @@ jobs:

- name: Build sdist
env:
LLVM_VERSION: "20.1.8"
LLVM_VERSION: "22.1.8"
run: pipx run build --sdist

- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
Expand All @@ -85,12 +85,7 @@ jobs:
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']
exclude:
- python-version: '3.14'
numba-version: '0.62.0'
- python-version: '3.14'
numba-version: '0.62.1'
numba-version: ['0.66.0']

steps:
- name: Download built wheels
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ conda install -c python-for-hpc -c conda-forge pyomp

| PyOMP | Numba |
| ----- | --------------- |
| 0.6.x | 0.66.x |
| 0.5.x | 0.62.x - 0.63.x |
| 0.4.x | 0.61.x |
| 0.3.x | 0.57.x - 0.60.x |
Expand Down
2 changes: 1 addition & 1 deletion buildscripts/cibuildwheel/setup-miniforge3.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,4 @@ source "_stage/miniforge3/bin/activate" base

# Create conda environment with tools and libraries for the LLVM_VERSION.
echo "Installing llvmdev ${LLVM_VERSION}..."
conda create -n llvmdev-${LLVM_VERSION} --override-channels -c conda-forge -q -y clang=${LLVM_VERSION} clangxx=${LLVM_VERSION} clang-tools=${LLVM_VERSION} llvmdev=${LLVM_VERSION} zstd
conda create -n llvmdev-${LLVM_VERSION} --override-channels -c conda-forge -q -y clang=${LLVM_VERSION} clangxx=${LLVM_VERSION} clang-tools=${LLVM_VERSION} llvmdev=${LLVM_VERSION} lld=${LLVM_VERSION} zstd
14 changes: 7 additions & 7 deletions buildscripts/conda-recipes/pyomp/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% set version = environ.get('GIT_DESCRIBE_TAG', '0.0.0').lstrip('v') %}
{% set LLVM_VERSION = environ.get('LLVM_VERSION', '20.1.8') %}
{% set LLVM_VERSION = environ.get('LLVM_VERSION', '22.1.8') %}
{% set LLVM_VERSION_MAJOR = LLVM_VERSION.split('.')[0] %}
{% set LLVM_VERSION_MINOR = LLVM_VERSION.split('.')[1] %}

Expand Down Expand Up @@ -34,6 +34,7 @@ requirements:
- sysroot_linux-aarch64 # [aarch64]
- cmake
- ninja
- patch # [linux]
- setuptools_scm
- elfutils # [linux]
- libffi # [linux]
Expand All @@ -45,24 +46,23 @@ requirements:
- sysroot_linux-aarch64 # [aarch64]
- setuptools
- setuptools_scm
- numba >=0.62, <0.64
- numba >=0.66, <0.67
- clang {{ LLVM_VERSION }}
- clangxx {{ LLVM_VERSION }}
- clang-tools {{ LLVM_VERSION }}
- llvmdev {{ LLVM_VERSION }}
- lld {{ LLVM_VERSION }} # [linux]
- zlib
# require llvm-openmp for the openmp cpu runtime.
- llvm-openmp 21.1.8.* # [osx]
- llvm-openmp {{ LLVM_VERSION }} # [not osx]
- llvm-openmp {{ LLVM_VERSION }}
- elfutils # [linux]
- libffi # [linux]
run:
- python
- setuptools
- numba >=0.62, <0.64
- numba >=0.66, <0.67
# require llvm-openmp for the openmp cpu runtime.
- llvm-openmp 21.1.8.* # [osx]
- llvm-openmp {{ LLVM_VERSION }} # [not osx]
- llvm-openmp {{ LLVM_VERSION }}
- lark
- cffi

Expand Down
2 changes: 1 addition & 1 deletion buildscripts/conda-recipes/pyomp/run_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export PYTHONFAULTHANDLER=1
# of low accuracy SVML libm replacements in ufunc loops.
_NPY_CMD='from numba.misc import numba_sysinfo;\
sysinfo=numba_sysinfo.get_sysinfo();\
print(sysinfo["NumPy AVX512_SKX detected"] and
print("AVX512_SKX" in sysinfo["NumPy Supported SIMD features"] and
sysinfo["NumPy Version"]>="1.22")'
NUMPY_DETECTS_AVX512_SKX_NP_GT_122=$(python -c "$_NPY_CMD")
echo "NumPy >= 1.22 with AVX512_SKX detected: $NUMPY_DETECTS_AVX512_SKX_NP_GT_122"
Expand Down
2 changes: 1 addition & 1 deletion 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.66.0"
MINIFORGE_VERSION = "26.3.2-3"
MINIFORGE_SHA256 = "848194851a98903134187fbb4ab50efe87b003e0c0f808f97644b7524a62bf2c"
WHEEL_DIRECTORY = (
Expand Down
2 changes: 2 additions & 0 deletions docs/source/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ supported.
+--------+---------------------+
| PyOMP | Numba |
+========+=====================+
| 0.6.x | 0.66.x |
+--------+---------------------+
| 0.5.x | 0.62.x - 0.63.x |
+--------+---------------------+
| 0.4.x | 0.61.x |
Expand Down
1 change: 1 addition & 0 deletions docs/source/openmp.rst
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,7 @@ The following table shows tested combinations of PyOMP, Numba, Python, LLVM, and
===================== ==================== ==================== ============ ================================
PyOMP Numba Python LLVM Supported Platforms
===================== ==================== ==================== ============ ================================
0.6.x 0.66.x 3.10 - 3.14 22.x linux-64, osx-arm64, linux-arm64
0.5.x 0.62.x - 0.63.x 3.10 - 3.14 20.x linux-64, osx-arm64, linux-arm64
0.4.x 0.61.x 3.10 - 3.13 15.x linux-64, osx-arm64, linux-arm64
0.3.x 0.57.x - 0.60.x 3.9 - 3.12 14.x linux-64, osx-arm64, linux-arm64
Expand Down
13 changes: 8 additions & 5 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.66, <0.67", "lark", "cffi", "setuptools"]
maintainers = [
{ name = "Giorgis Georgakoudis", email = "georgakoudis1@llnl.gov" },
]
Expand Down Expand Up @@ -57,15 +57,18 @@ PIP_NO_INPUT = "1"

[tool.cibuildwheel.linux]
before-all = [
"yum install -y elfutils-libelf-devel libffi-devel clang-devel-20.1.8 llvm-devel-20.1.8",
"yum install -y elfutils-libelf-devel libffi-devel patch",
"bash buildscripts/cibuildwheel/setup-miniforge3.sh",
]

[tool.cibuildwheel.linux.environment]
# Conda's C++ runtime is newer than the manylinux system runtime.
LDFLAGS = "-static-libstdc++ -static-libgcc"
ENABLE_BUNDLED_LIBOMP = "1"
ENABLE_BUNDLED_LIBOMPTARGET = "1"
LLVM_DIR = "/usr/lib64/cmake/llvm"
CC = "/usr/bin/clang"
CXX = "/usr/bin/clang++"
LLVM_DIR = "${PWD}/_stage/miniforge3/envs/llvmdev-${LLVM_VERSION}/lib/cmake/llvm"
CC = "${PWD}/_stage/miniforge3/envs/llvmdev-${LLVM_VERSION}/bin/clang"
CXX = "${PWD}/_stage/miniforge3/envs/llvmdev-${LLVM_VERSION}/bin/clang++"

[tool.cibuildwheel.macos]
before-all = ["bash buildscripts/cibuildwheel/setup-miniforge3.sh"]
Expand Down
23 changes: 23 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,10 @@ def _build_cmake(self, ext: CMakeExtension):
lib_dir = Path(self.build_lib) / "numba/openmp/libs"

extra_cmake_args = self._env_toolchain_args(ext)
if ext.name.startswith("libompdevice-"):
extra_cmake_args.append(
f"-DLLVM_LIBRARY_OUTPUT_INTDIR={build_dir.absolute() / 'lib'}"
)
# Set RPATH.
if sys.platform.startswith("linux"):
extra_cmake_args.append(r"-DCMAKE_INSTALL_RPATH=$ORIGIN")
Expand Down Expand Up @@ -359,13 +363,32 @@ def _check_true(env_var):
cmake_args=[
"-DOPENMP_STANDALONE_BUILD=ON",
"-DLLVM_ENABLE_RUNTIMES=offload",
"-DLLVM_INCLUDE_TESTS=OFF",
# Avoid conflicts in manylinux builds with packaged clang/llvm
# under /usr/include and its gcc-toolset provided header files.
"-DCMAKE_NO_SYSTEM_FROM_IMPORTED=ON",
],
)
)

# LLVM 22 builds GPU device bitcode separately from libomptarget.
for target in ("nvptx64-nvidia-cuda", "amdgcn-amd-amdhsa"):
ext_modules.append(
CMakeExtension(
f"libompdevice-{target}",
setup=PrepareOpenMP,
source_dir=PrepareOpenMP.get_source_dir().parent / "openmp",
install_dir="openmp",
cmake_args=[
f"-DLLVM_DEFAULT_TARGET_TRIPLE={target}",
"-DLLVM_INCLUDE_TESTS=OFF",
# Host CPU flags from Conda do not apply to GPU bitcode.
"-DCMAKE_C_FLAGS=",
"-DCMAKE_CXX_FLAGS=",
],
)
)


setup(
ext_modules=ext_modules,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
--- a/offload/plugins-nextgen/CMakeLists.txt
+++ b/offload/plugins-nextgen/CMakeLists.txt
@@ -4,6 +4,7 @@
add_subdirectory(common)
function(add_target_library target_name lib_name)
add_llvm_library(${target_name} STATIC
+ DISABLE_LLVM_LINK_LLVM_DYLIB
LINK_COMPONENTS
AggressiveInstCombine
Analysis
--- a/offload/libomptarget/CMakeLists.txt
+++ b/offload/libomptarget/CMakeLists.txt
@@ -8,6 +8,7 @@

add_llvm_library(omptarget
SHARED
+ DISABLE_LLVM_LINK_LLVM_DYLIB

device.cpp
interface.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
--- a/offload/CMakeLists.txt
+++ b/offload/CMakeLists.txt
@@ -391,7 +391,6 @@
# Build target agnostic offloading library.
add_subdirectory(libomptarget)

-add_subdirectory(liboffload)

# Add tests.
if(OFFLOAD_INCLUDE_TESTS)
Loading