Skip to content

Support LLVM 22 with Numba 0.66 - #75

Open
awennersteen wants to merge 11 commits into
Python-for-HPC:mainfrom
awennersteen:aw/support-llvm-22
Open

awennersteen wants to merge 11 commits into
Python-for-HPC:mainfrom
awennersteen:aw/support-llvm-22

Conversation

@awennersteen

@awennersteen awennersteen commented Sep 22, 2026

Copy link
Copy Markdown

README First

This PR is largely developed with Codex on GPT6-Astra medium. It was originally done for me to be able to test some experimental code of my own.
I provide it for the maintainers, since I've seen that in #71 you note that you were going to make the update.
I'm happy to make the effort needed to make this merged, but I'm also happy for the maintainers to decide that its easier to do it yourself.

Description

Build PyOMP's OpenMP pass, host runtime, offload runtime, and GPU device bitcode with LLVM 22.1.8, targeting Numba 0.66.x and llvmlite 0.48.x.

The Numba dependency changes from >=0.62,<0.64 to >=0.66,<0.67 to match llvmlite 0.48's LLVM 22 stack, following the compiler-stack updates in upstream PR #37 and PR #45. Broader cross-version bitcode compatibility has not been validated. Python 3.10–3.14 and Linux x86_64, Linux ARM64, and macOS ARM64 remain in CI.

The implementation adapts LLVM APIs and libomptarget patches and builds NVPTX/AMDGPU device bitcode separately, excluding host CPU flags. Package builds disable LLVM's offload tests and unit tests. Linux and macOS wheels use LLVM 22.1.8 from conda-forge through the existing Miniforge setup. Linux wheels link the compiler runtimes statically for manylinux compatibility.

Validation

CI results for current commit 66690ff:

  • Wheel CI: all three platform wheel builds, all 15 OS/Python installation-test jobs, and the source-distribution build passed. The Modal GPU job stopped before testing because this fork lacks MODAL_TOKEN_ID and MODAL_TOKEN_SECRET.
  • Conda CI: the macOS/Python 3.10 build reached the test suite but failed test_omp_get_wtime (0.2597 seconds versus 0.25 expected). The remaining matrix jobs were cancelled by fail-fast, so the Conda matrix is not fully validated on this commit.
  • Four basic mandatory NVIDIA offload tests previously passed locally on an RTX 3080 with CUDA 12.8. The full GPU suite and Blackwell with CUDA 13 remain unverified; issue Offload fails for Blackwell gpu arch and CUDA 13 #71 is not yet confirmed fixed.

Numba 0.66 selects llvmlite 0.48 and LLVM 22. This dependency change must land with the following LLVM 22 compiler and runtime update; it is not validated as a standalone release.

Assisted-by: Codex
Adapt OpenMPIRBuilder configuration, reduction and target arguments, plugin headers, and the GPU parallel runtime ABI. Port the runtime patches and build the relocated GPU device bitcode separately. Update LLVM build pins and document the tested platform limits.

Validated together with Numba 0.66: 120 host tests, 68 mandatory host-offload tests, and four mandatory RTX 3080 offload tests passed. The full GPU suite and other platforms remain unverified.

Assisted-by: Codex

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant