ldc nvvm GPU intrinsics good news
Bruce Carneal
bcarneal at gmail.com
Fri Mar 5 00:32:03 UTC 2021
On Friday, 5 March 2021 at 00:16:41 UTC, kinke wrote:
> 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
So what is the right/clean way to get @compute access to these
builtins? Should practitioners do a manual copy edit or is there
a better way?
More information about the digitalmars-d-ldc
mailing list