JuliaGPU / JuliaGPU/GPUCompiler.jl
Slow kernel compilation
- Dominant language
- Julia
- Stars
- 187
- Forks
- 68
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 28
Description
IIRC it used to be 200us or so, and @vtjnash mentioned Base compilation taking ~1us~ 1ms or so for the simplest functions. This is pretty slow then:
```
julia> kernel() = return
kernel (generic function with 1 method)
julia> include("pkg/GPUCompiler/test/definitions/native.jl")
native_code_execution (generic function with 1 method)
julia> job, kwargs = native_job(kernel, Tuple{})
(CompilerJob of function kernel() for NativeCompilerTarget, Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}())
julia> @benchmark GPUCompiler.compile(:asm, job)
BenchmarkTools.Trial:
memory estimate: 389.70 KiB
allocs estimate: 7019
--------------
minimum time: 7.027 ms (0.00% GC)
median time: 7.784 ms (0.00% GC)
mean time: 7.805 ms (0.28% GC)
maximum time: 11.175 ms (24.24% GC)
--------------
samples: 640
evals/sample: 1
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the benchmark in the issue and inspect pkg/GPUCompiler/test/definitions/native.jl, native_job(kernel, Tuple{}), and GPUCompiler.compile(:asm, job). Reproduce the reported timing and trace where compilation time and allocations are spent. Done means identifying and addressing the slowdown, with benchmark results showing improved compilation time.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- compilers, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100