@local_optimizer([GpuElemwise])
def local_pycuda_gpu_elemwise(node):
 if isinstance(node.op, GpuElemwise):
  if ((not any([any(i.type.broadcastable) for i in node.inputs])) and all([(i.ndim <= 2) for i in node.inputs])):
   new_op = PycudaElemwiseSourceModuleOp(node.op.scalar_op, node.op.inplace_pattern)(*node.inputs)
   return [new_op]

@ local_optimizer ( [ GpuElemwise ] ) def local_pycuda_gpu_elemwise ( node ) : if isinstance ( node . op , GpuElemwise ) : if ( ( not any ( [ any ( i . type . broadcastable ) for i in node . inputs ] ) ) and all ( [ ( i . ndim <= 2 ) for i in node . inputs ] ) ) : new_op = PycudaElemwiseSourceModuleOp ( node . op . scalar_op , node . op . inplace_pattern ) ( * node . inputs ) return [ new_op ]
gpuelemwise -> pycudaelemwisesourcemoduleop .