mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 12:54:11 +08:00
Fix cpp build (#162774)
Fixes #ISSUE_NUMBER Pull Request resolved: https://github.com/pytorch/pytorch/pull/162774 Approved by: https://github.com/malfet, https://github.com/atalman
This commit is contained in:
committed by
PyTorch MergeBot
parent
3dd89a079f
commit
b61bdc7cc4
@ -58,7 +58,7 @@ time python tools/setup_helpers/generate_code.py \
|
||||
|
||||
# Build the docs
|
||||
pushd docs/cpp
|
||||
time make VERBOSE=1 html -j
|
||||
time make VERBOSE=1 html
|
||||
|
||||
popd
|
||||
popd
|
||||
|
2
.github/workflows/_docs.yml
vendored
2
.github/workflows/_docs.yml
vendored
@ -67,7 +67,7 @@ jobs:
|
||||
# an OOM issue when running the job, so this upgrades the runner from 4xlarge
|
||||
# to the next available tier of 12xlarge. So much memory just to generate cpp
|
||||
# doc
|
||||
runner: ${{ inputs.runner_prefix }}linux.12xlarge
|
||||
runner: ${{ inputs.runner_prefix }}linux.12xlarge.memory
|
||||
# TODO: Nightly cpp docs take longer and longer to finish (more than 3h now)
|
||||
# Let's try to figure out how this can be improved
|
||||
timeout-minutes: 360
|
||||
|
@ -40,7 +40,34 @@ extensions = [
|
||||
"sphinx.ext.intersphinx",
|
||||
] + (["breathe", "exhale"] if run_doxygen else [])
|
||||
|
||||
intersphinx_mapping = {"pytorch": ("https://pytorch.org/docs/main", None)}
|
||||
intersphinx_mapping = {"pytorch": ("https://docs.pytorch.org/docs/main", None)}
|
||||
|
||||
# Configure Sphinx warnings and error handling
|
||||
suppress_warnings = [
|
||||
"ref.citation",
|
||||
"ref.footnote",
|
||||
"ref.doc",
|
||||
"toc.excluded",
|
||||
"toc.not_readable",
|
||||
"misc.highlighting_failure",
|
||||
]
|
||||
|
||||
# Configure Breathe
|
||||
breathe_show_define_initializer = True
|
||||
breathe_show_enumvalue_initializer = True
|
||||
breathe_default_members = ("members", "undoc-members")
|
||||
|
||||
|
||||
# Fix for Python 3.10+ compatibility with exhale 2.3.0
|
||||
# MutableMapping was moved from collections to collections.abc in Python 3.10
|
||||
try:
|
||||
import collections
|
||||
from collections.abc import MutableMapping
|
||||
|
||||
if not hasattr(collections, "MutableMapping"):
|
||||
collections.MutableMapping = MutableMapping
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
# Setup absolute paths for communicating with breathe / exhale where
|
||||
# items are expected / should be trimmed by.
|
||||
@ -101,6 +128,21 @@ exhale_args = {
|
||||
Welcome to the developer reference for the PyTorch C++ API.
|
||||
"""
|
||||
),
|
||||
############################################################################
|
||||
# Duplicate handling and error management. #
|
||||
############################################################################
|
||||
# Note: Using Doxyfile instead of stdin configuration
|
||||
# "exhaleDoxygenStdin" is not compatible with "exhaleUseDoxyfile"
|
||||
# Handle unresolved references more gracefully
|
||||
"unabridgedOrphanKinds": {
|
||||
"function",
|
||||
"define",
|
||||
"enum",
|
||||
"enumvalue",
|
||||
"typedef",
|
||||
"variable",
|
||||
},
|
||||
"fullToctreeMaxDepth": 2,
|
||||
}
|
||||
|
||||
# Tell sphinx what the primary language being documented is.
|
||||
|
Reference in New Issue
Block a user