Skip to content

Commit 51ed229

Browse files
mlazosfacebook-github-bot
authored andcommitted
Use proper sources for constructing dataclass defaults (#157993)
Summary: Partially fixes pytorch/pytorch#154009 X-link: pytorch/pytorch#157993 Approved by: https://github.com/williamwen42, https://github.com/anijain2305 Reviewed By: wdvr Differential Revision: D78599676 fbshipit-source-id: 06baa54a73d6e8bbad7faf2f167425691658aee5
1 parent 167ae57 commit 51ed229

File tree

1 file changed

+4
-0
lines changed
  • userbenchmark/dynamo/dynamobench/_dynamo

1 file changed

+4
-0
lines changed

userbenchmark/dynamo/dynamobench/_dynamo/utils.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2572,6 +2572,10 @@ def tuple_iterator_getitem(it, index):
25722572
return obj[start + index]
25732573

25742574

2575+
def dataclass_fields(cls):
2576+
return torch._dynamo.disable(dataclasses.fields)(cls)
2577+
2578+
25752579
iter_next = next
25762580

25772581

0 commit comments

Comments
 (0)