Skip to content

Commit

Permalink
Add stable API doc (#3194)
Browse files Browse the repository at this point in the history
Summary:
X-link: facebookresearch/FBGEMM#290

As title

Pull Request resolved: #3194

Differential Revision: D63601834

Pulled By: sryap
  • Loading branch information
sryap authored and facebook-github-bot committed Sep 29, 2024
1 parent 3bf1bab commit d840138
Show file tree
Hide file tree
Showing 8 changed files with 96 additions and 3 deletions.
12 changes: 10 additions & 2 deletions fbgemm_gpu/docs/src/fbgemm_gpu-python-api/jagged_tensor_ops.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,22 @@ Jagged Tensor Operators

.. automodule:: fbgemm_gpu

.. _jagged-tensor-ops-stable-api:

Stable API
----------

.. autofunction:: torch.ops.fbgemm.jagged_to_padded_dense

Other API
---------

.. autofunction:: torch.ops.fbgemm.jagged_2d_to_dense

.. autofunction:: torch.ops.fbgemm.jagged_1d_to_dense

.. autofunction:: torch.ops.fbgemm.dense_to_jagged

.. autofunction:: torch.ops.fbgemm.jagged_to_padded_dense

.. autofunction:: torch.ops.fbgemm.jagged_dense_elementwise_add

.. autofunction:: torch.ops.fbgemm.jagged_dense_elementwise_add_jagged_output
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,13 @@ Pooled Embedding Modules

.. automodule:: fbgemm_gpu

.. _pooled-embedding-modules-stable-api:

Stable API
----------

.. autoclass:: fbgemm_gpu.permute_pooled_embedding_modules.PermutePooledEmbeddings
:members: __call__

Other API
---------
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@ Pooled Embedding Operators

.. automodule:: fbgemm_gpu

.. _pooled-embedding-operators-stable-api:

Stable API
----------

.. autofunction:: torch.ops.fbgemm.merge_pooled_embeddings

.. autofunction:: torch.ops.fbgemm.permute_pooled_embs

Other API
---------
8 changes: 8 additions & 0 deletions fbgemm_gpu/docs/src/fbgemm_gpu-python-api/quantize_ops.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,12 @@ Quantization Operators

.. automodule:: fbgemm_gpu

.. _quantize-ops-stable-api:

Stable API
----------

.. autofunction:: torch.ops.fbgemm.FloatOrHalfToFusedNBitRowwiseQuantizedSBHalf

Other API
---------
9 changes: 8 additions & 1 deletion fbgemm_gpu/docs/src/fbgemm_gpu-python-api/sparse_ops.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ Sparse Operators

.. automodule:: fbgemm_gpu

.. _sparse-ops-stable-api:

Stable API
----------

.. autofunction:: torch.ops.fbgemm.permute_2D_sparse_data

.. autofunction:: torch.ops.fbgemm.permute_1D_sparse_data
Expand All @@ -17,4 +22,6 @@ Sparse Operators

.. autofunction:: torch.ops.fbgemm.keyed_jagged_index_select_dim1

.. autofunction:: torch.ops.fbgemm.block_bucketize_sparse_features
.. autofunction:: torch.ops.fbgemm.block_bucketize_sparse_features

Other API
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
Table Batched Embedding (TBE) Training Module
=============================================

.. _table-batched-embedding-ops-stable-api:

Stable API
----------

.. autoclass:: fbgemm_gpu.split_table_batched_embeddings_ops_training.SplitTableBatchedEmbeddingBagsCodegen
:members: forward,
split_embedding_weights,
split_optimizer_states,
set_learning_rate,
update_hyper_parameters,
set_optimizer_step

Other API
---------
38 changes: 38 additions & 0 deletions fbgemm_gpu/docs/src/fbgemm_gpu-stable-api/python_api.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
FBGEMM_GPU Stable Python API
============================

We provide the stable API support in FBGEMM_GPU v1. The following outlines our
supports:

- API backward compatibility guarantees via thorough testing. We guarantee that
our stable APIs will be backward compatible within a major version, meaning
that the stable APIs for v1.0.0 will be compatible with every future v1.x.x
release.

- Enhanced documentation, ensuring that every stable API has comprehensive and
up-to-date documentation.

- No explicit functionality guarantees. Functionality guarantees are only
provided through unit testing framework. We do NOT guarantee any
functionalities that are NOT explicitly tested and documented in our unit
tests.

- No performance guarantees. However, we are committed to providing support on
a best-effort basis.

Stable APIs
-----------

Our stable APIs can be found via the links below:

- :ref:`Table batched embedding (TBE) modules<table-batched-embedding-ops-stable-api>`

- :ref:`Pooled embedding operators<pooled-embedding-operators-stable-api>`

- :ref:`Pooled embedding modules<pooled-embedding-modules-stable-api>`

- :ref:`Sparse operators<sparse-ops-stable-api>`

- :ref:`Jagged tensor operators<jagged-tensor-ops-stable-api>`

- :ref:`Quantization operators<quantize-ops-stable-api>`
8 changes: 8 additions & 0 deletions fbgemm_gpu/docs/src/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,14 @@ Table of Contents

fbgemm_gpu-overview/jagged-tensor-ops/JaggedTensorOps.rst

.. _fbgemm.toc.api.stable:

.. toctree::
:maxdepth: 1
:caption: FBGEMM Stable API

fbgemm_gpu-stable-api/python_api.rst

.. _fbgemm.toc.api.cpp:

.. toctree::
Expand Down

0 comments on commit d840138

Please sign in to comment.