Skip to content

Commit 2ca5543

Browse files
authored
Add reference documentation for torch/library.h (pytorch#41470) (pytorch#41602)
Summary: Pull Request resolved: pytorch#41470 Signed-off-by: Edward Z. Yang <[email protected]> Test Plan: Imported from OSS Reviewed By: zou3519 Differential Revision: D22577426 Pulled By: ezyang fbshipit-source-id: 4bfe5806061e74181a74d161c868acb7c1ecd1e4
1 parent b8e77a4 commit 2ca5543

File tree

2 files changed

+368
-109
lines changed

2 files changed

+368
-109
lines changed

docs/cpp/source/library.rst

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
Torch Library API
2+
=================
3+
4+
The PyTorch C++ API provides capabilities for extending PyTorch's core library
5+
of operators with user defined operators and data types. Extensions implemented
6+
using the Torch Library API are made available for use in both the PyTorch eager
7+
API as well as in TorchScript.
8+
9+
For a tutorial style introduction to the library API, check out the
10+
`Extending TorchScript with Custom C++ Operators
11+
<https://pytorch.org/tutorials/advanced/torch_script_custom_ops.html>`_
12+
tutorial.
13+
14+
Macros
15+
------
16+
17+
.. doxygendefine:: TORCH_LIBRARY
18+
19+
.. doxygendefine:: TORCH_LIBRARY_IMPL
20+
21+
Classes
22+
-------
23+
24+
.. doxygenclass:: torch::Library
25+
:members:
26+
27+
.. doxygenclass:: torch::CppFunction
28+
:members:
29+
30+
Functions
31+
---------
32+
33+
.. doxygengroup:: torch-dispatch-overloads
34+
:content-only:
35+
36+
.. doxygengroup:: torch-schema-overloads
37+
:content-only:

0 commit comments

Comments
 (0)