[Baypiggies] PyCuda - using video card hardware for parallel computation

Seth Friedman sfseth at gmail.com
Wed Jul 14 21:09:02 CEST 2010


Right, I didn't think the python was actually running on GPU.    So for the
case of a million element array where a minute of computation needs to be
independently performed on each element, it seems relatively straightforward
to send a CUDA swarm of worker bees at the problem.  What I'm thinking about
is where there are relationships between elements and/or computation -
essentially can the elements or worker bees have more logic such as control
flow or intercommunication.      I'll spend some more time on the pycuda
docs but what I think I'm wondering is essentially how rich is the language
- is it really just compiling down certain data structures and math, or is
there more of the expressive capability present in python.

On Wed, Jul 14, 2010 at 9:34 AM, Andy Wiggin <andywiggin at gmail.com> wrote:

> On Tue, Jul 13, 2010 at 6:14 PM, Seth Friedman <sfseth at gmail.com> wrote:
> > This is really neat.   I've got a CUDA-capable nvidia card I'm thinking I
> > want to write a python program to answer the following question:
> what/where
> > is the effect of the GIL when programming 240/480/720 1.3ghz cores?   It
> > seems like this question must have been conquered to some degree, at
> > least.   Is this simply a non issue because there isn't any python
> > "interpreting" happening in parallel, that it's translated in serial
> > (assuming single-threaded/single-process python doing the farming to the
> > GPUs) ..?
> >
> > seth
> >
>
> Seth,
> it doesn't look to me like any python code is actually executing on
> the GPU. The "kernels" of code running on the GPU appear to still be
> written in C (notice the C-format string literals when creating
> SourceModule objects in the examples; that's what runs on the GPU). So
> unfortunately I don't think you can do the experiment you're
> describing.
> Regards,
> Andy
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/baypiggies/attachments/20100714/e2d544cb/attachment.html>


More information about the Baypiggies mailing list