Skip to content

Commit

Permalink
move tf override tensor to torch_function.py (#111714)
Browse files Browse the repository at this point in the history
Summary:
Moves TensorWithTFOverride to torch_function.py

X-link: pytorch/pytorch#111714
Approved by: https://github.com/eellison, https://github.com/voznesenskym

Reviewed By: izaitsevfb

Differential Revision: D50543534

Pulled By: mlazos

fbshipit-source-id: 07d650db0a40609e7d38f32a22a5d4e60fdf44a3
  • Loading branch information
mlazos authored and facebook-github-bot committed Oct 23, 2023
1 parent 5a391f5 commit b5631ed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion userbenchmark/dynamo/dynamobench/_dynamo/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2197,7 +2197,7 @@ def is_tensor_base_attr_getter(value):

def has_torch_function(vt: "torch._dynamo.variables.base.VariableTracker") -> bool:
from torch._dynamo.variables import UserDefinedObjectVariable
from torch._dynamo.variables.tensor import TensorWithTFOverrideVariable
from torch._dynamo.variables.torch_function import TensorWithTFOverrideVariable

return isinstance(vt, TensorWithTFOverrideVariable) or (
isinstance(vt, UserDefinedObjectVariable)
Expand Down

0 comments on commit b5631ed

Please sign in to comment.