GameServerZ / MLPY /Lib /site-packages /torch /jit /_decomposition_utils.py
Kano001's picture
Upload 5252 files
c61ccee verified
raw
history blame
386 Bytes
import torch
from torch._ops import OpOverload, OpOverloadPacket
def _register_decomposition(op: OpOverload, graph: torch._C.Graph):
assert not isinstance(
op, OpOverloadPacket
), f"Must pass specific op overload, not overload packet, found {op}"
assert isinstance(op, OpOverload)
torch._C._jit_register_decomposition_for_schema(op._schema, graph)