ldc nvvm GPU intrinsics good news

kinke noone at nowhere.com
Fri Mar 5 00:16:41 UTC 2021


On Friday, 5 March 2021 at 00:03:26 UTC, Bruce Carneal wrote:
> After updating the first line to 
> '@compute(CompileFor.hostAndDevice) module ...' and adding an 
> 'import ldc.dcompute;' line, the 
> runtime/import/ldc/gccbuiltins_nvvm.di file from a current LDC 
> build apparently gives access to all manner of GPU intrinsics.

Sorry, I assumed you had already seen it (plus 
ldc/gccbuiltins_amdgcn.di); they've been introduced with LDC 
v1.22. These files are auto-generated from the LLVM .td file 
using a tiny program [1]. It's currently limited to intrinsics 
with a GCCBuiltinName, so if you'd like to make more of these 
available in D, see processRecord().

[1] 
https://github.com/ldc-developers/ldc/blob/master/utils/gen_gccbuiltins.cpp


More information about the digitalmars-d-ldc mailing list