[PyCUDA] Re: Question about PyCUDA

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[PyCUDA] Re: Question about PyCUDA

Andreas Kloeckner
"thierry.moudiki" <[hidden email]> writes:

> Hi Andreas,
>
> I'm interested in using your package PyCUDA, and I have one question about it (just to make sure that I understand how it works). In the example presented here: https://documen.tician.de/pycuda/index.html, when you call the sourced function `multiply_them`:
>
> - The option `block` has 3 elements in case it's a 1D, 2D or 3D block,
> and each tuple element is the number of threads per block. E.g: if I
> use threadIdx.x and threadIdx.y with blocks of 400 threads each, will
> I have `block = (400, 400, 1)`?

Yup.

> - For the option `grid`, I'm not sure. Is it: we can have 1D or 2D
> grids? What about this tuple's elements? Tuple element == Number of
> blocks per grid?

Yup.

In the future, please address requests like this to the mailing
list. I've cc'd them for archival.

Andreas

_______________________________________________
PyCUDA mailing list -- [hidden email]
To unsubscribe send an email to [hidden email]

signature.asc (847 bytes) Download Attachment