Very interesting reply, ty
Although there are certainly merits on the LLVM IR pathway (it would be nice and tidy!), which as you said would be adaptable for both opencl and cuda (the devil is in the details, mind you), you'd lose a few things I consider very important:
You mention writing a GC engine on the gpu side. I fail to see the point. When writing kernels, you care only about performance, which in most cases ends up being about memory access, therefore one always needs complete control over memory management.
Cudafy only supports a very small subset of the .net framework - only the basic c-like syntax of c# is preserved, and only the .net fw functions that map directly into gpu intrinsic functions are supported. Anything else should run on the cpu-side, since it won't be a part of an inner loop.
https://www.codeplex.com/site/users/view/NickKopp
Although there are certainly merits on the LLVM IR pathway (it would be nice and tidy!), which as you said would be adaptable for both opencl and cuda (the devil is in the details, mind you), you'd lose a few things I consider very important:
- The ability to look at the generated c, pre cuda/opencl compilation. This is great for troubleshooting and optimizing your algos
-
Being able to debug gpu-side the above c code using nvidia's nsight, directly from visual studio, placing breakpoints, inspecting threads and memory, etc. This is a fundamental tool for writing more complex kernels.
You mention writing a GC engine on the gpu side. I fail to see the point. When writing kernels, you care only about performance, which in most cases ends up being about memory access, therefore one always needs complete control over memory management.
Cudafy only supports a very small subset of the .net framework - only the basic c-like syntax of c# is preserved, and only the .net fw functions that map directly into gpu intrinsic functions are supported. Anything else should run on the cpu-side, since it won't be a part of an inner loop.
Anyhow, do you know how to contact the people behind Cudafy?Message Nick, he usually posts on this forum.
https://www.codeplex.com/site/users/view/NickKopp