Skip to content

Commit 481838f

Browse files
ShawnZhongfacebook-github-bot
authored andcommitted
Sphinx parallel build (pytorch#38785)
Summary: See https://www.sphinx-doc.org/en/master/man/sphinx-build.html#cmdoption-sphinx-build-j > Distribute the build over N processes in parallel, to make building on multiprocessor machines more effective. Note that not all parts and not all builders of Sphinx can be parallelized. If auto argument is given, Sphinx uses the number of CPUs as N. - Timing results - Python doc build on a 40-core machine: 9:34 down to 1:29 - pytorch_cpp_doc_push: ~1h 10m down to 47m - pytorch_python_doc_push: 34m down to 32m Pull Request resolved: pytorch#38785 Differential Revision: D21691991 Pulled By: zou3519 fbshipit-source-id: cfc5e8cd13414640f82edfd2ad1ce4d9c7afce12
1 parent a40049f commit 481838f

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

docs/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#
33

44
# You can set these variables from the command line.
5-
SPHINXOPTS =
5+
SPHINXOPTS = -j auto
66
SPHINXBUILD = sphinx-build
77
SPHINXPROJ = PyTorch
88
SOURCEDIR = source

docs/cpp/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Minimal makefile for Sphinx documentation
22

33
# You can set these variables from the command line.
4-
SPHINXOPTS =
4+
SPHINXOPTS = -j auto
55
SPHINXBUILD = sphinx-build
66
SPHINXPROJ = PyTorch
77
SOURCEDIR = source

docs/make.bat

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ if "%SPHINXBUILD%" == "" (
1010
set SOURCEDIR=source
1111
set BUILDDIR=build
1212
set SPHINXPROJ=PyTorch
13+
set SPHINXOPTS=-j auto
1314

1415
if "%1" == "" goto help
1516

0 commit comments

Comments
 (0)