HIP Python#
2026-06-02
1 min read
Advanced Micro Devices, Inc.
Welcome to the documentation pages for HIP Python!
HIP Python provides low-level Cython and Python® bindings for the HIP runtime, HIPRTC, multiple math libraries and the communication library RCCL, and further a CUDA® Python Interoperability layer that aims to simplify the porting of CUDA Python and Cython programs.
Note
This documentation was generated on 2026-09-24T21:13:15+00:00 from
ROCm™ version 10.0.0 headers by
interfacegen 0.5 from hip-python
0.1.2 (183b6a80).
Source trees always consulted during codegen:
ROCm/rocm-systems:6b0e43f341195e203754e08f850e437ff2fc09f9— supplies the HIP, HIPRTC and AMD COMGR headers the bindings are generated from.ROCm/llvm-project:8f497e0992fb7513f7f78a6f6b6f1056c375e961— suppliesclangPython bindings compatible with ROCm Clang.
Optional source trees consulted during codegen:
ROCm/rocm-libraries:8d1ae90eff7d022f26019ec55b2ec6a7674b3112
Spotlight#
Learn how to use HIP Python’s interfaces in your Python or Cython program. We present a large number of examples that cover HIP and HIPRTC as well as multiple math libraries (HIPBLAS, HIPRAND, HIPFFT) and the communication library RCCL. Learn how to launch your own kernels and how the different libraries interact.
Learn how to JIT-compile, link, and inspect HIP kernels at
runtime — from the high-level hiprtc API
(compile, link, launch) down to the lower-level
rocm.comgr pipeline (HIP source –> LLVM bitcode
–> HSA assembly –> code object) — and how to work on the
IR itself with the LLVM-C bindings in
rocm.bindings.llvm.c: parse bitcode, build a module with
the IR builder, run pass pipelines, and query targets.
Learn how to write GPU kernels in Python with Numba HIP, the ROCm™ HIP backend for Numba. Covers vector addition, shared-memory reductions, matrix multiplication, ufuncs, CPU/GPU code reuse, and linking external HIP/CUDA C++ device functions via the Foreign Function Interface.
The full list of HIP Python Python variables, classes and functions. A few entry points:
The full list of the CUDA Python interoperability layer’s Python variables, classes and functions.
Note
Contributions are welcome. Most of this API is generated from the ROCm™ C headers, so a fix belongs in the code generator rather than in the emitted bindings. The contributing guide in the source repository explains where each kind of change belongs and how to validate it, and Building from Source covers building the wheels and these documentation pages yourself.