@register_opt()
@local_optimizer([GpuContiguous])
def local_gpu_contiguous_gpu_contiguous(node):
 if isinstance(node.op, GpuContiguous):
  inp = node.inputs[0]
  if (inp.owner and isinstance(inp.owner.op, GpuContiguous)):
   return [inp]

@ register_opt ( ) @ local_optimizer ( [ GpuContiguous ] ) def local_gpu_contiguous_gpu_contiguous ( node ) : if isinstance ( node . op , GpuContiguous ) : inp = node . inputs [ 0 ] if ( inp . owner and isinstance ( inp . owner . op , GpuContiguous ) ) : return [ inp ]
gpu_contiguous(gpu_contiguous(x)) -> gpu_contiguous(x) .