pytorch_pfn_extras.ops.OpDesc#
- class pytorch_pfn_extras.ops.OpDesc(op, meta, signature)#
Bases:
object
Metadata to register an op to torch.library.
- Parameters:
op (Callable[[...], Any]) –
meta (Callable[[...], Any]) –
signature (str) –
- op#
code to be executed in the forward/backward of the op.
- Type:
callable
- meta#
function to perform shape inference for forward/backward passes.
- Type:
callable
- signature#
Arguments and return type of the function
"(Tensor a, Tensor b) -> Tensor[]"
.- Type:
str
Methods
__init__
(op, meta, signature)- __init__(op, meta, signature)#
- Parameters:
op (Callable[[...], Any]) –
meta (Callable[[...], Any]) –
signature (str) –
- Return type:
None