Metal.jl
Metal.jl copied to clipboard
Port the opportunistic synchronization from CUDA.jl
It would probably be good to port the opportunistic synchronization from CUDA.jl
Originally posted by @maleadt in https://github.com/JuliaGPU/Metal.jl/pull/314#discussion_r1521559352
EDIT by maleadt: Specifically, the tracking of which stream has recently modified a buffer, and whether to synchronize or not.
In addition, copyto! should be asynchronous when possible, e.g., when copying between MTLArrays. As suggested by @tgymnich, this could probably be done by always using the MTLBlitCommandEncoder.
https://github.com/JuliaGPU/Metal.jl/issues/443