Skip to content

Fix gpu pipeline and pass lowering#41

Merged
ggeorgakoudis merged 6 commits intomainfrom
fix-gpu-pipeline-and-pass-lowering
Jan 29, 2026
Merged

Fix gpu pipeline and pass lowering#41
ggeorgakoudis merged 6 commits intomainfrom
fix-gpu-pipeline-and-pass-lowering

Conversation

@ggeorgakoudis
Copy link
Contributor

No description provided.

- Use the old pass manager available through llvmlite 0.44
- Separate linking of libdevice and the openmp device RTL
- Optimize with opt=2 with libdevice
- Optimize with opt=1 with device RTL to avoid miscompilation and openmp
  synchronization errors
- Pass original values to copy as pointers to avoid ABI issues
Copy link
Contributor

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

Updates the OpenMP CUDA codegen pipeline and LLVM pass/lowering logic to improve correctness and stability for GPU target offloading.

Changes:

  • Split device bitcode linking into two stages (libdevice first, then OpenMP device RTL) with separate optimization passes.
  • Switch from the “new” pass manager usage to legacy pass manager builder/population for function/module passes.
  • Simplify firstprivate handling in the OpenMP intrinsic lowering pass by removing the previous Int64 byval workaround and consistently passing captured values by their native types.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.

File Description
src/numba/openmp/omp_ir.py Refactors CUDA target image generation: staged bitcode linking + legacy pass manager population and adjusted opt levels.
src/numba/openmp/libs/pass/CGIntrinsicsOpenMP.cpp Simplifies firstprivate argument typing/passing and updates outlined function argument handling accordingly.

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

@ggeorgakoudis ggeorgakoudis merged commit afc5154 into main Jan 29, 2026
45 checks passed
@ggeorgakoudis ggeorgakoudis deleted the fix-gpu-pipeline-and-pass-lowering branch January 29, 2026 02:52
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