On Fri, 23 Dec 2011 15:24:12 -0500, Yifei Li <[email protected]> wrote:
> Hi folks,
> 
> I did the following to bind a gpuarray to a 3D texture with multiple
> channels:
> 
> a_gpu = gpuarray.to_gpu(np.random.randn(d, h, w, 4).astype(np.float32))
> a_gpu.bind_to_texref_ext(mytex, channels=4)
> 
> And I got all zeros when the values in texture were printed
> 
> However, if I change the 3D texture to a 1D texture with the same number of
> channels, the values in the 1D texture are correct.
> 
> Does bind_to_texref_ext only works with 1D textures?

bind_to_texref_ext assumes you're binding a 1D array. Binding flat
memory to a texture only works for 1D and 2D. 3D is not allowed by
CUDA. A convenience function for 2D has not been created yet.

HTH,
Andreas

Attachment: pgpHYHpGtGL5n.pgp
Description: PGP signature

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

Reply via email to