[inductor] add missing ignore_errors parameter for Windows. (#159025)

The origin code comemnts:
```python
# Let's not fail if we can't clean up the temp dir. Also note that for
# Windows, we can't delete the loaded modules because the module binaries
# are open.
```
But we are missing the `ignore_errors` parameter for Windows. I help to add it.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/159025
Approved by: https://github.com/jansel
This commit is contained in:
Xu Han
2025-07-25 07:58:22 +00:00
committed by PyTorch MergeBot
parent ae183d6092
commit e38a2b3d0f

View File

@ -1131,6 +1131,7 @@ def fresh_cache(
# Let's not fail if we can't clean up the temp dir. Also note that for
# Windows, we can't delete the loaded modules because the module binaries
# are open.
ignore_errors=is_windows(),
onerror=lambda func, path, exc_info: log.warning(
"Failed to remove temporary cache dir at %s",
inductor_cache_dir,