mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-07 12:21:27 +01:00
[inductor] unificate SUBPROCESS_DECODE_ARGS variable in cpp_builder.py (#132615)
[inductor] unificate SUBPROCESS_DECODE_ARGS variable in cpp_builder.py Pull Request resolved: https://github.com/pytorch/pytorch/pull/132615 Approved by: https://github.com/jgong5, https://github.com/desertfire
This commit is contained in:
parent
9945caec65
commit
a672f6c84e
|
|
@ -170,7 +170,7 @@ def _is_gcc(cpp_compiler: str) -> bool:
|
||||||
def _is_msvc_cl(cpp_compiler: str) -> bool:
|
def _is_msvc_cl(cpp_compiler: str) -> bool:
|
||||||
if not _IS_WINDOWS:
|
if not _IS_WINDOWS:
|
||||||
return False
|
return False
|
||||||
SUBPROCESS_DECODE_ARGS = ("oem",) if _IS_WINDOWS else ()
|
|
||||||
try:
|
try:
|
||||||
output_msg = (
|
output_msg = (
|
||||||
subprocess.check_output([cpp_compiler, "/help"], stderr=subprocess.STDOUT)
|
subprocess.check_output([cpp_compiler, "/help"], stderr=subprocess.STDOUT)
|
||||||
|
|
@ -205,7 +205,6 @@ def is_msvc_cl() -> bool:
|
||||||
|
|
||||||
|
|
||||||
def get_compiler_version_info(compiler: str) -> str:
|
def get_compiler_version_info(compiler: str) -> str:
|
||||||
SUBPROCESS_DECODE_ARGS = ("oem",) if _IS_WINDOWS else ()
|
|
||||||
env = os.environ.copy()
|
env = os.environ.copy()
|
||||||
env["LC_ALL"] = "C" # Don't localize output
|
env["LC_ALL"] = "C" # Don't localize output
|
||||||
try:
|
try:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user