4 ms·
Right now, not a lot of C# code can actually be compiled to run on the GPU. It's using a custom JIT compiler that I made, I've only spent about two days working
by khyperia 13y ago
Right now, not a lot of C# code can actually be compiled to run on the GPU. It's using a custom JIT compiler that I made, I've only spent about two days working on it so far, so naturally it's nowhere near feature-complete.
Examples of things that it doesn't support are exceptions, dynamic allocation of memory, the like. Essentially, you are writing CUDA kernel code, but in C# instead. Whatever CUDA C can't do, you can't do (even if normal C# can) - for example, exceptions aren't in CUDA C, so "throw" (and try/catch) won't ever be supported.
Actually on topic to your point, it's being compiled through LLVM, which is a very awesome compiler backend that does a bunch of optimizations on code.