Conversation
The indexing, shared memory, malloc, atomics, assertion, printf, ldg and string pointer intrinsics, and the constant tables for randn, all built their IR with create_function/call_function around a lot of context and builder boilerplate. LLVM.jl 9.14's @llvmgenerated and generate_llvmcall derive the LLVM signature from the Julia one and verify the generated IR, so use those instead. Julia code that ran before the IR, like checking the atomic scope or adjusting the index for ldg, moves to a wrapper that calls the @llvmgenerated function.
maleadt
force-pushed
the
tb/llvmgenerated
branch
from
September 28, 2026 20:24
c488b24 to
11506a2
Compare
Merged
Member
Author
|
Superseded by #3323, which includes this commit and ports CUDA.jl to the released LLVM.jl 10. |
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.
Ports CUDACore's IR-generating intrinsics to the interface added in JuliaLLVM/LLVM.jl#596: indexing, static and dynamic shared memory,
malloc, atomic RMW and CAS,@cuassert,@cuprintf,pointerref_ldg,@strptr, and the constant tables used byrandn. Julia code that has to run before the IR, likecheck_atomic_scopeor the index adjustment inpointerref_ldg, moves to a wrapper that calls the@llvmgeneratedfunction.This requires LLVM.jl 9.14, which hasn't been released yet, so it stays a draft until then.
Tested locally on an RTX 5080 (sm_120) with Julia 1.13, using LLVM.jl's
tb/llvmgeneratedbranch: the full test suite passes.