GPGPUs

Ben Cumming bcumming at cscs.ch
Thu Jan 23 11:34:04 PST 2014


On Thursday, 23 January 2014 at 11:50:19 UTC, Paulo Pinto wrote:
>
> Why not just generate SPIR, HSAIL or PTX code instead ?
>
> --
> Paulo

We advertised an internship at my work to look at using D for 
GPUs in HPC (I work at the Swiss National Supercomputing Centre, 
which recently acquired are rather large GPU-based system). We do 
a lot of C++ meta-programming to generate portable code that 
works on both CPU and GPUs. D looks like it could make this much 
less of a pain (because C++ meta programming gets very tired 
after a short while). From what I can see, it should be possible 
to use CTFE and string mixins to generate full OpenCL kernels 
from straight D code.

One of the main issues we also have with C++ is that our users 
are intimidated by it, and exposure to the nasty side effects 
libraries written with meta programming do little to convince 
them (like the error messages, and the propensity for even the 
best-designed C++ library to leak excessive amounts of boiler 
plate and templates into user code). Unfortunately this is a 
field where Fortran is still the dominant language.

The LLVM backend supports PTX generation, and Clang has full 
support for OpenGL. With those tools and some tinkering with the 
compiler, it might be possible to do some really neat things in 
D. And increase programmer productivity at the same time. Fortran 
sets the bar pretty low there!

If anybody knows undergrad or masters students in Europe who 
would be interested in a fully paid internship to work with D on 
big computers, get them in touch with us!



More information about the Digitalmars-d mailing list