digitalmars.D - GPGPU work and Identifiers
- Nicholas Wilson (18/18) Jun 19 2016 This thread is partly to announce that i will be adding to LDC
- Jakob Bornecrantz (7/13) Jun 19 2016 What is your current status?
- Nicholas Wilson (6/19) Jun 19 2016 Just starting. But I know what i need to do ( in terms of
- Jakob Bornecrantz (7/26) Jun 19 2016 That will be annoying, the LDC that works with SPIR-V wont be
- David Nadlinger (12/15) Jun 19 2016 One possible solution for this would be a thin driver executable
- David Nadlinger (4/10) Jun 19 2016 (This is not likely to be worth the trouble on Windows, where –
This thread is partly to announce that i will be adding to LDC the ability to generate code for GPUs through OpenCL, CUDA (and if i have time) Metal in my fork at https://github.com/thewilsonator/ldc and partly to request the reservation of the relevant Version identifiers. (Do I do this by a pull request?) IIUC the version identifiers are based of the C #define's. The OpenCL #define's are CL_VERSION_X_Y and __OPENCL_VERSION__ = XY0 (e.g. 220 for 2.2) The cuda #define's are __CUDA__ and __CUDA_ARCH__ (similar to above but indicates the compute capability as opposed to the version) BUT That is sorta equivalent to the OS identifier. the arch identifier SPIR(V) and NVPTX and their 64bit counterparts are more indicative and useful to me earlier on (address space mapping and whatnot). So my question is what identifiers should i go with?
Jun 19 2016
On Sunday, 19 June 2016 at 11:12:50 UTC, Nicholas Wilson wrote:This thread is partly to announce that i will be adding to LDC the ability to generate code for GPUs through OpenCL, CUDA (and if i have time) Metal in my fork at https://github.com/thewilsonator/ldc and partly to request the reservation of the relevant Version identifiers. (Do I do this by a pull request?)What is your current status? Is that SPIR-V or SPIR? I tought that LLVM did not have a SPIR-V backend mainlined. Or are you using a out of tree one from Khronos? Do you have any examples? Cheers, Jakob.
Jun 19 2016
On Sunday, 19 June 2016 at 12:38:00 UTC, Jakob Bornecrantz wrote:On Sunday, 19 June 2016 at 11:12:50 UTC, Nicholas Wilson wrote:Just starting. But I know what i need to do ( in terms of metadata)This thread is partly to announce that i will be adding to LDC the ability to generate code for GPUs through OpenCL, CUDA (and if i have time) Metal in my fork at https://github.com/thewilsonator/ldc and partly to request the reservation of the relevant Version identifiers. (Do I do this by a pull request?)What is your current status?Is that SPIR-V or SPIR?SPRI-VI tought that LLVM did not have a SPIR-V backend mainlined. Or are you using a out of tree one from Khronos?YesDo you have any examples?Not yet.Cheers, Jakob.
Jun 19 2016
On Sunday, 19 June 2016 at 14:04:15 UTC, Nicholas Wilson wrote:On Sunday, 19 June 2016 at 12:38:00 UTC, Jakob Bornecrantz wrote:Ah okay.On Sunday, 19 June 2016 at 11:12:50 UTC, Nicholas Wilson wrote:Just starting. But I know what i need to do ( in terms of metadata)This thread is partly to announce that i will be adding to LDC the ability to generate code for GPUs through OpenCL, CUDA (and if i have time) Metal in my fork at https://github.com/thewilsonator/ldc and partly to request the reservation of the relevant Version identifiers. (Do I do this by a pull request?)What is your current status?That will be annoying, the LDC that works with SPIR-V wont be able to produce MSVC compatible exes. Lets hope they mainline it soon. Thanks for the reply. Cheers, Jakob.Is that SPIR-V or SPIR?SPRI-VI tought that LLVM did not have a SPIR-V backend mainlined. Or are you using a out of tree one from Khronos?Yes
Jun 19 2016
On Sunday, 19 June 2016 at 18:23:06 UTC, Jakob Bornecrantz wrote:That will be annoying, the LDC that works with SPIR-V wont be able to produce MSVC compatible exes. Lets hope they mainline it soon.One possible solution for this would be a thin driver executable that parses just enough of the command line to detect the target triple used, and then forwards to the correct "real" compiler executable. Such a separate driver could then also be used as part of the regular distribution to improve the performance on memory-constrained all-at-once builds, by freeing all the frontend/LLVM memory (i.e., terminating the process) before invoking the linker, which can take a substantial amount of memory for huge binaries too. — David
Jun 19 2016
On Sunday, 19 June 2016 at 20:20:38 UTC, David Nadlinger wrote:Such a separate driver could then also be used as part of the regular distribution to improve the performance on memory-constrained all-at-once builds, by freeing all the frontend/LLVM memory (i.e., terminating the process) before invoking the linker, which can take a substantial amount of memory for huge binaries too.(This is not likely to be worth the trouble on Windows, where – partly depending on the user's configuration – process creation can take ages. — David)
Jun 19 2016