ldc nvvm GPU intrinsics good news
Bruce Carneal
bcarneal at gmail.com
Fri Mar 5 01:59:35 UTC 2021
On Friday, 5 March 2021 at 00:48:26 UTC, kinke wrote:
> On Friday, 5 March 2021 at 00:32:03 UTC, Bruce Carneal wrote:
>> 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?
>
> AFAICT, the only challenge is to find a suited signature in D
> for the LLVM intrinsic, incl. some unique name if there's no
> gcc builtin name - as a GitHub PR for that tool, so that all
> future .di files contain these extra intrinsics. To get there,
> I'd suggest adding some temp logging to inspect the records
> from the parsed .td file.
To be clear, I'm not asking for how a new builtin might be added
cleanly, I'm asking if there is a better way to access all the
builtins present in the current .di file.
As noted above, I had to copy and edit the .di file to avoid this
error from ldc:
...: Error: can only call functions from other @compute modules
in @compute code
Once I did that, everything I have tried from the edited .di file
appears to work as intended. Amazing! I just thought that
copying/editing could be avoided.
More information about the digitalmars-d-ldc
mailing list