File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -484,7 +484,7 @@ function inside of our script code:
484484
485485When 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
488488graph 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
You can’t perform that action at this time.
0 commit comments