Skip to content

Commit

Permalink
[Doc][NVTX] Add documentation for nvtx.range (pytorch#121699)
Browse files Browse the repository at this point in the history
The context manager `torch.cuda.nvtx.range` has been around for about 4 years (see pytorch#42925). Unfortunately, it was never documented and as a consequence users are just unaware of it (see pytorch#121663).

Pull Request resolved: pytorch#121699
Approved by: https://github.com/janeyx99
  • Loading branch information
Aidyn-A authored and pytorchmergebot committed Mar 15, 2024
1 parent b92daff commit af86d67
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion docs/source/cuda.rst
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ NVIDIA Tools Extension (NVTX)
nvtx.mark
nvtx.range_push
nvtx.range_pop
nvtx.range

Jiterator (beta)
-----------------------------
Expand Down Expand Up @@ -167,4 +168,4 @@ See the :doc:`documentation <cuda._sanitizer>` for information on how to use it.
.. py:module:: torch.cuda.profiler
.. py:module:: torch.cuda.random
.. py:module:: torch.cuda.sparse
.. py:module:: torch.cuda.streams
.. py:module:: torch.cuda.streams
4 changes: 3 additions & 1 deletion torch/jit/supported_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,9 @@ def _get_global_builtins():
if len(schemas) > 0:
schematized_ops.append("")
else:
table_row = f'":any:`{fn}`", "{schemaless_op_explanations[fn]}"'
table_row = (
f'":external+python:py:obj:`{fn}`", "{schemaless_op_explanations[fn]}"'
)
schemaless_ops.append(table_row)

schematized_ops_str = "\n".join(schematized_ops)
Expand Down

0 comments on commit af86d67

Please sign in to comment.