Skip to content

Upgrade to LLVM.jl 10 - #2675

Open
maleadt wants to merge 6 commits into
CliMA:mainfrom
maleadt:llvm10
Open

maleadt wants to merge 6 commits into
CliMA:mainfrom
maleadt:llvm10

Conversation

@maleadt

@maleadt maleadt commented Oct 3, 2026

Copy link
Copy Markdown

ClimaCore uses LLVM.jl in one place: the CUDA extension's shmem_pointer, which emits the shared-memory global behind scoped_static_array. LLVM.jl 10 removed create_function and call_function, so this rewrites it as an @llvmgenerated function 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.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Contributor License Agreement required

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.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Contributor License Agreement required

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.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Contributor License Agreement required

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.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Contributor License Agreement required

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.

@imreddyTeja

Copy link
Copy Markdown
Member

@maleadt Would you be be able sign the Contributors License Agreement? The PR is blocked without it.

@maleadt

maleadt commented Oct 13, 2026

Copy link
Copy Markdown
Author

I've signed it already.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants