[Hardware] Use torch.accelerator.empty_host_cache() for host cache cl… (#51107)
Signed-off-by: zhenwei-intel <zhenwei.liu@intel.com>
liuzhenwei committed
Aug 6, 2026 at 10:27 UTC
d54b58cc4880ba45bc6d2c56b555d68634f6498c
1 file changed
+2
-2
vllm/distributed/parallel_state.py
+2
-2
@@ -2154,10 +2154,10 @@ def cleanup_dist_env_and_memory(shutdown_ray: bool = False):
2154
if not current_platform.is_cpu():
2155
torch.accelerator.empty_cache()
2156
try:
2157
- torch._C._host_emptyCache()
2157
+ torch.accelerator.empty_host_cache()
2158
except AttributeError:
2159
logger.warning(
2160
- "torch._C._host_emptyCache() only available in Pytorch >=2.5"
2160
+ "torch.accelerator.empty_host_cache() only available in Pytorch >=2.9"
2161
)
2162
2163
logger.debug_once("[shutdown] Distributed: cleanup complete")