Does Alea GPU support dynamic parallelism?

房东的猫 提交于 2020-01-15 11:11:42

问题


I need to call cuBLAS functions and some of my kernel functions from a kernel.

How to do so in Alea GPU?

In the case Alea GPU doesn't support that, is there any alternative on C# with such feature.


回答1:


AleaGpu supports dynamic parallelism.

You can do it this way:

Gpu.Default.Launch(() =>
{

    // Note you are calling a kernel inside a kernel.
    var lp = new LaunchParam(1, 1024);
    DeviceRuntime.Launch(YourKernel, lp)

}, new LaunchParam(1, 1));

Use the latest AleaGpu release: https://www.nuget.org/packages/Alea/3.0.4-beta3

What you cannot do, (unfortunately), is call Cublas inside a kernel. For Cublas I urge you to use the latest version which in now a separate nuget package: https://www.nuget.org/packages/Alea.CudaToolkit/



来源:https://stackoverflow.com/questions/46149801/does-alea-gpu-support-dynamic-parallelism

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!