Repository navigation
Conversation
There was a problem hiding this comment.
The following contributor(s) must sign the CLA before this PR can be merged:
Please visit https://ecodesign.clima.caltech.edu/cla/ to review and sign the CLA.
How to sign: Authenticate with GitHub then click the "I agree" button.
Once completed, re-run the checks on this PR.
LLVM.jl 10 removed create_function and call_function, which shmem_pointer used to build its shared-memory global by hand. Define it with @llvmgenerated instead, which derives the LLVM function from the Julia signature, and use the properties that replaced LLVM.jl's accessor functions (gv.linkage = ..., gv.initializer = ..., gv.alignment = ...), with LLVM.jl's linkage enumeration instead of the C API's. The generated IR is unchanged.
There was a problem hiding this comment.
The following contributor(s) must sign the CLA before this PR can be merged:
Please visit https://ecodesign.clima.caltech.edu/cla/ to review and sign the CLA.
How to sign: Authenticate with GitHub then click the "I agree" button.
Once completed, re-run the checks on this PR.
There was a problem hiding this comment.
The following contributor(s) must sign the CLA before this PR can be merged:
Please visit https://ecodesign.clima.caltech.edu/cla/ to review and sign the CLA.
How to sign: Authenticate with GitHub then click the "I agree" button.
Once completed, re-run the checks on this PR.
There was a problem hiding this comment.
The following contributor(s) must sign the CLA before this PR can be merged:
Please visit https://ecodesign.clima.caltech.edu/cla/ to review and sign the CLA.
How to sign: Authenticate with GitHub then click the "I agree" button.
Once completed, re-run the checks on this PR.
|
@maleadt Would you be be able sign the Contributors License Agreement? The PR is blocked without it. |
|
I've signed it already. |
ClimaCore uses LLVM.jl in one place: the CUDA extension's
shmem_pointer, which emits the shared-memory global behindscoped_static_array. LLVM.jl 10 removedcreate_functionandcall_function, so this rewrites it as an@llvmgeneratedfunction that generates the same IR, and adds a NEWS entry.Tested on Julia 1.11 and 1.12. The GPU tests and the CPU DataLayouts tests give the same results as main, including the existing failures. LLVM.jl's memcheck mode reports nothing.
Requires a CUDA.jl release with LLVM.jl 10 support (JuliaGPU/CUDA.jl#3323).
Disclaimer: this PR is AI-assisted and has not been reviewed in detail. Tests pass locally, so it should be a good starting point for a maintainer to complete the upgrade.