Use C # for GPU Programming
We have been using the nvidia cuda platform to write General programs to take advantage of nvidia gpu's computing performance. Although CUDA supports different programming languages, writing high-performance Code usually requires C or C ++. Many developers have to give up using their preferred programming language to write GPU-oriented code. Until recently, C # developers have finally been able to get rid of this dilemma.
Hybridizer, a new compilation tool launched by Altimesh, solves this problem by providing a new compilation method for C # developers. It compiles the developer's source code into a GPU-oriented binary code that can run on the CUDA platform. Hybridizer is divided into two versions to meet different needs and budgets. Hybridizer Essentials is an extension of Visual Studio and is free to all users. It can generate binary code running on the CUDA platform. Hybridizer Software Suite (HSE) is an authorized Software that provides compilation functions for CUDA and other platforms (including AVX, AVX2, and AX512. The software suite can generate binary code, but you can also choose to generate CUDA source code so that users can review the content being compiled.
With NVIDIA's Nsight Visual Studio Edition, any Hybridizer version provides developers with a way to write and debug C # code in Visual Studio, And the generated code is executed on nvidia gpu. HSE runs in Microsoft Intermediate Language (MSIL), so it can be integrated with existing projects, even without the source code of these projects. This also provides indirect support for the. NET platform languages F # and VB. NET on the same platform.
Since one of the goals of Writing C/C ++ code for the CUDA platform is to maximize the performance, it is worth comparing the performance of the C # Code Compiled by Hybridizer. According to Altimesh, the binary code compiled by C # achieves 83% performance of the handwritten CUDA-oriented C ++ code. Based on the actual code, you can further optimize the C # code to achieve the same performance as C ++.
Hybridizer provides C # developers curious about CUDA and GPU programming with a way to explore these technologies without having to give up using their preferred technologies. The sample code can be obtained on GitHub, and Hybridizer essenessenextension can be obtained on Visual Studio Marketplace.
Using C # to Target GPUs