def test_nvidia_driver3():
 var = cuda.fvector()
 f = theano.function([var], (var + 1), mode=mode_with_gpu, profile=False)
 topo = f.maker.fgraph.toposort()
 assert any([isinstance(node.op, cuda.GpuElemwise) for node in topo])
 assert (theano.sandbox.cuda.use.device_number is not None)

def test_nvidia_driver3 ( ) : var = cuda . fvector ( ) f = theano . function ( [ var ] , ( var + 1 ) , mode = mode_with_gpu , profile = False ) topo = f . maker . fgraph . toposort ( ) assert any ( [ isinstance ( node . op , cuda . GpuElemwise ) for node in topo ] ) assert ( theano . sandbox . cuda . use . device_number is not None )
test that the gpu device is initialized by theano when we build a function with gpu op .