ROCm/hip

HIP: C++ Heterogeneous-Compute Interface for Portability

View on GitHub ↗Jump to charts ↓

Summary Information

Updated 19 minutes ago
Added to GitGenius on August 31st, 2025
Created on January 7th, 2016
Open Issues & Pull Requests: 45 (+0)
Number of forks: 592
Total Stargazers: 4,389 (+0)
Total Subscribers: 134 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 353.3 days
Mean response time: 648.4 days
90th percentile: 1818.3 days
Tracked items: 359

How this project is maintained

Around half of the issues opened in the past year never receive a reply. Work labelled "status: triage" is answered fastest, typically in about 13 hours, while "hip" waits about 56 months. Only 5% of issues opened in the past year have been closed. Three people close 54% of everything that gets resolved.

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 14
New in 7 days: 1
Closed in 7 days: 0
Avg open age: 29 days
Stale 30+ days: 9
Stale 90+ days: 4

Recent activity

Opened in 7 days: 1
Closed in 7 days: 0
Comments in 7 days: 0
Events in 7 days: 0

Top labels

  • Under Investigation (103)
  • hip (30)
  • documentation (25)
  • type:bug (15)
  • type:question (15)
  • status: triage (13)
  • type:feature (10)
  • clang (8)

Most active issues this week

Detailed Description

HIP (Heterogeneous-compute Interface for Portability) is a C++ header file and library designed by AMD to provide a portable programming interface for heterogeneous computing systems, specifically targeting both AMD and NVIDIA GPUs. It aims to minimize code changes required when migrating applications between AMD’s ROCm platform and NVIDIA’s CUDA platform. Essentially, HIP allows developers to write code once and, with minimal modifications, run it on either AMD or NVIDIA GPUs, fostering broader hardware compatibility and reducing vendor lock-in.

The core philosophy of HIP revolves around a source-to-source translation tool, `hipcc`, which converts HIP code into equivalent CUDA code. This means developers primarily write in HIP C++, a language very similar to CUDA C++, leveraging familiar programming constructs. `hipcc` then handles the complexities of translating these constructs into the specific instructions required by the target GPU architecture. This approach differs from runtime dispatching or abstraction layers, as it focuses on static compilation and optimization for the target hardware. The repository contains the HIP runtime, compiler infrastructure, and a suite of examples demonstrating its usage.

The repository’s structure reflects its role as a compiler and runtime environment. Key components include the `hip` directory containing the core HIP headers and runtime library, `tools` which houses `hipcc` and other utility tools, `examples` providing practical demonstrations of HIP features, and `test` containing comprehensive tests to ensure functionality and correctness. The `include` directory contains the necessary header files for HIP programming, while the `lib` directory holds the compiled runtime libraries. The build system utilizes CMake, making it relatively straightforward to build HIP on various platforms.

HIP supports a wide range of CUDA C++ features, including kernels, shared memory, synchronization primitives (like barriers and atomics), and memory management. However, it’s not a 1:1 mapping. Some CUDA features may not have direct HIP equivalents, requiring developers to use alternative approaches or conditional compilation. The HIP documentation provides detailed guidance on these differences and recommended workarounds. A significant effort is dedicated to maintaining compatibility with newer CUDA versions, ensuring that HIP can leverage advancements in CUDA while remaining portable.

Beyond the core HIP language and compiler, the repository also includes support for various extensions and integrations. This includes support for ROCm’s features like HIP-level memory management and profiling tools. Furthermore, HIP is increasingly integrated with popular machine learning frameworks like TensorFlow and PyTorch, allowing developers to accelerate their models on AMD GPUs with minimal code changes. The project is actively maintained by AMD and the open-source community, with regular updates and improvements focused on performance, compatibility, and feature enhancements. The goal is to establish HIP as a standard for portable heterogeneous programming, enabling developers to unlock the full potential of diverse GPU architectures.