Skip to content

Commit 07e6ef4

Browse files
anijain2305facebook-github-bot
authored andcommitted
Support user defined dicts (#143548)
Summary: X-link: pytorch/pytorch#143548 Approved by: https://github.com/yanboliang, https://github.com/jansel, https://github.com/williamwen42 Reviewed By: huydhn Differential Revision: D67554535 Pulled By: anijain2305 fbshipit-source-id: 04dd5f1571a19e39672739428e4b1e3e9ed04492
1 parent 0002f94 commit 07e6ef4

File tree

1 file changed

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

1 file changed

+8
-0
lines changed

userbenchmark/dynamo/dynamobench/_dynamo/utils.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1896,6 +1896,14 @@ def check_numpy_ndarray_args(args, kwargs):
18961896
range_iterator: Type[Iterator[Any]] = type(iter(range(0)))
18971897
tuple_iterator_len = tuple_iterator.__length_hint__ # type: ignore[attr-defined]
18981898
object_new = object.__new__
1899+
dict_new = dict.__new__
1900+
dict_methods = {
1901+
method
1902+
for method in itertools.chain(
1903+
dict.__dict__.values(), collections.OrderedDict.__dict__.values()
1904+
)
1905+
if callable(method)
1906+
}
18991907

19001908

19011909
def nn_module_new(cls):

0 commit comments

Comments
 (0)