:orphan:

.. meta::
    :description: Programming guide
    :keywords: HIP, programming guide, heterogeneous programming, AMD GPU programming

.. _hip-programming-guide:

********************************************************************************
Programming guide
********************************************************************************

ROCm provides a robust environment for heterogeneous programs running on CPUs
and AMD GPUs. ROCm supports various programming languages and frameworks to
help developers access the power of AMD GPUs. The natively supported programming
languages are HIP (Heterogeneous-Compute Interface for Portability) and
OpenCL, but HIP bindings are available for Python and Fortran.

HIP is an API based on C++ that provides a runtime and kernel language for GPU
programming and is the essential ROCm programming language. HIP is also designed
to be a marshalling language, allowing code written for NVIDIA CUDA to be
easily ported to run on AMD GPUs. Developers can use HIP to write kernels that
execute on AMD GPUs while maintaining compatibility with CUDA-based systems.

OpenCL (Open Computing Language) is an open standard for cross-platform,
parallel programming of diverse processors. ROCm supports OpenCL for developers
who want to use standard frameworks across different hardware platforms,
including CPUs, GPUs, and APUs. For more information, see
`OpenCL <https://www.khronos.org/opencl/>`_.

Python bindings can be found at https://github.com/ROCm/hip-python.
Python is popular in AI and machine learning applications due to available
frameworks like TensorFlow and PyTorch.

Fortran bindings can be found at https://github.com/ROCm/hipfort.
It enables scientific, academic, and legacy applications, particularly those in
high-performance computing, to run on AMD GPUs via HIP.

For a complete description of the HIP programming language, see the :doc:`HIP programming guide<hip:index>`.
