Skip to content
This repository was archived by the owner on Oct 27, 2023. It is now read-only.

Commit d99a389

Browse files
committed
Mention a quirk with jupyter notebooks
1 parent 18c4b84 commit d99a389

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

advanced_source/torch_script_custom_ops.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -999,6 +999,11 @@ Naturally, it is best practice to only use
999999
``torch.utils.cpp_extension.load_inline`` if your source code is reasonably
10001000
short.
10011001
1002+
Note that if you're using this in a Jupyter Notebook, you should not execute
1003+
the cell with the registration multiple times because each execution registers
1004+
a new library and re-registers the custom operator. If you need to re-execute it,
1005+
you have to restart the Python kernel of your notebook beforehand.
1006+
10021007
Building with Setuptools
10031008
************************
10041009

0 commit comments

Comments
 (0)