Skip to content

Commit 4413a5c

Browse files
authored
[DOC] Add extension APIs to runtime API reference (#19385)
Fixes #19348 ### Summary - Add `extension/module` and `extension/tensor` headers to the Doxygen inputs used by the runtime API reference. - Expand the module namespace macros so Breathe can resolve the documented extension classes with stable namespace names. - Add runtime API reference sections for `Module`, `BundledModule`, and the tensor extension namespace. ### Test plan - `git diff --check origin/main..HEAD` - `python -m py_compile docs/source/conf.py` - `cd docs && doxygen source/Doxyfile` - Isolated Breathe/Sphinx build of `executorch-runtime-api-reference.rst` against the generated Doxygen XML - Verified the rendered runtime API page contains the new Module Extension and Tensor Extension entries cc @mergennachin @AlannaBurke
1 parent 9e4e497 commit 4413a5c

2 files changed

Lines changed: 32 additions & 3 deletions

File tree

docs/source/Doxyfile

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -963,6 +963,11 @@ INPUT = ../devtools/bundled_program/bundled_program.h \
963963
../runtime/core/span.h \
964964
../runtime/core/tag.h \
965965
../runtime/core/tensor_shape_dynamism.h \
966+
../extension/module/bundled_module.h \
967+
../extension/module/module.h \
968+
../extension/tensor/tensor_accessor.h \
969+
../extension/tensor/tensor_ptr.h \
970+
../extension/tensor/tensor_ptr_maker.h \
966971
../runtime/platform/compiler.h \
967972
../runtime/executor/ \
968973
../runtime/platform/
@@ -2374,15 +2379,15 @@ ENABLE_PREPROCESSING = YES
23742379
# The default value is: NO.
23752380
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
23762381

2377-
MACRO_EXPANSION = NO
2382+
MACRO_EXPANSION = YES
23782383

23792384
# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES then
23802385
# the macro expansion is limited to the macros specified with the PREDEFINED and
23812386
# EXPAND_AS_DEFINED tags.
23822387
# The default value is: NO.
23832388
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
23842389

2385-
EXPAND_ONLY_PREDEF = NO
2390+
EXPAND_ONLY_PREDEF = YES
23862391

23872392
# If the SEARCH_INCLUDES tag is set to YES, the include files in the
23882393
# INCLUDE_PATH will be searched if a #include is found.
@@ -2415,7 +2420,8 @@ INCLUDE_FILE_PATTERNS =
24152420
# recursively expanded use the := operator instead of the = operator.
24162421
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
24172422

2418-
PREDEFINED =
2423+
PREDEFINED = ET_MODULE_NAMESPACE=module \
2424+
ET_BUNDLED_MODULE_NAMESPACE=bundled_module
24192425

24202426
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
24212427
# tag can be used to specify a list of macro names that should be expanded. The

docs/source/executorch-runtime-api-reference.rst

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,26 @@ Values
4040

4141
.. doxygenclass:: executorch::runtime::etensor::Tensor
4242
:members:
43+
44+
Module Extension
45+
----------------
46+
47+
The Module extension provides a higher-level C++ facade for loading programs,
48+
setting inputs and outputs, and executing methods with common runtime defaults.
49+
50+
.. doxygenclass:: executorch::extension::module::Module
51+
:members:
52+
53+
.. doxygenclass:: executorch::extension::bundled_module::BundledModule
54+
:members:
55+
56+
Tensor Extension
57+
----------------
58+
59+
The Tensor extension provides managed tensor helpers for C++ applications that
60+
need to create, alias, resize, or index tensors before passing them to runtime
61+
APIs.
62+
63+
.. doxygennamespace:: executorch::extension
64+
:members:
65+
:content-only:

0 commit comments

Comments
 (0)