@gof.local_optimizer([AdvancedIncSubtensor1], inplace=True)
def local_inplace_incsubtensor1(node):
 if (isinstance(node.op, AdvancedIncSubtensor1) and (not node.op.inplace)):
  new_op = node.op.clone_inplace()
  new_node = new_op(*node.inputs)
  copy_stack_trace(node.outputs, new_node)
  return [new_node]
 return False

@ gof . local_optimizer ( [ AdvancedIncSubtensor1 ] , inplace = True ) def local_inplace_incsubtensor1 ( node ) : if ( isinstance ( node . op , AdvancedIncSubtensor1 ) and ( not node . op . inplace ) ) : new_op = node . op . clone_inplace ( ) new_node = new_op ( * node . inputs ) copy_stack_trace ( node . outputs , new_node ) return [ new_node ] return False
also work for gpuadvancedincsubtensor1 .