mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-06 12:20:52 +01:00
[dynamo] Dont guard on getset descriptors for torch_function (#166346)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/166346 Approved by: https://github.com/mlazos ghstack dependencies: #166329
This commit is contained in:
parent
65868156c6
commit
02095cc09d
|
|
@ -583,12 +583,6 @@ class TensorWithTFOverrideVariable(TensorVariable):
|
|||
):
|
||||
args, kwargs = [self], {}
|
||||
if can_dispatch_torch_function(tx, args, kwargs):
|
||||
if self.source:
|
||||
install_guard(
|
||||
AttrSource(
|
||||
AttrSource(self.source, "__class__"), name
|
||||
).make_guard(GuardBuilder.CLOSURE_MATCH)
|
||||
)
|
||||
get_fn = VariableTracker.build(tx, getattr(torch.Tensor, name).__get__)
|
||||
|
||||
return self.call_torch_function(
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user