mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
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
This commit is contained in:
committed by
Facebook Github Bot
parent
3c30cf3237
commit
6944461a76
@ -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
|
||||
|
Reference in New Issue
Block a user