mirror of
https://github.com/saymrwulf/pytorch.git
synced 2026-05-14 20:57:59 +00:00
Update on "[dynamo][lists] Support list subclasses"
cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 kadeng chauhang amjames [ghstack-poisoned]
This commit is contained in:
parent
7270a4a6de
commit
8fbc9df45e
2 changed files with 2 additions and 1 deletions
|
|
@ -559,6 +559,7 @@ class DictGetItemSource(ChainedSource):
|
|||
self.index.reconstruct(codegen)
|
||||
else:
|
||||
codegen.append_output(codegen.create_load_const(self.index))
|
||||
# TODO(anijain2305) - Change this to dict.__getitem__(d, k)
|
||||
codegen.append_output(create_instruction("BINARY_SUBSCR"))
|
||||
|
||||
def name(self):
|
||||
|
|
|
|||
|
|
@ -2409,7 +2409,7 @@ def to_subclass(t, cls):
|
|||
|
||||
|
||||
def dict_keys_getitem(d, n):
|
||||
return next(itertools.islice(iter(d), n, n + 1))
|
||||
return next(itertools.islice(iter(dict(d)), n, n + 1))
|
||||
|
||||
|
||||
def enum_repr(value, local):
|
||||
|
|
|
|||
Loading…
Reference in a new issue