.Net 中的 GPGPU 编程 - Microsoft Accelerator VS OpenCL.net [VS 其他]
我正在开发一个程序(在.Net中),它有很多图像处理(如2D卷积,...),我想用GPGPU(并行处理)来完成它们 所以,我有一些选择:Microsoft Accelerator、OpenCL.Net... 哪一个更适合我?
有些事情对我来说很重要:速度、兼容性(例如,如果 GPU 不支持,会发生什么?)、易于学习、与 Nvidia 和 ATI 一起工作,...
我听说我可以在 OpenCL 中创建自己的函数,并且对许多数组单元运行它,但我不知道我是否可以在 Microsoft Accelerator 中执行此操作,或者我必须使用它的函数...
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...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Microsoft Accelerator 和OpenCL 支持CPU 和GPU,并且独立于供应商(即在ATI 和nVidia 卡上运行)。
如果使用 OpenCL,您必须将 OpenCL 单独安装到用户计算机(包含在 nVidia(支持 nvidia 的 GPU)和 ATI(支持 ati gpu 和任何 cpu)驱动程序中,可下载用于 Intel(支持 cpu)的驱动程序。但是,您可以保留AMD 的 OpenCL.dll 与您的软件捆绑在一起用作 CPU 后备 OpenCL 更发达(更多功能,更少错误):它出现得更早,是跨平台的。基于现有技术(CUDA、Brook+),OpenCL 允许您精细地控制您实际执行的操作,因此速度更快,但
据我了解,Microsoft Accelerator 可以在任何支持 DirectX 的 GPU 上运行。任何现代 GPU)和任何 64 位 CPU。它可以更顺利地集成到现有代码中(没有额外的文件和大量的库调用),但这对性能不利。简单),所以它可能是一个好的开始,但是如果它没有表现出很好的性能,你仍然应该尝试一下OpenCL,它可以做得更好。
因此,我建议您学习 OpenCL,因为:1)OpenCL 更接近 GPU 硬件架构,因此 a)它可以让您获得更好的性能,b)您可以编写更复杂的代码,c)您将了解这一切作品; 2)网上有更多的信息/教程/hacks; 3)它是跨平台的(在你的情况下可能不是一个很好的功能,但仍然是); 4) OpenCL 与 CUDA 非常相似,因此您可以同时学习两种与 GPU 相关的技术。
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.
一种选择是 C++ AMP,您可以轻松地与 .NET 进行互操作
http://www.danielmoth.com /Blog/NET-Access-To-The-GPU-For-Compute-Purposes.aspx
干杯
丹尼尔
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