JuliaGPU / JuliaGPU/KernelAbstractions.jl
`wait(kernel(...)` performs much worse on Julia v1.7
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 523
- Forks
- 88
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 25
Description
Sometimes wait(kernel(...)) hangs up.
MWE:
using KernelAbstractions
using CUDA, CUDAKernels
using ProgressMeter
@kernel function test_kernel(a::AbstractArray{T}) where {T}
index = @index(Global)
a[index] = T(1)
end
a = CuArray(zeros(Float32, 500, 500));
ndrange = size(a)
k = test_kernel(CUDADevice())
wait(k(a; ndrange))
@showprogress for i in 1:1000000 # get stuck at some point
wait(k(a; ndrange))
end
I observed this on Julia v1.7.1 and v1.7.2.
On Julia v1.6.5, however, it works and never gets stuck.
Package versions:
(@v1.7) pkg> st
Status `~/.julia/linux-ubuntu-20.04-x86_64/environments/v1.7/Project.toml`
[052768ef] CUDA v3.8.3
[72cfdca4] CUDAKernels v0.3.3
[63c18a36] KernelAbstractions v0.7.2
[92933f4c] ProgressMeter v1.7.1
I tested it also with different machines (Ubuntu and Windows) and different GPUs (all NVIDIA's).
As @maleadt suggested this might be related to https://github.com/JuliaGPU/CUDA.jl/issues/1350 and https://github.com/JuliaGPU/CUDA.jl/pull/1369.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running the provided MWE with the listed KernelAbstractions, CUDA, CUDAKernels, and ProgressMeter versions on Julia 1.6.5 and 1.7.x. Compare the behavior with CUDA.jl issue #1350 and pull request #1369, then trace the wait path involved in repeated kernel launches. Done means the loop no longer hangs on the affected Julia versions and the regression is covered by a reproducible test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- hpc
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100