How to build SPIR-V supported LDC?

kinke noone at nowhere.com
Mon Apr 23 18:44:11 UTC 2018


On Monday, 23 April 2018 at 16:03:13 UTC, Sobaya wrote:
> I'd like to try dcompute.(https://github.com/libmir/dcompute)
>
> This requires SPIR-V supported LLVM and LDC built with it.

Not 100% correct; dcompute works with 2 target backends, nvptx 
(CUDA) and SPIR-V (OpenCL). nvptx is an official LLVM target & 
included in the prebuilt LDC packages, so if you have an Nvidia 
card, you should be able to play around with dcompute out of the 
box.

AFAIK, Nicholas maintains an inofficial SPIR-V target, which 
would need to be integrated into the LLVM src tree: 
https://github.com/thewilsonator/llvm-target-spirv
You'd then need to build LLVM yourself incl. the SPIR-V target 
and then build LDC with that LLVM, see the Wiki for how-to.


More information about the digitalmars-d-ldc mailing list