[Hardware] Replace torch.cuda.empty_cache with torch.accelerator.empty_cache (#30681)

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>
This commit is contained in:
Kunshang Ji
2026-03-04 17:49:47 +08:00
committed by GitHub
parent 5dc3538736
commit 16d2ad1d38
35 changed files with 110 additions and 59 deletions

View File

@@ -125,7 +125,7 @@ def test_no_sync_with_spec_decode(
assert len(outputs[0].outputs[0].text) > 0
del llm
torch.cuda.empty_cache()
torch.accelerator.empty_cache()
cleanup_dist_env_and_memory()
sync_tracker.assert_no_sync()