mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-07 12:21:27 +01:00
[dynamo, 3.12] add BINARY/STORE_SLICE (#122455)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/122455 Approved by: https://github.com/jansel ghstack dependencies: #122146, #122335, #122354, #122355, #122356, #122449
This commit is contained in:
parent
7b13228038
commit
bcdd0c6f59
|
|
@ -1850,6 +1850,19 @@ class InstructionTranslatorBase(
|
|||
def RETURN_GENERATOR(self, inst):
|
||||
self.append_prefix_inst(inst)
|
||||
|
||||
# 3.12 opcodes
|
||||
def BINARY_SLICE(self, inst):
|
||||
# BUILD_SLICE
|
||||
items = self.popn(2)
|
||||
self.push(SliceVariable(items))
|
||||
self.BINARY_SUBSCR(inst)
|
||||
|
||||
def STORE_SLICE(self, inst):
|
||||
# BUILD SLICE
|
||||
items = self.popn(2)
|
||||
self.push(SliceVariable(items))
|
||||
self.STORE_SUBSCR(inst)
|
||||
|
||||
def is_non_empty_graph(self):
|
||||
if self.output.count_calls() > 1:
|
||||
# perf optimization only
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user