W3cubDocs

/PyTorch 2.9

torch.compiler.reset

torch.compiler.reset() [source]

This function clears all compilation caches and restores the system to its initial state. It is recommended to call this function, especially after using operations like torch.compile(…) to ensure a clean state before another unrelated compilation

© 2025, PyTorch Contributors
PyTorch has a BSD-style license, as found in the LICENSE file.
https://docs.pytorch.org/docs/2.9/generated/torch.compiler.reset.html