diff --git a/nncf/torch/dynamic_graph/patch_pytorch.py b/nncf/torch/dynamic_graph/patch_pytorch.py index cf4e24ff9a0..5efb69396ad 100644 --- a/nncf/torch/dynamic_graph/patch_pytorch.py +++ b/nncf/torch/dynamic_graph/patch_pytorch.py @@ -122,35 +122,51 @@ class FunctionsToPatchWithoutTracing: class MagicFunctionsToPatch: MAGIC_FUNCTIONS_TO_PATCH = { NamespaceTarget.TORCH_TENSOR: [ + "__abs__", "__add__", - "__iadd__", - "__radd__", - "__sub__", - "__isub__", - "__rsub__", - "__mul__", - "__matmul__", - "__rmatmul__", - "__imul__", - "__rmul__", + "__and__", "__div__", - "__idiv__", - "__truediv__", + "__eq__", "__floordiv__", - "__ifloordiv__", - "__rfloordiv__", + "__ge__", "__getitem__", - "__lt__", - "__le__", "__gt__", - "__ge__", + "__iadd__", + "__iand__", + "__idiv__", + "__ifloordiv__", + "__imatmul__", + "__imul__", + "__invert__", + "__ior__", + "__ipow__", + "__isub__", + "__itruediv__", + "__ixor__", + "__le__", + "__lt__", + "__matmul__", "__mod__", - "__eq__", + "__mul__", "__ne__", + "__neg__", "__or__", - "__xor__", - "__and__", "__pow__", + "__radd__", + "__rand__", + "__rdiv__", + "__rdivmod__", + "__rfloordiv__", + "__rmatmul__", + "__rmul__", + "__ror__", + "__rpow__", + "__rsub__", + "__rtruediv__", + "__rxor__", + "__sub__", + "__truediv__", + "__xor__", ] }