I'm benchmarking some software and am looking for cards that are better at parallel multiplication vs parallel addition.
Is there any prior work that may have this information?
What GPU features should I look for?
Quantitative Finance Stack Exchange is a question and answer site for finance professionals and academics. It only takes a minute to sign up.Sign up to join this community
That depends on your application, obviously. If you intend to run Matlab or Python on a single machine, and you're looking into which graphics card to buy, multiplication vs addition should not matter much.
I that situation I would recommend an Nvidia card which features CUDA. For CUDA, there are lot of libraries available which make it easy to adapt existing code to run on the GPU. Of course you can add more GPUs for more performance using SLI whatever your Card requires.
Mathworks has a nice overview that will help you getting started. For Python there is PyCUDA, but i have only very limited experience with that. For Java and C++ there are options as well, bu I've never used those.
The downside of all this is that your code will be less portable as you will need to use gpuArrays (in Matlab), so if someone without a CUDA-Configuration attempts to run the code, it will fail. I have yet to find an elegant way around this (!= my boss sitting at my desk...)
I've dabbled a little with this a bit. OpenCL devices should work fine - even if you use NVidia for it. I actually keep all three vendors in one machine for testing, with an NVidia, AMD, and Intel GPU. All of them are fine for basic parallel vector math for things like Quant. The difference is going to be the supported version of OpenCL.
NVidia makes some of the best devices but they don't care much for OpenCL obviously as they have CUDA, so they usually only support up to OpenCL v1.2.
AMD and Intel are good up to OpenCL v2.0+ and Intel will soon be releasing support for v3.0. Even your built-in Intel GPU can do that pretty well if you're just trying to learn.
That said for basic arithmetic at scale, any of them will generally be fine for integer and 16/32/64 bit float arithmetic. You can also use OpenCL to accelerate min/max operations over a data set. Just check out the classic SAXPY example kernels out there. I don't think you'll need anything newer than OpenCL v1.2 which runs on all of the most common GPUs. I often run the same code on all three to test compatibility.
Start with the SAXPY sample here: https://anteru.net/blog/2012/getting-started-with-opencl-part-2/
I write my own version here: https://medium.com/hashicorp-engineering/all-things-gpu-part-2-4ac1c30a20ed
Hope this helps someone down the line.