diff options
author | Ailing <ailzhang@users.noreply.github.com> | 2018-03-07 08:18:48 -0800 |
---|---|---|
committer | Edward Z. Yang <ezyang@mit.edu> | 2018-03-07 11:18:48 -0500 |
commit | fcaa3bf6097433591958f4b34674895e04170c53 (patch) | |
tree | b10b03fcee12a83798682384a139e19ad1ef9261 /tools/setup_helpers | |
parent | 461e3e3ae04b6dbd722207aad811abf7cf35dd2b (diff) | |
download | pytorch-fcaa3bf6097433591958f4b34674895e04170c53.tar.gz pytorch-fcaa3bf6097433591958f4b34674895e04170c53.tar.bz2 pytorch-fcaa3bf6097433591958f4b34674895e04170c53.zip |
disable ibverbs build with env variable (#5513)
if the env variable is specified, use its value to determine what to do
otherwise use the heuristic we have (should_build_ib)
Diffstat (limited to 'tools/setup_helpers')
-rw-r--r-- | tools/setup_helpers/dist_check.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/setup_helpers/dist_check.py b/tools/setup_helpers/dist_check.py index cc54f8310f..61d10d1799 100644 --- a/tools/setup_helpers/dist_check.py +++ b/tools/setup_helpers/dist_check.py @@ -103,4 +103,9 @@ def should_build_ib(): return ib_util_found and ib_lib_found and ib_lib_found if WITH_DISTRIBUTED: - WITH_GLOO_IBVERBS = should_build_ib() or check_env_flag("WITH_GLOO_IBVERBS") + # If the env variable is specified, use the value, + # otherwise only build with IB when IB support is detected on the system + if "WITH_GLOO_IBVERBS" in os.environ: + WITH_GLOO_IBVERBS = check_env_flag("WITH_GLOO_IBVERBS") + else: + WITH_GLOO_IBVERBS = should_build_ib() |