Unverified Commit fa820741 authored by Nichols A. Romero's avatar Nichols A. Romero Committed by GitHub
Browse files

[Bugfix] Flush TunableOp results before worker processes are destroyed. (#13623)


Signed-off-by: default avatarNichols A. Romero <nick.romero@amd.com>
parent 75e9d497
......@@ -250,6 +250,15 @@ def _run_worker_process(
except Exception:
logger.exception("Worker failed")
# Flush TunableOp results when TunableOp is enabled and
# online (in situ) tuning is enabled.
# Offline tuning API (record_untuned_is_enabled()) only
# available in PyTorch 2.6 or later.
import torch.cuda.tunable as tunable
if (tunable.is_enabled() and tunable.tuning_is_enabled()
and not tunable.record_untuned_is_enabled()):
tunable.write_file()
logger.info("Worker exiting")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment