4

I am developing a program (in .Net) that has a lot of image processing (like 2D Convolutions, ...) and I want to do them with GPGPU (parallel processing) So, I have some choices: Microsoft Accelerator, OpenCL.Net, ... Which one is better for me?

Some things important for me: Speed, Compatibility (e.g. if GPU does not support that, what happens?), Easy to learn, Work with both Nvidia and ATI , ...

And I heard that I can create my own function in OpenCL and run it for many array cells, but I don't know if I can do that in Microsoft Accelerator or I have to work with its functions...

Mahdi Ghiasi
  • 14,873
  • 19
  • 71
  • 119
  • Try [GPU.NET](http://www.tidepowerd.com/) – QrystaL Sep 13 '11 at 13:53
  • Also, it doesn't support AMD and VB.NET : [link](http://help.tidepowerd.com/kb/getting-started-with-gpunet/currently-supported-hardware-languages-and-their-restrictions) – Mahdi Ghiasi Sep 13 '11 at 14:47
  • You didn't say it had to be free... and the amd logo is on the page, i have no idea if it works on gpu cards (ATI) – Peter Sep 13 '11 at 15:46

2 Answers2

2

Microsoft Accelerator and OpenCL support both CPU and GPU, and are vendor-independent (i.e. runs on both ATI and nVidia cards).

In case of OpenCL, you would have to separately install OpenCL to user machines (included in nVidia (supports nvidia's gpus) and ATI (supports ati gpus and any cpus) drivers, downloadable for Intel (support cpus). However, you could just keep AMD's OpenCL.dll bundled with you software to use as CPU-fallback. OpenCL is more developed (more features, less bugs): it has appeared earlier, is cross-platofrm and based on existing technologies (CUDA, Brook+). OpenCL allows you to finely control what you actually do, so it's faster, but a little more difficult.

Microsoft Accelerator, as I got it, runs on any GPU with DirectX support (== any modern GPU) and any 64 bit CPU. It integrates more smoothly into existing code (no additional files and tons of library calls), but this is not good for performance. MS Accelerator would allow you to quicker implement your functions (it looks quite simple), so it might be good start. But if it doesn't show great performance, you should still give OpenCL a try, it could do better.

So, I would advice you to learn OpenCL, since: 1) OpenCL is closer to GPU hardware architecture, so a) it allows you to achieve better performance, b) you could write more sophisticated code, c) you would learn how it all works; 2) There are more information/tutorials/hacks on the Internet; 3) It's cross-platform (might not be great feature in your case, but still); 4) OpenCL is very similar to CUDA, so you would learn two GPU-related technologies at once.

aland
  • 4,829
  • 2
  • 24
  • 42
  • And a question, you mean, if I want to use GPU, users have to install their gpu drivers? or it included with windows, or I can include files with my application???? – Mahdi Ghiasi Sep 13 '11 at 20:29
  • I have tried OpenCLVBTest Sample project. after add reference to OpenCLNet.dll into project, it has an error at this line : platform = OpenCLNet.OpenCL.GetPlatform(0) ... GetPlatform length is zero, and I get a index was outside of bounds of array error... am I forgot something?? some dll? or another problem??? please help – Mahdi Ghiasi Sep 13 '11 at 20:39
  • @Mahdi: If you want to use GPU, users will have to install drivers. But you can carry a .dll with you to use for CPU-fallback. "GetPlatform length is zero..." -- you have no OpenCL installed. If you have nVidia GPU, that's weird; if you have AMD GPU (or no GPU at all), try installing [AMD APP SDK](http://developer.amd.com/sdks/AMDAPPSDK/Pages/default.aspx) – aland Sep 14 '11 at 04:56
1

One option is C++ AMP that you can easily interop to from .NET http://www.danielmoth.com/Blog/NET-Access-To-The-GPU-For-Compute-Purposes.aspx

Cheers

Daniel

Daniel Moth
  • 781
  • 4
  • 10