#NEWLINE# @ local_optimizer ( [ GpuDnnConvGradI ] , inplace = True ) #NEWLINE# def local_dnn_convgi_inplace( node ) : #NEWLINE# #INDENT# if ( ( type ( node . op ) != GpuDnnConvGradI ) or node . op . inplace ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# inputs = list ( node . inputs ) #NEWLINE# dest = inputs [ 2 ] #NEWLINE# if ( dest . owner and isinstance ( dest . owner . op , GpuAllocEmpty ) and ( len ( dest . clients ) > 1 ) ) : #NEWLINE# #INDENT# inputs [ 2 ] = gpu_alloc_empty ( * node . owner . inputs ) #NEWLINE# #UNINDENT# return [ GpuDnnConvGradI ( inplace = True ) ( * inputs ) ]