-
Notifications
You must be signed in to change notification settings - Fork 511
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Import overview docs for Jagged Tensor Ops (#2237)
Summary: - Add overview documentation for Jagged Tensor Ops - Add more docstrings for quantize ops Pull Request resolved: #2237 Test Plan: https://deploy-preview-2237--pytorch-fbgemm-docs.netlify.app/ Reviewed By: spcyppt Differential Revision: D52452267 Pulled By: q10 fbshipit-source-id: 3430e09859b2b5e8dcb20ce82aad8596523b41cc
- Loading branch information
1 parent
9cd944a
commit cfdc6b8
Showing
21 changed files
with
641 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,7 @@ breathe | |
bs4 | ||
docutils | ||
lxml | ||
myst-parser | ||
sphinx-lint | ||
sphinx-serve | ||
six |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
Testing FBGEMM_GPU | ||
------------------ | ||
|
||
The tests (in the ``fbgemm_gpu/test/`` directory) and benchmarks (in the | ||
``fbgemm_gpu/bench/`` directory) provide good examples on how to use FBGEMM_GPU. | ||
|
||
FBGEMM_GPU Tests | ||
~~~~~~~~~~~~~~~~ | ||
|
||
To run the tests after building / installing the FBGEMM_GPU package: | ||
|
||
.. code:: sh | ||
# From the /fbgemm_gpu/ directory | ||
cd test | ||
python -m pytest -v -rsx -s -W ignore::pytest.PytestCollectionWarning split_table_batched_embeddings_test.py | ||
python -m pytest -v -rsx -s -W ignore::pytest.PytestCollectionWarning quantize_ops_test.py | ||
python -m pytest -v -rsx -s -W ignore::pytest.PytestCollectionWarning sparse_ops_test.py | ||
python -m pytest -v -rsx -s -W ignore::pytest.PytestCollectionWarning split_embedding_inference_converter_test.py | ||
Testing with the CUDA Variant | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
For the FBGEMM_GPU CUDA package, GPUs will be automatically detected and | ||
used for testing. To run the tests and benchmarks on a GPU-capable | ||
device in CPU-only mode, ``CUDA_VISIBLE_DEVICES=-1`` must be set in the | ||
environment: | ||
|
||
.. code:: sh | ||
# Enable for running in CPU-only mode (when on a GPU-capable machine) | ||
export CUDA_VISIBLE_DEVICES=-1 | ||
# Enable for debugging failed kernel executions | ||
export CUDA_LAUNCH_BLOCKING=1 | ||
python -m pytest -v -rsx -s -W ignore::pytest.PytestCollectionWarning split_table_batched_embeddings_test.py | ||
Testing with the ROCm Variant | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
For ROCm machines, testing against a ROCm GPU needs to be enabled with | ||
``FBGEMM_TEST_WITH_ROCM=1`` set in the environment: | ||
|
||
.. code:: sh | ||
# From the /fbgemm_gpu/ directory | ||
cd test | ||
export FBGEMM_TEST_WITH_ROCM=1 | ||
# Enable for debugging failed kernel executions | ||
export HIP_LAUNCH_BLOCKING=1 | ||
python -m pytest -v -rsx -s -W ignore::pytest.PytestCollectionWarning split_table_batched_embeddings_test.py | ||
FBGEMM_GPU Benchmarks | ||
~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
To run the benchmarks: | ||
|
||
.. code:: sh | ||
# From the /fbgemm_gpu/ directory | ||
cd bench | ||
python split_table_batched_embeddings_benchmark.py uvm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+134 KB
fbgemm_gpu/docs/src/overview/jagged-tensor-ops/JaggedTensorConversion1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+287 KB
fbgemm_gpu/docs/src/overview/jagged-tensor-ops/JaggedTensorConversion2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+284 KB
fbgemm_gpu/docs/src/overview/jagged-tensor-ops/JaggedTensorConversion3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+285 KB
fbgemm_gpu/docs/src/overview/jagged-tensor-ops/JaggedTensorExample.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.