diff --git a/.jenkins/pytorch/test.sh b/.jenkins/pytorch/test.sh index 29f9657beaf..414c85abff2 100755 --- a/.jenkins/pytorch/test.sh +++ b/.jenkins/pytorch/test.sh @@ -16,6 +16,7 @@ BUILD_RENAMED_DIR="build_renamed" BUILD_BIN_DIR="$BUILD_DIR"/bin export VALGRIND=ON +export TORCH_INDUCTOR_INSTALL_GXX=ON if [[ "$BUILD_ENVIRONMENT" == *clang9* ]]; then # clang9 appears to miscompile code involving c10::optional, # such that valgrind complains along these lines: diff --git a/torch/_inductor/codecache.py b/torch/_inductor/codecache.py index dca8af6cf1b..f4297732b38 100644 --- a/torch/_inductor/codecache.py +++ b/torch/_inductor/codecache.py @@ -110,6 +110,9 @@ def cpp_compiler_search(search): # according to https://anaconda.org/conda-forge/gxx/ if sys.platform != "linux": continue + # Do not install GXX by default + if not os.getenv("TORCH_INDUCTOR_INSTALL_GXX"): + continue from filelock import FileLock lock_dir = get_lock_dir()