HCC Wants To Make It Easy To Run C11 Code On GPUs

Written by Michael Larabel in Programming on 19 April 2023 at 06:01 AM EDT. 3 Comments
The Hero C Compiler "HCC" wants to make it easy to compile C code to run on GPUs by compiling common C11 code and turning it into SPIR-V modules that can then be consumed by GPUs with Vulkan support.

HCC is self-described as:
HCC is a C compiler that allows you to compile your C codebase (with limitations) to SPIR-V for the Vulkan graphics API. This means you can share struct's, enum's and functions between your CPU & GPU code. HCC targets the future of GPU programming so is designed around features such as bindless resources and scalar alignment. This makes it easier to interop with the GPU and focus on writing shader code without writing your own shader build system.

The project is currently in alpha, so expect bugs and please help by filing bugs and contributing back to the codebase :)

HCC's lead developer Henry Rose wrote into Phoronix further commenting, "I have just released my first version of HCC, the main purpose of the project is to allow me to use the C11 language on the GPU as I really love using it on the CPU. It allows me to share code & data structures but I also have got rid of some of the legacy features that are in other shading languages."

HCC is supporting both Windows and Linux, aims to convert C11 code to Vulkan 1.3+ usage via SPIR-V, and to support as many of C's language features as possible.

HCC logo

Those wishing to learn more about the HCC compiler can find it hosted on GitHub.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week