# rocm/hip

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/rocm-hip).**

_How this analysis was created: the description and tags below were written by an AI model that read this project's README and public documentation pages; stars, license and language come straight from the GitHub API. The model does not read the source code._

4,425 stars · 591 forks · C++ · MIT

## Links

- GitHub: https://github.com/ROCm/hip
- Homepage: https://rocmdocs.amd.com/projects/HIP/
- awesome-repositories: https://awesome-repositories.com/repository/rocm-hip.md

## Topics

`cuda` `hip` `hip-kernel-language` `hip-portability` `hip-runtime` `hipify`

## Description

HIP is a C++ runtime API and kernel language for writing parallel GPU code that runs on AMD GPUs and can also target NVIDIA GPUs. It is part of the AMD ROCm GPU compute platform and lets host code and GPU kernels live together in ordinary C++ source files, which a Clang-based compiler splits into CPU and GPU portions at build time. Kernels are launched with an inline grid-and-block syntax, and the runtime covers launching kernels, managing device memory and coordinating work between CPU and GPU.

What sets HIP apart is its close mirroring of the CUDA runtime API. Existing CUDA applications can be moved to AMD hardware largely through mechanical renaming, without a full rewrite. The same codebase can build for either AMD or NVIDIA hardware, with runtime calls forwarded through a thin dispatch layer to the native AMD runtime or an NVIDIA backend.

The programming model organizes work into a hierarchy of thread blocks within a grid, with per-block shared memory and barriers for cooperative computation. Kernel launches and memory copies are queued onto ordered streams that run independently of the CPU, and events are used to synchronize them. Many device functions and intrinsics are supplied as inline headers that the compiler expands directly into GPU instructions. Typical uses include heterogeneous CPU-GPU applications and compute-heavy scientific workloads.

## Tags

### Programming Languages & Runtimes

- [GPU Programming Runtimes](https://awesome-repositories.com/f/programming-languages-runtimes/gpu-programming-runtimes.md) — Provides a C++ runtime API and kernel language for portable parallel code that runs on AMD GPUs and can also target NVIDIA GPUs.
- [C Language Extensions](https://awesome-repositories.com/f/programming-languages-runtimes/c-language-extensions.md) — Adds a C++ language extension for writing data-parallel kernels that run across thousands of GPU threads alongside host code.
- [GPU Kernel Programming](https://awesome-repositories.com/f/programming-languages-runtimes/gpu-kernel-programming.md) — Lets developers write C++ kernels and call runtime functions to run parallel code on AMD GPUs alongside regular CPU code. ([source](https://github.com/rocm/hip#readme))
- [GPU Stream Execution](https://awesome-repositories.com/f/programming-languages-runtimes/gpu-stream-execution.md) — Queues kernel launches and memory copies onto ordered streams that run independently of the CPU, with events for synchronization.
- [GPU Kernel Launch Configurations](https://awesome-repositories.com/f/programming-languages-runtimes/kernel-launch-context-setups/gpu-kernel-launch-configurations.md) — Launches kernels with an inline triple-chevron expression that sets grid and block dimensions and is rewritten into runtime launch calls.
- [GPU-CPU Backend Dispatchers](https://awesome-repositories.com/f/programming-languages-runtimes/runtime-execution-environments/runtime-environments/runtimes/type-definition-systems/runtime-type-dispatching/universal-function-dispatchers/operator-dispatchers/gpu-cpu-backend-dispatchers.md) — Forwards runtime calls through a thin wrapper to either the native AMD runtime or an NVIDIA backend with almost no overhead.
- [Single-Source Host-Device Compilation](https://awesome-repositories.com/f/programming-languages-runtimes/single-source-host-device-compilation.md) — Lets host code and GPU kernels live in the same C++ files, with one compiler pass splitting CPU and GPU portions at build time.
- [Thread Block Hierarchies](https://awesome-repositories.com/f/programming-languages-runtimes/thread-and-block-index-queries/thread-block-hierarchies.md) — Organizes parallel work into grids of thread blocks with per-block shared memory and barriers for cooperative computation.

### Development Tools & Productivity

- [CUDA Source Converters](https://awesome-repositories.com/f/development-tools-productivity/ai-coding-assistants/cuda-code-assistants/cuda-source-converters.md) — Moves existing CUDA applications to AMD GPUs with minimal code changes through an interface that closely mirrors the CUDA model. ([source](https://github.com/rocm/hip#readme))

### Hardware & IoT

- [Cross-Vendor Compute Engines](https://awesome-repositories.com/f/hardware-iot/integration-performance/gpu-performance/gpu-computations/cross-vendor-compute-engines.md) — Lets one GPU codebase build and run on both AMD and NVIDIA hardware, avoiding single-vendor lock-in.

### Software Engineering & Architecture

- [API Surface Mirroring](https://awesome-repositories.com/f/software-engineering-architecture/api-surface-mirroring.md) — Exposes function and type signatures that closely match the CUDA runtime API so existing code maps over through mechanical renaming.
- [CUDA Compatibility Layers](https://awesome-repositories.com/f/software-engineering-architecture/openapi-specification-parsers/go-code-generators/cuda-and-hip-code-generators/cuda-compatibility-layers.md) — Provides an interface mirroring the CUDA model so CUDA applications can run on AMD hardware with minimal changes.

### Artificial Intelligence & ML

- [AMD Hardware Acceleration](https://awesome-repositories.com/f/artificial-intelligence-ml/amd-hardware-acceleration.md) — Belongs to the open ROCm stack for AMD hardware, providing the compiler, runtime and libraries needed for accelerated workloads.

### Operating Systems & Systems Programming

- [GPU Kernel Offloading](https://awesome-repositories.com/f/operating-systems-systems-programming/gpu-kernel-offloading.md) — Compiles marked C++ kernel functions into GPU machine code and embeds the binary in the host executable for loading at run time.

### Scientific & Mathematical Computing

- [Heterogeneous Computing Libraries](https://awesome-repositories.com/f/scientific-mathematical-computing/heterogeneous-computing-libraries.md) — Provides a runtime library for launching kernels, managing device memory and coordinating work between CPU and GPU.
