Skip to content

Commit 6ac2d2e

Browse files
committed
update
1 parent 84879c6 commit 6ac2d2e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

advanced_source/python_extension_autoload.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ Now the ``torch_foo`` module can be imported when running import torch:
5656
>>> torch.foo.is_available()
5757
True
5858
59+
You may encounter issues with circular imports, the following examples are intended to help you address them.
60+
5961
Examples
6062
^^^^^^^^
6163

@@ -138,6 +140,7 @@ Unlike ``habana_frameworks``, ``torch_npu`` uses the environment variable ``TORC
138140
to control the autoloading process. For example, we set it to `0` to disable autoloading to prevent circular imports:
139141

140142
.. code-block:: python
143+
141144
# Disable autoloading before running 'import torch'
142145
os.environ['TORCH_DEVICE_BACKEND_AUTOLOAD'] = '0'
143146

0 commit comments

Comments
 (0)