JuliaGPU / JuliaGPU/KernelAbstractions.jl
On CPU always use `NoDynamicCheck()`, just finish the last partial workgroup with `DynamicCheck()`
- Dominant language
- Julia
- Stars
- 523
- Forks
- 88
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 25
Description
Given that `DynamicCheck()` breaks SIMD this can be an order of magnitude faster for some inexpensive tasks.
I'll write up a better MWE, but this is the scale of it - a single threaded game of life in DynamicGrids.jl (basically summing a 3x3 window over Bool) is 2x faster than an 8 core KernelAbstractions.jl sim pretty much just from `DynamicCheck()`:
```julia
julia> using DynamicGrids, BenchmarkTools
julia> init = rand(Bool, 1000, 1000);
julia> output = ResultOutput(init; tspan=1:200);
julia> @btime sim!($output, Life(); proc=SingleCPU());
338.058 ms (6459 allocations: 3.25 MiB)
julia> @btime sim!($output, Life(); proc=CPUGPU());
652.198 ms (18401 allocations: 4.63 MiB)
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the provided DynamicGrids.jl benchmark and comparing CPU execution with and without DynamicCheck(). Trace the CPU path involving NoDynamicCheck() and DynamicCheck(); done means the final partial workgroup still uses DynamicCheck() while ordinary CPU work avoids it without changing results.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- performance
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100