diff options
author | Peter Goldsborough <psag@fb.com> | 2018-11-27 10:04:57 -0800 |
---|---|---|
committer | Facebook Github Bot <facebook-github-bot@users.noreply.github.com> | 2018-11-27 10:13:23 -0800 |
commit | 49fe678feca88e030f541eb7106e09996de4725a (patch) | |
tree | f0d259d5f78f8106d8a3b59c19d1b57178c58cdc /docs | |
parent | c19af59a6edd9567d5fb5712ca22cc8e22c7f8fc (diff) | |
download | pytorch-49fe678feca88e030f541eb7106e09996de4725a.tar.gz pytorch-49fe678feca88e030f541eb7106e09996de4725a.tar.bz2 pytorch-49fe678feca88e030f541eb7106e09996de4725a.zip |
Add variable_factories.h to cppdocs (#14381)
Summary:
This will document `torch::from_blob` and such.
soumith ezyang
Pull Request resolved: https://github.com/pytorch/pytorch/pull/14381
Differential Revision: D13216560
Pulled By: goldsborough
fbshipit-source-id: 112f60e45e4d38a8a9983fa71e9cc56bc1a73465
Diffstat (limited to 'docs')
-rw-r--r-- | docs/cpp/source/Doxyfile | 35 | ||||
-rwxr-xr-x | docs/cpp/source/check-doxygen.sh | 21 | ||||
-rw-r--r-- | docs/cpp/source/notes/tensor_basics.rst | 1 |
3 files changed, 39 insertions, 18 deletions
diff --git a/docs/cpp/source/Doxyfile b/docs/cpp/source/Doxyfile index 8cc907338f..7c5153a278 100644 --- a/docs/cpp/source/Doxyfile +++ b/docs/cpp/source/Doxyfile @@ -29,36 +29,37 @@ HTML_OUTPUT = doxygen_html # {repo_root}/docs/cpp/source/../../.. -> {repo_root} STRIP_FROM_PATH = ../../.. # What folders / files Doxygen should process. -INPUT = ../../../torch/csrc/api/include \ - ../../../torch/csrc/api/src \ - ../../../torch/csrc/jit/custom_operator.h \ - ../../../torch/csrc/jit/import.h \ - ../../../torch/csrc/jit/ivalue.h \ - ../../../torch/csrc/jit/script/module.h \ - ../../../aten/src/ATen/ATen.h \ +INPUT = ../../../aten/src/ATen/ATen.h \ ../../../aten/src/ATen/Backend.h \ - ../../../aten/src/ATen/DeviceGuard.h \ - ../../../aten/src/ATen/Layout.h \ - ../../../aten/src/ATen/OptionsGuard.h \ - ../../../aten/src/ATen/Scalar.h \ - ../../../aten/src/ATen/TensorOptions.h \ ../../../aten/src/ATen/core/Half.h \ ../../../aten/src/ATen/core/ScalarType.h \ ../../../aten/src/ATen/core/Tensor.h \ + ../../../aten/src/ATen/cuda/CUDAContext.h \ ../../../aten/src/ATen/cuda/CUDAGuard.h \ ../../../aten/src/ATen/cuda/CUDAStream.h \ - ../../../aten/src/ATen/cuda/CUDAContext.h \ ../../../aten/src/ATen/cudnn/Descriptors.h \ ../../../aten/src/ATen/cudnn/Handles.h \ ../../../aten/src/ATen/cudnn/Types.h \ ../../../aten/src/ATen/cudnn/Utils.h \ + ../../../aten/src/ATen/DeviceGuard.h \ + ../../../aten/src/ATen/Layout.h \ ../../../aten/src/ATen/mkl/Descriptors.h \ - ../../../c10/util/Optional.h \ - ../../../c10/util/Exception.h \ - ../../../c10/util/ArrayRef.h \ + ../../../aten/src/ATen/OptionsGuard.h \ + ../../../aten/src/ATen/Scalar.h \ + ../../../aten/src/ATen/TensorOptions.h \ + ../../../build/aten/src/ATen/Functions.h \ ../../../c10/Device.h \ ../../../c10/DeviceType.h \ - ../../../build/aten/src/ATen/Functions.h + ../../../c10/util/ArrayRef.h \ + ../../../c10/util/Exception.h \ + ../../../c10/util/Optional.h \ + ../../../torch/csrc/api/include \ + ../../../torch/csrc/api/src \ + ../../../torch/csrc/autograd/generated/variable_factories.h \ + ../../../torch/csrc/jit/custom_operator.h \ + ../../../torch/csrc/jit/import.h \ + ../../../torch/csrc/jit/ivalue.h \ + ../../../torch/csrc/jit/script/module.h # Don't include .cpp files! FILE_PATTERNS = *.h # If you need this to be YES, exhale will probably break. diff --git a/docs/cpp/source/check-doxygen.sh b/docs/cpp/source/check-doxygen.sh index fcc7c08186..18863e2cc6 100755 --- a/docs/cpp/source/check-doxygen.sh +++ b/docs/cpp/source/check-doxygen.sh @@ -10,6 +10,26 @@ ignore_warning() { mv temp.txt doxygen-log.txt } +pushd "$(dirname "$0")/../../.." + +cp aten/src/ATen/common_with_cwrap.py tools/shared/cwrap_common.py +cp torch/_utils_internal.py tools/shared + +python aten/src/ATen/gen.py \ + -s aten/src/ATen \ + -d build/aten/src/ATen \ + aten/src/ATen/Declarations.cwrap \ + aten/src/THNN/generic/THNN.h \ + aten/src/THCUNN/generic/THCUNN.h \ + aten/src/ATen/nn.yaml \ + aten/src/ATen/native/native_functions.yaml + +python tools/setup_helpers/generate_code.py \ + --declarations-path build/aten/src/ATen/Declarations.yaml \ + --nn-path aten/src + +popd + # Run doxygen and log all output. doxygen 2> original-doxygen-log.txt cp original-doxygen-log.txt doxygen-log.txt @@ -19,7 +39,6 @@ cat original-doxygen-log.txt # Filter out some warnings. ignore_warning "warning: no uniquely matching class member found for" -ignore_warning "warning:.*\.\./\.\./\.\./build/aten.*" # Count the number of remaining warnings. warnings="$(grep 'warning:' doxygen-log.txt | wc -l)" diff --git a/docs/cpp/source/notes/tensor_basics.rst b/docs/cpp/source/notes/tensor_basics.rst index 19ab8f3ef8..73f6a06418 100644 --- a/docs/cpp/source/notes/tensor_basics.rst +++ b/docs/cpp/source/notes/tensor_basics.rst @@ -107,6 +107,7 @@ to a single element in a larger ``Tensor``. They can be used anywhere a which reduce the dimensions of a ``Tensor``. .. code-block:: cpp + torch::Tensor two = torch::rand({10, 20}); two[1][2] = 4; // ^^^^^^ <- zero-dimensional Tensor |