0
$\begingroup$

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?

$\endgroup$
4
  • 1
    $\begingroup$ These kind of "what infrastructure should I use" are heavily dependent on your application. $\endgroup$ – chrisaycock Dec 13 '12 at 14:15
  • $\begingroup$ What does "better at parallel multiplication vs parallel addition" mean? Do you want a card that multiplies faster than adds? $\endgroup$ – Alexey Kalmykov Dec 13 '12 at 21:31
  • $\begingroup$ @AlexeyKalmykov I've heard reports of some cards that are only parallel for addition, but block all streams when multiplying... throttling throughput $\endgroup$ – halfbit Dec 13 '12 at 21:35
  • $\begingroup$ @makerofthings7 I don't know where you heard the addition/multiplication thing from, but it isn't true. Anyway, the Nvidia Tesla cards are quite fast and are well-supported, so that's what I'd go with unless I had a very specific reason to do otherwise. $\endgroup$ – Jack P. Dec 14 '12 at 19:51
1
$\begingroup$

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...)

$\endgroup$
1
$\begingroup$

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.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.