D meets GPU: recommendations?

Bruce Carneal bcarneal at gmail.com
Sat Jan 30 05:17:30 UTC 2021


On Friday, 29 January 2021 at 20:01:17 UTC, Bruce Carneal wrote:
> On Friday, 29 January 2021 at 17:46:05 UTC, Guillaume Piolat 
> wrote:
>> On Friday, 29 January 2021 at 16:34:25 UTC, Bruce Carneal 
>> wrote:
>>> The project I've been working on for the last few months has 
>>> a compute backend that is currently written MT+SIMD.  I would 
>>> like to bring up a GPU variant.
>>
>> What you could do is ressurect DerelictCL, port it to BindBC, 
>> and write vanilla OpenCL 1.2 + OpenCL C.
>> Not up to date on both, but CUDA is messier than OpenCL.
>>
>> I don't really know about the other possibilities, like OpenGL 
>> + compute shaders or Vulkan + compute shaders.
>
[...]
> I've not looked in to OpenGL compute shaders seriously either 
> but I did look at Vulkan compute shaders.  They looked very 
> strong with respect to future deployability but were weak in 
> other ways so I kept them off the list.  I don't think I can 
> warp my code to fit in to glsl or similar, at least not easily. 
> Custom neighborhood indexing, group/sub-group scheduling 
> control and ability to manage group local memory efficiently 
> were the main concerns, IIRC.

I took another look at Vulkan compute shaders.  They have come a 
long way.  Not nearly as nice as programming in D but good enough 
that I'll sketch out a few kernels if I can't make headway with 
dcompute.

Anybody with recent dcompute experience, please speak up.  The 
code in the repository is pretty nice but it looks unfinished or 
at least frozen in time.



More information about the Digitalmars-d-learn mailing list