Support numba 0.66-0.67 with LLVM 22 - #78
Merged
Merged
Conversation
numba 0.66 and 0.67 use llvmlite 0.48 (LLVM 22), so build the pass library and the OpenMP runtimes against LLVM 22.1.8. - Port the pass library to the LLVM 22 OpenMPIRBuilder API (__kmpc_parallel_60, TargetKernelArgs, ReductionInfo, PassPlugin.h), and set the OpenMPIRBuilder config, which createReductions now reads. - Build Linux wheels with the conda-forge LLVM 22 toolchain, compiling against the manylinux gcc-toolset libstdc++. - Build the nvptx and amdgcn device runtime bitcode from openmp/device, ignoring host CFLAGS and CXXFLAGS. - Keep three runtime patches for 22.1.8 (static LLVM, skip liboffload, __tgt_get_device_info) and drop the patch sets for older LLVM versions. - Require numba >=0.66,<0.68 and test numba 0.66.0 and 0.67.0. - Drop the conda is_freethreading variant, which no numba pin uses now. The libomptarget CUDA plugin in LLVM 22 includes llvm/llvm-project#159354 (fixes #71), and llvmlite 0.48 knows sm_110 (fixes #68). The OpenMPIRBuilder config setting, the device runtime host-flag reset, and the __tgt_get_device_info patch port are from #75. Co-authored-by: Aleksander Wennersteen <aleksander.wennersteen@pasqal.com> Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
numba 0.66 removed the "NumPy AVX512_SKX detected" sysinfo entry, so the conda test script failed with a KeyError before running the tests. Check the "NumPy Supported SIMD features" list instead. The fix is from #75. Co-authored-by: Aleksander Wennersteen <aleksander.wennersteen@pasqal.com> Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Contributor
|
Thank you for taking this over! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR moves PyOMP to LLVM 22.1.8 and makes numba 0.66–0.67 the supported range, for the 0.6.x release line.
Supersedes #75 and gives credit to selected commits.
Fixes #71 (the LLVM 22 libomptarget CUDA plugin includes llvm/llvm-project#159354).
Fixes #68 (llvmlite 0.48 knows sm_110).
Changes
Pass library
__kmpc_parallel_51becomes__kmpc_parallel_60, withnt_strict = 0.TargetKernelArgsgets the new dyn-groupprivate fallback field.ReductionInfogets the newDataPtrPtrGenfield, set tonullptr.PassPlugin.his included from its new location.OMPBuilder.Config. In LLVM 22,createReductionsreadsConfig.isGPU(), and an unset config is undefined behaviour in release builds of LLVM.LLVM_VERSION_MAJORguard.OpenMP runtimes
__tgt_get_device_info. Delete the patch sets for LLVM 14, 15, 16 and 20.libomptarget-{nvptx,amdgpu}.bc) with a separate CMake build per target fromopenmp/device. LLVM 22 no longer builds these files as part of offload.CMAKE_C_FLAGSandCMAKE_CXX_FLAGSfor the device runtime builds to avoid conda host flags breaking GPU targets.Packaging and CI
--gcc-toolchain=/opt/rh/gcc-toolset-14/root/usrso the libraries link against the image's libstdc++ and stay manylinux_2_28 compatible.CFLAGS, so it uses the same toolchain as the other libraries.numba >=0.66,<0.68in both pyproject and the conda recipe. The test matrices run numba 0.66.0 and 0.67.0.lld22.1.8 is a new build dependency; it links the AMDGPU device runtime.is_freethreadingvariant. No numba pin uses it any more.