def test_erfinvgpu():
 x = tensor.fmatrix()
 f = theano.function([x], tensor.Elemwise(erfinv)(x), mode=mode_with_gpu)
 theano.function([x], tensor.Elemwise(erfinv)(x), mode=mode_without_gpu)
 assert isinstance(f.maker.fgraph.toposort()[1].op, cuda.GpuElemwise)
 assert isinstance(f.maker.fgraph.toposort()[1].op.scalar_op, cuda.elemwise.ErfinvGPU)
 numpy.random.rand(7, 8).astype('float32')

def test_erfinvgpu ( ) : x = tensor . fmatrix ( ) f = theano . function ( [ x ] , tensor . Elemwise ( erfinv ) ( x ) , mode = mode_with_gpu ) theano . function ( [ x ] , tensor . Elemwise ( erfinv ) ( x ) , mode = mode_without_gpu ) assert isinstance ( f . maker . fgraph . toposort ( ) [ 1 ] . op , cuda . GpuElemwise ) assert isinstance ( f . maker . fgraph . toposort ( ) [ 1 ] . op . scalar_op , cuda . elemwise . ErfinvGPU ) numpy . random . rand ( 7 , 8 ) . astype ( 'float32' )
test that local_gpu_elemwise_0 replaces erfinv with erfinvgpu .