From 470e2f61c3b2083e8d895b6aae5ede198bba5696 Mon Sep 17 00:00:00 2001 From: PyTorch MergeBot Date: Fri, 17 Oct 2025 00:06:40 +0000 Subject: [PATCH] Revert "[Fix] Use sys.executable instead of hardcoded python (#165633)" This reverts commit 37f3ba274a8ccebc6b3409f52cf068a8b23617d4. Reverted https://github.com/pytorch/pytorch/pull/165633 on behalf of https://github.com/malfet due to Looks like it broke test_collect_callgrind in slow workflows, see https://hud.pytorch.org/hud/pytorch/pytorch/e0fe37fa687a39e42ddeeb5c03986ffd5c40e662/1?per_page=50&name_filter=slow&mergeEphemeralLF=true ([comment](https://github.com/pytorch/pytorch/pull/165633#issuecomment-3413290813)) --- torch/utils/benchmark/utils/valgrind_wrapper/timer_interface.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/torch/utils/benchmark/utils/valgrind_wrapper/timer_interface.py b/torch/utils/benchmark/utils/valgrind_wrapper/timer_interface.py index 3788a44e062c..e80416482271 100644 --- a/torch/utils/benchmark/utils/valgrind_wrapper/timer_interface.py +++ b/torch/utils/benchmark/utils/valgrind_wrapper/timer_interface.py @@ -640,7 +640,7 @@ class _ValgrindWrapper: stat_log=stat_log, bindings=self._bindings_module)) - run_loop_cmd = [sys.executable, script_file] + run_loop_cmd = ["python", script_file] else: if collect_baseline: raise AssertionError("collect_baseline must be False for non-Python timers")