Skip to content

Commit

Permalink
Add documentation for cumem_utils (pytorch#2232)
Browse files Browse the repository at this point in the history
Summary:
- Update documentation on adding Python and C++ documentation
- Add extensive documentation for `cumem_utils`

Pull Request resolved: pytorch#2232

Reviewed By: spcyppt

Differential Revision: D52393909

Pulled By: q10

fbshipit-source-id: 8d4561135b79d1e5b791e1e9204d8c8b81d3be4e
  • Loading branch information
q10 authored and facebook-github-bot committed Dec 26, 2023
1 parent eb12cf6 commit c3655f9
Show file tree
Hide file tree
Showing 29 changed files with 699 additions and 395 deletions.
15 changes: 9 additions & 6 deletions .github/scripts/fbgemm_gpu_docs.bash
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,20 @@ install_docs_tools () {
# shellcheck disable=SC2155
local env_prefix=$(env_name_or_prefix "${env_name}")

echo "[INSTALL] Installing docs tools ..."
echo "[INSTALL] Installing Doxygen ..."

# shellcheck disable=SC2086
(exec_with_retries 3 conda install ${env_prefix} -c conda-forge -y \
doxygen) || return 1
doxygen \
make) || return 1

# Check binaries are visible in the PATH
(test_binpath "${env_name}" doxygen) || return 1
(test_binpath "${env_name}" make) || return 1

echo "[BUILD] Installing docs-build dependencies ..."
# shellcheck disable=SC2086
(exec_with_retries 3 conda run ${env_prefix} python -m pip install -r requirements.txt) || return 1

echo "[INSTALL] Successfully installed all the docs tools"
}
Expand Down Expand Up @@ -69,10 +76,6 @@ build_fbgemm_gpu_docs () {
# shellcheck disable=SC2155
local env_prefix=$(env_name_or_prefix "${env_name}")

echo "[BUILD] Installing docs-build dependencies ..."
# shellcheck disable=SC2086
(exec_with_retries 3 conda run ${env_prefix} python -m pip install -r requirements.txt) || return 1

echo "[BUILD] Running Doxygen build ..."
# shellcheck disable=SC2086
(exec_with_retries 3 conda run ${env_prefix} doxygen Doxyfile.in) || return 1
Expand Down
2 changes: 2 additions & 0 deletions .github/scripts/utils_build.bash
Original file line number Diff line number Diff line change
Expand Up @@ -166,12 +166,14 @@ install_build_tools () {
cmake \
hypothesis \
jinja2 \
make \
ninja \
numpy \
scikit-build \
wheel) || return 1

# Check binaries are visible in the PAATH
(test_binpath "${env_name}" make) || return 1
(test_binpath "${env_name}" cmake) || return 1
(test_binpath "${env_name}" ninja) || return 1

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/fbgemm_gpu_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
run: . $PRELUDE; install_build_tools $BUILD_ENV

- name: Install Documentation Tools
run: . $PRELUDE; install_docs_tools $BUILD_ENV
run: . $PRELUDE; cd fbgemm_gpu/docs; install_docs_tools $BUILD_ENV

- name: Install PyTorch-CPU Nightly
run: . $PRELUDE; install_pytorch_pip $BUILD_ENV nightly cpu
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -90,3 +90,6 @@ install_manifest.txt
compile_commands.json
CTestTestfile.cmake
_deps

# Sphinx repos
pytorch-sphinx-theme/
6 changes: 3 additions & 3 deletions fbgemm_gpu/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# FBGEMM_GPU

[![FBGEMM_GPU CI](https://github.com/pytorch/FBGEMM/actions/workflows/fbgemm_gpu_ci.yml/badge.svg)](https://github.com/pytorch/FBGEMM/actions/workflows/fbgemm_gpu_ci.yml)
[![FBGEMM_GPU-CPU Nightly Build](https://github.com/pytorch/FBGEMM/actions/workflows/fbgemm_gpu_cpu_nightly.yml/badge.svg?event=schedule)](https://github.com/pytorch/FBGEMM/actions/workflows/fbgemm_gpu_cpu_nightly.yml)
[![FBGEMM_GPU-CUDA Nightly Build](https://github.com/pytorch/FBGEMM/actions/workflows/fbgemm_gpu_cuda_nightly.yml/badge.svg?event=schedule)](https://github.com/pytorch/FBGEMM/actions/workflows/fbgemm_gpu_cuda_nightly.yml)
[![FBGEMM_GPU-CPU CI](https://github.com/pytorch/FBGEMM/actions/workflows/fbgemm_gpu_ci_cpu.yml/badge.svg)](https://github.com/pytorch/FBGEMM/actions/workflows/fbgemm_gpu_ci_cpu.yml)
[![FBGEMM_GPU-CUDA CI](https://github.com/pytorch/FBGEMM/actions/workflows/fbgemm_gpu_ci_cuda.yml/badge.svg)](https://github.com/pytorch/FBGEMM/actions/workflows/fbgemm_gpu_ci_cuda.yml)
[![FBGEMM_GPU-ROCm CI](https://github.com/pytorch/FBGEMM/actions/workflows/fbgemm_gpu_ci_rocm.yml/badge.svg)](https://github.com/pytorch/FBGEMM/actions/workflows/fbgemm_gpu_ci_rocm.yml)

FBGEMM_GPU (FBGEMM GPU Kernels Library) is a collection of high-performance PyTorch
GPU operator libraries for training and inference. The library provides efficient
Expand Down
2 changes: 1 addition & 1 deletion fbgemm_gpu/codegen/embedding_forward_template_helpers.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ __device__ __forceinline__ void cp_async_fence() {

/// Partial specialization

/// Blocks until all but <N> previous cp.async.commit_group operations have
/// Blocks until all but N previous cp.async.commit_group operations have
/// committed.

template <int N>
Expand Down
Loading

0 comments on commit c3655f9

Please sign in to comment.