print'ERROR, not able to tell if theano used the cpu or the gpu'
print'ERROR, not able to tell if theano used the cpu or the gpu'
printf.maker.env.toposort()
printf.maker.env.toposort()
t0=0
t0=0
t1=-1
t1=-1
ifexecute:
ifexecute:
t0=time.time()
t0=time.time()
foriinrange(iters):
foriinrange(iters):
f()
f()
t1=time.time()
t1=time.time()
ifverboseandexecute:
ifverboseandexecute:
print
print
print'This execution time took %.2fs'%(t1-t0)
print'This execution time took %.2fs'%(t1-t0)
print
print
print'Try to run this script a few times. Experience show that the first time is not as fast as followings call. The difference is not big, but consistent.'
print('Try to run this script a few times. Experience show that'
returnt1-t0
' the first time is not as fast as followings call. The'
' difference is not big, but consistent.')
returnt1-t0
defjobman_job(state,channel):
defjobman_job(state,channel):
execute()
execute()
returnchannel.COMPLETE
returnchannel.COMPLETE
deftest():
deftest():
execute()
execute()
...
@@ -92,11 +100,15 @@ if __name__ == "__main__":
...
@@ -92,11 +100,15 @@ if __name__ == "__main__":
ifverbose:
ifverbose:
print"""
print"""
Some results that you can compare against. They were 10 executions of gemm in float64 with matrices of shape 2000x2000.
Some results that you can compare against. They were 10 executions
of gemm in float64 with matrices of shape 2000x2000.