mirror of
https://github.com/pytorch/pytorch.git
synced 2026-10-28 18:56:51 +08:00
The fix-cpp-build branch is a major restructuring that: - Drops Exhale (which auto-generated API docs but caused OOM in CI) in favor of hand-written RST pages using Breathe directives - Reorganizes notes into a hierarchical API reference with proper categories - Adds new content: XPU docs, stable ABI docs, DeviceGuard/Stream docs - Always runs Doxygen instead of gating on an env var Pull Request resolved: https://github.com/pytorch/pytorch/pull/174096 Approved by: https://github.com/janeyx99, https://github.com/seemethere, https://github.com/albanD
45 lines
1.3 KiB
Makefile
45 lines
1.3 KiB
Makefile
# Minimal makefile for Sphinx documentation
|
|
|
|
# You can set these variables from the command line.
|
|
SPHINXOPTS = -j auto
|
|
SPHINXBUILD = python -m sphinx
|
|
SPHINXPROJ = PyTorch
|
|
SOURCEDIR = source
|
|
BUILDDIR = build
|
|
PYCMD = python
|
|
DOXYGEN = doxygen
|
|
|
|
# Put it first so that "make" without argument is like "make help".
|
|
help:
|
|
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
|
|
|
.PHONY: help Makefile clean doxygen html
|
|
|
|
# Generate Doxygen XML (required for Breathe directives)
|
|
doxygen:
|
|
@echo "Running Doxygen..."
|
|
@cd $(SOURCEDIR) && $(DOXYGEN) Doxyfile
|
|
|
|
clean:
|
|
@# Clean up sphinx build artifacts and Doxygen output.
|
|
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
|
@rm -rf $(BUILDDIR)/xml
|
|
|
|
# Build HTML with Doxygen XML generation first
|
|
html: doxygen
|
|
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
|
|
|
# Check documentation coverage against curated allowlist and HTML formatting
|
|
coverage: html
|
|
@echo "Running C++ docs coverage check..."
|
|
@$(PYCMD) check_coverage.py
|
|
|
|
coverage-only:
|
|
@echo "Running C++ docs coverage check (no rebuild)..."
|
|
@$(PYCMD) check_coverage.py
|
|
|
|
# Catch-all target: route all unknown targets to Sphinx using the new
|
|
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
|
|
%: Makefile
|
|
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|