[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:
@@ -857,7 +857,7 @@ def test_structured_output_batched_with_non_structured_outputs_requests(
|
||||
# Free memory as soon as possible as failed assertions
|
||||
# will short circuit and not free up memory
|
||||
del llm
|
||||
torch.cuda.empty_cache()
|
||||
torch.accelerator.empty_cache()
|
||||
cleanup_dist_env_and_memory()
|
||||
|
||||
for index, output in enumerate(outputs):
|
||||
|
||||
Reference in New Issue
Block a user