# \[RFC\] Proposal to add HG (T-Head General-compute) as a first-class language

**URL:** https://discourse.cmake.org/t/rfc-proposal-to-add-hg-t-head-general-compute-as-a-first-class-language/15733
**Category:** Development
**Created:** [June 29, 2026, 5:41am UTC](https://discourse.cmake.org/t/rfc-proposal-to-add-hg-t-head-general-compute-as-a-first-class-language/15733 "2026-06-29T05:41:27Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![jimmy.hj](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/j/77aa72/32.png) [@jimmy.hj](https://discourse.cmake.org/u/jimmy.hj)
#### Post date: [June 29, 2026, 5:41am UTC](https://discourse.cmake.org/t/rfc-proposal-to-add-hg-t-head-general-compute-as-a-first-class-language/15733/1 "2026-06-29T05:41:27Z")

</div>

Hi everyone,

I’d like to propose adding HG as a first-class language in CMake, similar to CUDA and HIP. Looking for feedback before submitting a formal MR.

I am from T-Head Semiconductor ( [https://www.t-head.cn](https://www.t-head.cn) ), a subsidiary of Alibaba Group. We developed an AI chip (PPU, ELF EM\_PPU=270) with a complete software stack including a dedicated compiler `hgcc`.

HG (T-Head General-compute) is the programming language for our PPU architecture:  
- Independent compiler driver: `hgcc`  
- Dedicated source file extension: `.hg` (single-source, host+device)  
- Own annotation system, with CUDA syntax compatibility  
- Architecture-specific flags: `-march=ppu_xxx`

We have already implemented CMake modules internally covering Makefile and Ninja generators on Linux, with compiler detection, compilation, linking, and architecture handling. Windows/VS support isn’t implemented yet. We are prepared to maintain the integration long-term if the community finds this acceptable, and are happy to adapt our implementation to CMake conventions.

Any feedback from maintainers would be greatly appreciated.

Thanks,  
Jimmy.HJ  
T-Head Semiconductor

---

<div class="post-metadata">

### Author: ![vito.gamberini](https://discourse.cmake.org/user_avatar/discourse.cmake.org/vito.gamberini/32/4376_2.png) [@vito.gamberini](https://discourse.cmake.org/u/vito.gamberini)
#### Post date: [June 29, 2026, 6:00pm UTC](https://discourse.cmake.org/t/rfc-proposal-to-add-hg-t-head-general-compute-as-a-first-class-language/15733/2 "2026-06-29T18:00:42Z")

</div>

Please [open an issue](https://gitlab.kitware.com/cmake/cmake/-/work_items) on the CMake GitLab describing the feature and usecase. If there are no objections to the feature, you can link back to it in an MR introducing the code.
