with torch.cuda.device
with torch.accelerator.device_index
Signed-off-by: Yan Ma <yan.ma@intel.com>
torch.cuda.synchronize()
torch.accelerator.synchronize
Signed-off-by: Kunshang Ji <kunshang.ji@intel.com>
torch.cuda.empty_cache
torch.accelerator.empty_cache
Signed-off-by: Kunshang Ji <kunshang.ji@intel.com> Signed-off-by: Kunshang Ji <jikunshang95@gmail.com> Co-authored-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>