Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wait(kernel(...) performs much worse on Julia v1.7 #290

Open
lmh91 opened this issue Feb 28, 2022 · 2 comments · Fixed by #291
Open

wait(kernel(...) performs much worse on Julia v1.7 #290

lmh91 opened this issue Feb 28, 2022 · 2 comments · Fixed by #291

Comments

@lmh91
Copy link

lmh91 commented Feb 28, 2022

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 JuliaGPU/CUDA.jl#1350 and JuliaGPU/CUDA.jl#1369.

@vchuravy
Copy link
Member

Can you try #291?

@lmh91
Copy link
Author

lmh91 commented Mar 1, 2022

I left a comment in your PR.

@maleadt maleadt changed the title wait(kernel(...) hangs up on Julia v1.7 wait(kernel(...) performs much worse on Julia v1.7 Mar 3, 2022
@maleadt maleadt reopened this Mar 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants