f() // Ignore first function call to get representative time.
if execute:
sync = (hasattr(theano, "sandbox") and
hasattr(theano.sandbox, "cuda") and
isinstance(c, theano.sandbox.cuda.CudaNdarraySharedVariable))
sync2 = (hasattr(theano, "gpuarray") and
After Change
for i in range(iters):
f()
if sync:
c.get_value(borrow=True, return_internal_type=True).sync()
t1 = time.time()
return t1 - t0, impl