Skip to content

Commit

Permalink
[dynamo] fix pytorch#93624 (pytorch#125945)
Browse files Browse the repository at this point in the history
Fixes pytorch#93624 but also requires jcmgray/autoray#20 to be fixed.

Pull Request resolved: pytorch#125945
Approved by: https://github.com/jansel
ghstack dependencies: pytorch#125882, pytorch#125943
  • Loading branch information
williamwen42 authored and ZelboK committed May 19, 2024
1 parent 972f76f commit 2524635
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 1 deletion.
Empty file.
Empty file.
Empty file.
2 changes: 1 addition & 1 deletion torch/_dynamo/variables/builtin.py
Original file line number Diff line number Diff line change
Expand Up @@ -1577,7 +1577,7 @@ def call_getattr(
) and trace_rules.is_aten_op_or_tensor_method(member):
return TorchInGraphFunctionVariable(member, **options)
elif isinstance(obj, (PythonModuleVariable, DummyModule)):
if obj.is_torch:
if obj.is_torch or name not in obj.value.__dict__:
member = getattr(obj.value, name)
else:
member = obj.value.__dict__[name]
Expand Down

0 comments on commit 2524635

Please sign in to comment.