Repository navigation
Assert that the CUDA compiler tools return commands - #3440
Merged
Merged
Conversation
`CUDA_Compiler.ptxas()` and friends aren't inferred, so interpolating them into a command literal was compiled with an edge to `Base.arg_gen(::Any)`, which FilePathsBase extends. With such a package loaded first, Julia discarded the precompiled code that queries the compiler version, and through it much of CUDACore's compilation and launch path, when loading CUDA.jl.
This was referenced Oct 21, 2026
Contributor
CUDA.jl BenchmarksDetails
This comment was automatically generated by workflow using github-action-benchmark. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3440 +/- ##
==========================================
- Coverage 87.46% 85.58% -1.89%
==========================================
Files 191 191
Lines 19646 19469 -177
==========================================
- Hits 17184 16663 -521
- Misses 2462 2806 +344 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
CUDA_Compiler.ptxas(),nvlink()andnvdisasm()aren't inferred, so interpolating them into command literals was compiled with an edge toBase.arg_gen(::Any). FilePathsBase extendsarg_gen, so with a package depending on it loaded before CUDA.jl, Julia discarded the precompiled code that queries the compiler version when loading CUDA.jl, and with it a large part of CUDACore's precompiled compilation and launch code (about 1500 method instances with a set of common packages, including DataFrames, CairoMakie and Dagger, loaded first). These functions returnCmds for both the JLL and the local toolkit, so this asserts that.This is part of a series addressing JuliaGPU/GPUCompiler.jl#1048 (with JuliaGPU/GPUCompiler.jl#1052, JuliaLLVM/LLVM.jl#702 and maleadt/CompilerCaching.jl#33). With all of them, the first
@cudakernel (plus a broadcast andsum) with ChainRulesCore loaded first goes from 4.25 s to 2.76 s (2.52 s without it), and with DataFrames from 7.12 s to 5.72 s, on Julia 1.13 and an RTX 5080. Tested with thecorecodegen, execution, exceptions, KernelAbstractions, broadcast and array tests.