torch.library
Python operator registration API provides capabilities for extending
PyTorch's core library of operators with user defined operators.
Currently, this can be done in two ways:


Creating new libraries


Lets you to register new operators and kernels for various
     backends and functionalities by specifying the appropriate
     dispatch keys. For example,
* Consider registering a new operator "add" in your newly
  created namespace "foo". You can access this operator using
  the "torch.ops" API and calling into by calling
  "torch.ops.foo.add". You can also access specific registered
  overloads by calling "torch.ops.foo.add.{overload_name}".

* If you registered a new kernel for the "CUDA" dispatch key
  for this operator, then your custom defined function will be
  called for CUDA tensor inputs.



This can be done by creating Library class objects of ""DEF""
     kind.

