You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PyTorch has torch.cuda.synchronize, which syncs CPU and GPU code execution. This is essential for accurate measurement. But there isn't one for JAX, which we do hope to support as first class in the future.
Right now we have some infrastructure for generalized CUDA synchronize in zeus.util.framework (
), without JAX.
My current idea is to allow users to pass in a hook (Callable[[], None]) that does synchronization and default it to torch.cuda.synchronize. Then JAX users can pass in loss.block_until_ready as the synchronization hook, for example.
The text was updated successfully, but these errors were encountered:
PyTorch has
torch.cuda.synchronize
, which syncs CPU and GPU code execution. This is essential for accurate measurement. But there isn't one for JAX, which we do hope to support as first class in the future.Right now we have some infrastructure for generalized CUDA synchronize in
zeus.util.framework
(zeus/zeus/util/framework.py
Line 45 in 9381ec8
My current idea is to allow users to pass in a hook (
Callable[[], None]
) that does synchronization and default it totorch.cuda.synchronize
. Then JAX users can pass inloss.block_until_ready
as the synchronization hook, for example.The text was updated successfully, but these errors were encountered: