GPU-accelerated computation

Hi, Would there be any plan for integrating GPUs to aid computation? Earlier I explored the use of OpenCL code to run SGEMM, and I can easily get a factor of 3 or more (by having some fixed dimension matrices) speedup. Recently, I am working on digitial down-converstion, in which I have to 1. Create a cosine and sine wave, 2. Multiply them to the source wave to generate I and Q data. These are essentially 1D waves element-wise multiplication which are easy to code but computationally expensive. With a simple OpenCL implementation, considering wave with sizes around 200e6 to 1e9 points each execution, I am observing a speed up of 10 times when comparing CPU (i7-4790) to GPU (AMD HD 7950). As such, I think it is highly beneficial for users, as well as making Igor more attractive towards potential users. Imho, this will be an essential feature for the future.

I agree. I think we should be able to add some way to specify that Make should allocate wave data on a user specified boundary. Perhaps Igor9.

There is no question that GPUs can provide major performance gains.  The question is how you provide interface to this power.

Back in Igor 6 days I had a version of the Gizmo XOP that supported user defined shaders.  A factor of 10 speed increase was typical although at the time, the accuracy of the calculations was somewhat reduced.  I did not release the XOP because the complexity of writing shaders exceeded my own threshold of what I wanted to support.

Another very important aspect of this discussion is that when customers write their own shaders (or equivalent OpenCL code) in some form of a procedure, they will also be able to easily execute code that could crash Igor.  This is something that we usually want to avoid.

I think that for now, the XOP route is probably best.



WaveMetrics, Inc.


In reply to by Igor

Thanks for your input, glad that was part of the consideration.

I agree that any extended use of GPU can cause more negative effects to user experience than positive, especially if the users are not familiar with coding GPU.

However, there do are some simpler calculations like Vector/Matrix multiplication which probably can be done like the FastOp option. With OpenCL, they can be made to work with a huge range of device across platform. The function can request a very specific form of input that makes sure it won't lead to problem. At least for this, the GPU speed up is huge even with the cheaper ones, comparing to the fastest consumer level CPUs.

In reply to by Sandbo

You are right in that using the GPU for fixed tasks that do not require end-user programming is a good starting point.  We may have to survey our active customers to get a better idea of the range of hardware they are using. 

As you may know, many laptops do not have a standard GPU.  Also Apple announced that they are deprecating OpenGL so any development of code that would take advantage of the GPU will be restricted to a fraction of the Windows market.  In view of the strong dependence on hardware/drivers it might be better to implement this in an XOP as opposed to the Igor application which brings me back to suggesting that this may be a good project that could start with the XOP contributed by 741 (see