News for hackers. Stuff that matters.
Re:NumbaPro CUDA Python speeds up a Monte Carlo pricer 14x by apaprocki on Thursday April 11, 2013 @11:37AM (#5532637)
We've been using CUDA to speed up Monte Carlo pricing for years now. :) Writing in Python does make it more accessible to more programmers. I'm curious how much overhead is added.

http://www.wallstreetandtech.com/it-infrastructure/bloomberg...

Re:NumbaPro CUDA Python speeds up a Monte Carlo pricer 14x by rck on Thursday April 11, 2013 @12:19PM (#5532892)
It would be more interesting to see a visualization of throughput vs. problem size. That would almost certainly give a better sense of how good this approach is, and it would let us compare to other CUDA monte carlo implementations, like the one Nvidia has had on their CUDA site for years:

http://developer.download.nvidia.com/compute/cuda/2_2/sdk/we...

Re:NumbaPro CUDA Python speeds up a Monte Carlo pricer 14x by pavanky on Thursday April 11, 2013 @11:43AM (#5532673)
This particular problem is so embarrassingly parallel, I am surprised the speedup is only 14x.
Re:NumbaPro CUDA Python speeds up a Monte Carlo pricer 14x by art187 on Thursday April 11, 2013 @01:06PM (#5533260)
If you look at the hardware specs that's what you expect. People claiming more are not usually measuring the whole problem

http://www.hpcwire.com/hpcwire/2011-12-13/ten_ways_to_fool_t...

Re:NumbaPro CUDA Python speeds up a Monte Carlo pricer 14x by tdees40 on Thursday April 11, 2013 @11:55AM (#5532737)
Second that one. On these sort of problems it's not uncommon to see 100x+ speedups. My general experience is that just re-writing this in C++ instead of Numpy you'd see a >14x speedup, so I'm pretty unimpressed at this point.
Re:NumbaPro CUDA Python speeds up a Monte Carlo pricer 14x by sklam on Thursday April 11, 2013 @01:13PM (#5533308)
If you look at the profiler screenshot at the bottom of the page, the time spent in the cuRAND kernel (cyan) is ~2x longer than in the numbapro kernel (purple). Even if the numbapro kernel is written in CUDA-C and suppose it will be a lot faster, you still won't hit 100x speedup. In addition, all kernels are double-precision, the 100x speedup is more common for single-precision kernels.
Re:NumbaPro CUDA Python speeds up a Monte Carlo pricer 14x by jofer on Thursday April 11, 2013 @12:44PM (#5533083)
I'm be surprised if there was that large of a speedup going from a well-written numpy implementation to C/C++ (assuming a non-parallel implementation in both)...

In my experience, it's usually more like 2x-5x for a straight translation of the algorithm from numpy to C. (Though I have to confess that I often write rather naive C...)

Numpy performs quite well if you avoid a few common pitfalls. It certainly can be beat, but it's often faster than people think it is.

Re:NumbaPro CUDA Python speeds up a Monte Carlo pricer 14x by dagw on Friday April 12, 2013 @06:55AM (#5537737)
That matches my experience as well. I've never gotten more than a 3x speed up by doing a straight numpy->C rewrite on actual real world code (actually doing one right now, and I've gotten a 2x speed up after my first pass).
Re:NumbaPro CUDA Python speeds up a Monte Carlo pricer 14x by kisielk on Thursday April 11, 2013 @12:56PM (#5533179)
NumbaPro generates CUDA code that runs on the GPU. I don't see how using C++ to do it would necessarily make it faster as the code executing on the CPU end of things is not the bottleneck.
Re:NumbaPro CUDA Python speeds up a Monte Carlo pricer 14x by hendzen on Thursday April 11, 2013 @04:01PM (#5534408)
From my experience with CUDA/OpenCL, its easy to get a working algorithm that provides some speedup, but getting it to fully utilize the GPU takes some manual optimization.

Things like optimizing memory accesses to prevent bank conflicts, using per thread-group shared memory effectively to reduce global memory accesses are a bit tricky to get right, and I'm not sure how well auto-generated code would be able to do this.

Re:NumbaPro CUDA Python speeds up a Monte Carlo pricer 14x by viraptor on Thursday April 11, 2013 @12:01PM (#5532767)
I wonder if there's any good way to select random indexes from a bitmap using CUDA. If yes, this could be very nice for monte-carlo poker hand scoring.
Re:NumbaPro CUDA Python speeds up a Monte Carlo pricer 14x by CountHackulus on Thursday April 11, 2013 @12:33PM (#5533005)
That's something the demoscene loves to do. There's a few ways to do it, but what's usually done is to have a large bitmap filled with random values that's accessed by a function of threadID and current pixel (or whatever other info you have handy). Essentially, the large bitmap acts as a precalculated PRNG.
Re:NumbaPro CUDA Python speeds up a Monte Carlo pricer 14x by incision on Thursday April 11, 2013 @01:36PM (#5533447)
>There's a few ways to do it, but what's usually done is to have a large bitmap filled with random values that's accessed by a function of threadID and current pixel (or whatever other info you have handy).

Do you have any good links that elaborate on this kind of technique? I had an idea that sounds a lot like this once, but being fairly ignorant about the topic I had no idea what to call it or how to implement it.

Thanks.

Re:NumbaPro CUDA Python speeds up a Monte Carlo pricer 14x by CountHackulus on Friday April 12, 2013 @11:55AM (#5539202)
This is probably the simplest article about the subject: http://www.reedbeta.com/blog/2013/01/12/quick-and-easy-gpu-r...
Re:NumbaPro CUDA Python speeds up a Monte Carlo pricer 14x by dbecker on Thursday April 11, 2013 @06:18PM (#5535149)
Anyone outside of Continuum who can share their experiences with Numba and/or NumbaPro?