Skip to content

Conversation

@ggeorgakoudis
Copy link
Contributor

No description provided.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds support for Numba 0.61 by updating PyOMP to be compatible with LLVM versions 15, 16, and 17 (beyond the previously required LLVM 14). The changes involve substantial updates to both Python and C++ codebases to handle API changes and the migration to opaque pointers in LLVM.

Changes:

  • Updated build system to support dynamic LLVM version selection via environment variable
  • Migrated from deprecated Numba APIs (compile_isolated → njit, cffi → ctypes)
  • Added opaque pointer support throughout C++ codebase with LLVM version conditionals
  • Refactored CUDA codegen into singleton pattern
  • Updated tests and documentation to reflect new device numbering (0=CUDA, 1=host)

Reviewed changes

Copilot reviewed 22 out of 23 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
setup.py Refactored to dynamically download OpenMP sources based on LLVM_VERSION env var; added patch support for multiple LLVM versions
src/numba/openmp/init.py Removed hard-coded LLVM 14 version check; moved decorators to separate module
src/numba/openmp/decorators.py New module for jit/njit decorators extracted from init.py
src/numba/openmp/tags.py Migrated from compile_isolated to njit API; added poison value operands for opaque pointer support
src/numba/openmp/omp_runtime.py Replaced cffi with ctypes+llvmlite.binding for runtime function calls
src/numba/openmp/omp_ir.py Refactored OpenMPCUDACodegen into singleton; removed nogil flag; updated to use new pass manager API
src/numba/openmp/libs/pass/.cpp/.h Added LLVM version conditionals for opaque pointer support; updated OMPIRBuilder API calls for LLVM 16+
src/numba/openmp/libs/pass/CMakeLists.txt Made LLVM_DIR required parameter; removed LLVM version check
src/numba/openmp/tests/test_openmp.py Updated device IDs in comments; added test for firstprivate arrays; uncommented test code; added skip decorators
buildscripts/cibuildwheel/setup-miniconda3.sh Parameterized LLVM version via environment variable
README.md Added compatibility matrix showing PyOMP 0.3.x supports Numba 0.57.x - 0.61.x
examples/hello-target.py Changed device ID from 1 to 0 (CUDA backend)
src/numba/openmp/libs/libomp/patches/* Added versioned patch directories for LLVM 14.0.6, 15.0.7, and 16.0.6

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

@DrTodd13 DrTodd13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

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.

3 participants