summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorZachary DeVito <zdevito@fb.com>2019-01-27 01:24:58 -0800
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>2019-01-27 01:27:50 -0800
commit6944461a76b3fe9df02679497191f79fddb1b69a (patch)
tree91cdda7f02cdeef22bc1d398ffd842a5bc48ab9c /tools
parent3c30cf323747229003929fcdf8da14acc1c2362d (diff)
downloadpytorch-6944461a76b3fe9df02679497191f79fddb1b69a.tar.gz
pytorch-6944461a76b3fe9df02679497191f79fddb1b69a.tar.bz2
pytorch-6944461a76b3fe9df02679497191f79fddb1b69a.zip
CI Fix: restore MAX_JOBS variable (#16415)
Summary: Restores a CI workaround (https://github.com/pytorch/pytorch/pull/7361) that got dropped with build_pytorch_libs.sh. Pull Request resolved: https://github.com/pytorch/pytorch/pull/16415 Differential Revision: D13833092 Pulled By: zdevito fbshipit-source-id: f78b60cafd8da945790dba28de373b8faf46e9f5
Diffstat (limited to 'tools')
-rw-r--r--tools/build_pytorch_libs.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/build_pytorch_libs.py b/tools/build_pytorch_libs.py
index bc049449ac..c9f2ded37e 100644
--- a/tools/build_pytorch_libs.py
+++ b/tools/build_pytorch_libs.py
@@ -244,7 +244,6 @@ def build_caffe2(version,
build_python,
build_test,
build_dir)
-
if IS_WINDOWS:
if USE_NINJA:
# sccache will fail if all cores are used for compiling
@@ -258,7 +257,8 @@ def build_caffe2(version,
if USE_NINJA:
check_call(['ninja', 'install'], cwd=build_dir)
else:
- check_call(['make', '-j', str(multiprocessing.cpu_count()), 'install'], cwd=build_dir)
+ max_jobs = os.getenv('MAX_JOBS', str(multiprocessing.cpu_count()))
+ check_call(['make', '-j', str(max_jobs), 'install'], cwd=build_dir)
# in cmake, .cu compilation involves generating certain intermediates
# such as .cu.o and .cu.depend, and these intermediates finally get compiled