mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-21 13:44:15 +08:00
Fix windows msbuild bug (#18748)
Summary: Fix the bug introduced by #18681 where an undefined variable was being used to limit max cpu count when building for Windows without Ninja. Pull Request resolved: https://github.com/pytorch/pytorch/pull/18748 Differential Revision: D14733209 Pulled By: soumith fbshipit-source-id: 52fc0dd4dde99da75a6956b63f02da2e647eed4f
This commit is contained in:
committed by
Facebook Github Bot
parent
2e97c82470
commit
84a9694ed0
@ -265,6 +265,7 @@ def build_caffe2(version,
|
||||
check_call(['cmake', '--build', '.', '--target', 'install', '--config', build_type, '--', '-j', str(j)],
|
||||
cwd=build_dir, env=my_env)
|
||||
else:
|
||||
j = max_jobs or str(multiprocessing.cpu_count())
|
||||
check_call(['msbuild', 'INSTALL.vcxproj', '/p:Configuration={} /maxcpucount:{}'.format(build_type, j)],
|
||||
cwd=build_dir, env=my_env)
|
||||
else:
|
||||
|
Reference in New Issue
Block a user