Using HIP runtime API#
The HIP runtime API provides C and C++ functionalities to manage event, stream, and memory on GPUs. On the AMD platform, the HIP runtime uses Compute Language Runtime (CLR), while on NVIDIA CUDA platform, it is only a thin layer over the CUDA runtime or Driver API.
CLR contains source code for AMD’s compute language runtimes:
HIP
andOpenCL™
. CLR includes theHIP
implementation on the AMD platform: hipamd and the ROCm Compute Language Runtime (rocclr
).rocclr
is a virtual device interface that enables the HIP runtime to interact with different backends such as ROCr on Linux or PAL on Windows. CLR also includes the OpenCL runtime implementation.The CUDA runtime is built on top of the CUDA driver API, which is a C API with lower-level access to NVIDIA GPUs. For details about the CUDA driver and runtime API with reference to HIP, see CUDA driver API porting guide.
The backends of HIP runtime API under AMD and NVIDIA platform are summarized in the following figure:
Note
On NVIDIA platform HIP runtime API calls CUDA runtime or CUDA driver via hipother interface. For more information, see the hipother repository.
Here are the various HIP Runtime API high level functions: