Skip to content

Commit 5d9adfb

Browse files
committed
update
1 parent b3766ed commit 5d9adfb

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

advanced_source/python_extension_autoload.rst

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -87,18 +87,20 @@ as ``npu`` to the end users.
8787

8888
.. _torch_npu: https://github.com/Ascend/pytorch
8989

90-
Define an entry point in `torch_npu/setup.py <https://github.com/Ascend/pytorch/blob/c164fbd5bb74790191ff8496b77d620fddf806d8/setup.py#L618>`_:
90+
Define an entry point in `torch_npu/setup.py`_:
91+
92+
.. _torch_npu/setup.py: https://github.com/Ascend/pytorch/blob/c164fbd5bb74790191ff8496b77d620fddf806d8/setup.py#L618
9193

9294
.. code-block:: diff
9395
9496
setup(
9597
name="torch_npu",
9698
version="2.5",
97-
+ entry_points={
98-
+ 'torch.backends': [
99-
+ 'torch_npu = torch_npu:_autoload',
100-
+ ],
101-
+ }
99+
+ entry_points={
100+
+ 'torch.backends': [
101+
+ 'torch_npu = torch_npu:_autoload',
102+
+ ],
103+
+ }
102104
)
103105
104106
``import torch_npu`` is also no longer needed after applying this mechanism:

0 commit comments

Comments
 (0)