Andreas, I started doing timing experiments; I have tried to searching documents on what to actually try to code in pycuda but haven't been lucky. In the email below you see that I focused on implementing a gpuarray average like so:
gpuaverage=lambda v: gpuarray.sum(v)/float(len(v)) However, the timing when compared to numpy.average(v) is not that good. The former needs one to copy data from CPU to GPU, perform computation on GPU, then transfer data from GPU to CPU. I provided sample code for context no for feedback on what to actually code. Most PDF documents I have found on pycuda have the typical "hello, world!" example, i.e., doubling array elements, etc. Can I run matplotlib functions in pycuda? That's the sort of coding samples I haven't found online. Efren A. Serra (Contractor) DeVine Consulting, Inc. Naval Research Laboratory Marine Meteorology Division 7 Grace Hopper Ave., STOP 2 Monterey, CA 93943 Code 7542 Office: 831-656-4650 -----Original Message----- From: Andreas Kloeckner [mailto:[email protected]] Sent: Tuesday, March 27, 2012 1:24 PM To: Serra, Mr. Efren, Contractor, Code 7542; [email protected] Subject: Re: [PyCUDA] Now what?! I have pycuda installed and working but... Hi Efren, On Tue, 27 Mar 2012 10:23:12 -0700, "Serra, Mr. Efren, Contractor, Code 7542" <[email protected]> wrote: > Trying to figure out where to boost performance for my apps. For > instance, where should one use PyCUDA, attached is a program I'm > trying to optimize or improve runtime. I, naively, started optimizing > numpy.stdev and numpy.average. Is that what I should focus on? > Thanks for your time. I'm glad to hear PyCUDA is working for you now. That said, it's a bit much to expect someone on this list to go through your code and tell you how to best use PyCUDA. It's up to you to measure where your code is spending time, and to know enough about GPUs to see if they can be of help for your workload. Sorry, and best of luck, Andreas _______________________________________________ PyCUDA mailing list [email protected] http://lists.tiker.net/listinfo/pycuda
