mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 12:54:11 +08:00
[BE][Ez]: Use sys.executable instead of hardcoded Python (#165679)
Handles edgecase to ensure proper interpreter is called. Inspired by #165633 Pull Request resolved: https://github.com/pytorch/pytorch/pull/165679 Approved by: https://github.com/FindHao
This commit is contained in:
committed by
PyTorch MergeBot
parent
d82527b32a
commit
9726553653
@ -3,6 +3,7 @@ import argparse
|
||||
import os
|
||||
import re
|
||||
import subprocess
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
@ -107,7 +108,7 @@ def process_file(
|
||||
env["TORCHINDUCTOR_DUMP_LAUNCH_PARAMS"] = "1"
|
||||
|
||||
result = subprocess.run(
|
||||
["python", input_filename],
|
||||
[sys.executable, input_filename],
|
||||
env=env,
|
||||
capture_output=True,
|
||||
text=True,
|
||||
|
Reference in New Issue
Block a user