Received from Evgeny Lazutkin on Mon, Feb 24, 2014 at 05:08:43PM EST:

(snip)

> So, I did the following:
> # Transfer to GPU
> a_gpu = pycuda.gpuarray.to_gpu(A)
> b_gpu = pycuda.gpuarray.to_gpu(B)
> #pointer
> p1 = pycuda.gpuarray.GPUArray(a_gpu, shape(A)).ptr()
> 
> and ot raises the error - in gpuarray.py in __init__
> dtype = np.dtype(dtype)
> TypeError: data type not understood

pycuda.gpuarray.to_gpu() creates a GPUArray instance; not sure why you are
passing it to the GPUArray constructor. Also, note that since ptr is a property,
it shouldn't be invoked as a method.

There are examples of how to use pycuda with wrapped library functions in
scikits.cuda in the docstrings of some of the wrapper functions (e.g., see
scikits/cuda/cublas.py).
-- 
Lev Givon
Bionet Group
http://www.columbia.edu/~lev/
http://lebedov.github.io/


_______________________________________________
PyCUDA mailing list
[email protected]
http://lists.tiker.net/listinfo/pycuda

Reply via email to