Skip to content

Commit

Permalink
Support user defined dicts (#143548)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
anijain2305 authored and facebook-github-bot committed Dec 21, 2024
1 parent 0002f94 commit 07e6ef4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions userbenchmark/dynamo/dynamobench/_dynamo/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1896,6 +1896,14 @@ def check_numpy_ndarray_args(args, kwargs):
range_iterator: Type[Iterator[Any]] = type(iter(range(0)))
tuple_iterator_len = tuple_iterator.__length_hint__ # type: ignore[attr-defined]
object_new = object.__new__
dict_new = dict.__new__
dict_methods = {
method
for method in itertools.chain(
dict.__dict__.values(), collections.OrderedDict.__dict__.values()
)
if callable(method)
}


def nn_module_new(cls):
Expand Down

0 comments on commit 07e6ef4

Please sign in to comment.