Caffe2 - Python API
A deep learning, cross platform ML framework
Public Member Functions | Public Attributes | List of all members
torch._ops._Ops Class Reference
Inheritance diagram for torch._ops._Ops:

Public Member Functions

def __init__ (self)
 
def __getattr__ (self, name)
 
def load_library (self, path)
 

Public Attributes

 loaded_libraries
 

Detailed Description

Definition at line 68 of file _ops.py.

Member Function Documentation

def torch._ops._Ops.load_library (   self,
  path 
)
Loads a shared library from the given path into the current process.

The library being loaded may run global initialization code to register
custom operators with the PyTorch JIT runtime. This allows dynamically
loading custom operators. For this, you should compile your operator
and the static registration code into a shared library object, and then
call ``torch.ops.load_library('path/to/libcustom.so')`` to load the
shared object.

After the library is loaded, it is added to the
``torch.ops.loaded_libraries`` attribute, a set that may be inspected
for the paths of all libraries loaded using this function.

Arguments:
    path (str): A path to a shared library to load.

Definition at line 79 of file _ops.py.


The documentation for this class was generated from the following file: