Here is the results I get
0.865973949432 CPU
0.582780122757 GPU
I kind of expected more... (the GPU is a GTX280)
Of course, I never exclude that I did something stupid, in fact, I
expect it...
Is it the acceleration I should expect from this kind of matrix
operation? If yes, well cool... I guess.
If not, did I miss something?
Here is the code I use :
import pycuda.gpuarray as gpuarray
import pycuda.driver as cuda
import pycuda.autoinit
import numpy
import time
a=numpy.random.randn(1e4,1e4)
tic=time.time()
a_square=a*a
toc=time.time()-tic
print toc,"CPU"
a_gpu = gpuarray.to_gpu(a.astype(numpy.float32))
tic=time.time()
a_squared = (a_gpu*a_gpu).get()
toc=time.time()-tic
print toc,"GPU"
_______________________________________________
PyCuda mailing list
PyCuda@tiker.net
http://tiker.net/mailman/listinfo/pycuda_tiker.net