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

Use pointer to async_send directly instead of a wrapper function #1319

Merged
merged 2 commits into from
Jan 12, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion lib/cudadrv/execution.jl
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,12 @@ function launch(f::Base.Callable; stream::CuStream=stream())
end
# FIXME: protect this from GC

callback = @cfunction(async_send, Cint, (Ptr{Cvoid},))
# callback = @cfunction(async_send, Cint, (Ptr{Cvoid},))
# See https://github.com/JuliaGPU/CUDA.jl/issues/1314.
# and https://github.com/JuliaLang/julia/issues/43748
# TL;DR We are not allowed to cache `async_send` in the sysimage
# so instead let's just pull out the function pointer and pass it instead.
callback = cglobal(:async_send)
vchuravy marked this conversation as resolved.
Show resolved Hide resolved
cuLaunchHostFunc(stream, callback, cond)
end

Expand Down