Skip to content

Commit 999a029

Browse files
committed
Kill some other occurrences of RegisterOperators
Signed-off-by: Edward Z. Yang <[email protected]>
1 parent 3e32d22 commit 999a029

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

advanced_source/torch_script_custom_ops.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ function inside of our script code:
484484
485485
When the TorchScript compiler sees the reference to
486486
``torch.ops.my_ops.warp_perspective``, it will find the implementation we
487-
registered via the ``RegisterOperators`` object in C++, and compile it into its
487+
registered via the ``TORCH_LIBRARY`` function in C++, and compile it into its
488488
graph representation:
489489
490490
.. code-block:: python
@@ -720,7 +720,7 @@ library.
720720
``-Wl,--no-as-needed`` prefix to the ``warp_perspective`` link line. This is
721721
required because we will not actually be calling any function from the
722722
``warp_perspective`` shared library in our application code. We only need the
723-
global ``RegisterOperators`` object's constructor to run. Inconveniently, this
723+
``TORCH_LIBRARY`` function to run. Inconveniently, this
724724
confuses the linker and makes it think it can just skip linking against the
725725
library altogether. On Linux, the ``-Wl,--no-as-needed`` flag forces the link
726726
to happen (NB: this flag is specific to Linux!). There are other workarounds

0 commit comments

Comments
 (0)