I am trying to calculate the dot product. something like this,
A=np.array(([1,2,3],[4,5,6])).astype(np.float64) print np.dot(A,A.T) Instead, I would like to use GEMM (not batched I suppose). My A can be large. Something like (800000,3). So, it would seem GPU could help me a lot here. On Wed, Nov 18, 2015 at 5:22 PM, Lev Givon <l...@columbia.edu> wrote: > Received from Keith Brown on Tue, Nov 17, 2015 at 08:17:28PM EST: >> Hi, >> >> I have been using scikit-cudablas >> (https://github.com/lebedov/scikit-cuda). It rocks! >> >> Does anyone have a 2d matrix multiplication example with DgemmBatched? >> >> Similar to, >> >> >>> a=np.random.randint(0,3,(16,2)); b=np.random.randint(0,4,(2,16)) >> >>> np.dot(a,b) > > Not sure I follow what you want to do - batched GEMM is intended for > concurrent > matrix multiplication of collections of matrices (effectively 3rd-order > tensors). Do you want to obtain the products of the individual submatrices > within > the two matrices above, i.e., something like [np.dot(a[0:2,:], b[:,0:2]), > np.dot(a[2:4,:], > b[:,2:4]), ...]? > >> I have been using, >> https://github.com/lebedov/scikit-cuda/blob/7e7300474286019c917a6c8a4bca59405c64fbce/tests/test_cublas.py#L531 >> but it has too many dimensions and I keep getting confused by too many >> dimensions for DgemmBatched > -- > Lev Givon > Bionet Group | Neurokernel Project > http://lebedov.github.io/ > http://neurokernel.github.io/ > _______________________________________________ PyCUDA mailing list PyCUDA@tiker.net http://lists.tiker.net/listinfo/pycuda