Hi all, My input data is a 3D grid and at each grid point there is a 3d vector, so I decided to use a 3D texture with number of channels set to 3. First of all, is it possible to do what I want with PyCuda?
Here's what I've done based on test_3d_texture in test/test_driver.py: shape=(w, h, d, 3) a = np.asarray(np.random.randn(*shape),dtype=np.float32,order='F') descr=drv.ArrayDescriptor3D() descr.width=w descr.height=h descr.depth=d descr.format=drv.dtype_to_array_format(a.dtype) *descr.num_channels=3* descr.flags = 0 *(what dos this mean BTW?)* ary=drv.Array(descr) copy=drv.Memcpy3D() copy=set_src_host(a) copy.set_dst_array(ary) copy.width_in_bytes=copy.src_pitch=a.strides[1] copy.src_height=copy.height=h copy.depth=d Then when I do copy(), I get Traceback (most recent call last): File "<stdin>", line 1, in <module> pycuda._driver.LogicError: cuMemcpy3D failed: invalid value Any help is greatly appreciated. Yifei
_______________________________________________ PyCUDA mailing list PyCUDA@tiker.net http://lists.tiker.net/listinfo/pycuda