Skip to content

Commit

Permalink
Support for sphinx_copybutton (#342)
Browse files Browse the repository at this point in the history
  • Loading branch information
rusty1s committed Aug 17, 2024
1 parent 2eaa705 commit fb0b5df
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
'sphinx.ext.mathjax',
'sphinx.ext.napoleon',
'sphinx.ext.viewcode',
'sphinx_copybutton',
'pyg',
]

Expand Down
6 changes: 4 additions & 2 deletions pyg_lib/ops/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,8 @@ def grouped_matmul(
r"""Performs dense-dense matrix multiplication according to groups,
utilizing dedicated kernels that effectively parallelize over groups.
Example:
.. code-block:: python
inputs = [torch.randn(5, 16), torch.randn(3, 32)]
others = [torch.randn(16, 32), torch.randn(32, 64)]
Expand Down Expand Up @@ -147,7 +148,8 @@ def segment_matmul(
the first dimension of :obj:`inputs` as given by :obj:`ptr`, utilizing
dedicated kernels that effectively parallelize over groups.
Example:
.. code-block:: python
inputs = torch.randn(8, 16)
ptr = torch.tensor([0, 5, 8])
other = torch.randn(2, 16, 32)
Expand Down

0 comments on commit fb0b5df

Please sign in to comment.