Repository navigation
Reduce first-launch and first-free compile time - #1197
Conversation
The `call` generator zipped tuples of argument expressions, recompiling for each new number of kernel arguments at about 35 ms each. Build the call's types and arguments with vectors, as JuliaGPU/KernelAbstractions.jl#931 did for PoCL.
The first garbage collection that freed a `ROCArray` compiled `pool_free`, taking about 0.9 s. Precompile it as CUDA.jl does for its equivalent.
`KernelInterface.kernel_function` passes a `name` keyword argument, so its first launch compiled `hipfunction_link` for that argument type. Add the specialization missing from the existing precompile directive.
|
cscs-ci run MI250,MI300 |
Benchmark resultsCompared with 3e7016582, the merge base. Times are the minimum time of every benchmark. A change is unusual when it exceeds both three times the benchmark's typical change between consecutive runs on the default branch and a minimum per category (performance 3%, latency 5%, applications 3%, other 3%). A benchmark that starts or stops allocating is listed however few the allocations. A single run can still be a fluke, so rerun before drawing conclusions.
All benchmarks
|
The
callgenerator zipped tuples of argument expressions, recompiling for each new number of kernel arguments. Build the call with vectors, as JuliaGPU/KernelAbstractions.jl#931 does for PoCL.Precompile
pool_free, as CUDA.jl does, to avoid about 0.9 s of compilation during the first garbage collection that frees aROCArray.Also precompile
hipfunction_linkfor thenamekeyword argument passed byKernelInterface.kernel_function. The existing directive misses this argument type, causing compilation on the first KernelAbstractions launch.Median over 5 interleaved fresh processes (9950X iGPU, gfx1036; Julia 1.12.7, KernelAbstractions 0.10.3, KernelInterface 0.4.3; base 3e70165):
GC.gc()that frees aROCArrayThe "after" runs also include #1196, which only changes per-launch cost.
Tests: the full suite on gfx1036 (30553 passed, 14 broken), including
kernelabstractions_testsandkernelinterface_tests.