From c7492604175a1145cf650146f4de22b3b8a25d63 Mon Sep 17 00:00:00 2001 From: Istvan Kiss Date: Thu, 11 Jul 2024 09:15:53 +0200 Subject: [PATCH] Programming_interface update --- docs/understand/programming_interface.rst | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/docs/understand/programming_interface.rst b/docs/understand/programming_interface.rst index 029675c6d5..c7370cce13 100644 --- a/docs/understand/programming_interface.rst +++ b/docs/understand/programming_interface.rst @@ -6,24 +6,23 @@ Programming interface ******************************************************************************* -The programming interface document will focus on the C/C++ HIP runtime API and the usage of this API. The runtime API provides C and C++ functions for event, stream, device and memory managements, etc. The HIP runtime on AMD platform uses the Common Language Runtimes (CLR), while on NVIDIA platform HIP runtime is only a thin layer over the CUDA runtime. +The programming interface document will focus on the HIP runtime API. The runtime API provides C and C++ functions for event, stream, device and memory managements, etc. The HIP runtime on AMD platform uses the Common Language Runtimes (CLR), while on NVIDIA platform HIP runtime is only a thin layer over the CUDA runtime. -- **CLR** - CLR contains source codes for AMD's compute languages runtimes: ``HIP`` and ``OpenCLâ„¢``. CLR includes the implementation of ``HIP`` language on the AMD platform `hipamd `_ and the Radeon Open Compute Common Language Runtime (rocclr), which is a virtual device interface, that HIP runtimes interact with different backends. (CLR also include the implementation of `OpenCL `_) -- **CUDA runtime** - CUDA runtime is built over the CUDA driver API (lower-level C API). For further information about the CUDA driver and runtime API, check the :doc:`hip:how-to/hip_porting_driver_api`. On non-AMD platform, HIP runtime determines, if CUDA is available and can be used. If available, HIP_PLATFORM is set to ``nvidia`` and underneath CUDA path is used. +- **CLR** contains source codes for AMD's compute languages runtimes: ``HIP`` and ``OpenCLâ„¢``. CLR includes the implementation of ``HIP`` language on the AMD platform `hipamd `_ and the Radeon Open Compute Common Language Runtime (rocclr), which is a virtual device interface, that HIP runtimes interact with different backends. (CLR also include the implementation of `OpenCL `_) +- **CUDA runtime** is built over the CUDA driver API (lower-level C API). For further information about the CUDA driver and runtime API, check the :doc:`hip:how-to/hip_porting_driver_api`. On non-AMD platform, HIP runtime determines, if CUDA is available and can be used. If available, HIP_PLATFORM is set to ``nvidia`` and underneath CUDA path is used. HIP compilers ============= -The HIP runtime API and HIP C++ extensions are available with HIP compilers. On AMD platform ROCm currently provides two compiler interfaces: ``hipcc`` and ``amdclang++``. The ``hipcc`` command-line interface aims to provide a more familiar user interface to users who are experienced in CUDA but relatively new to the ROCm/HIP development environment. On the other hand, ``amdclang++`` provides a user interface identical to the clang++ compiler. (For further details, check `llvm `_). On NVIDIA platform HIP invoke the locally installed ``NVCC`` compiler. +The HIP runtime API and HIP C++ extensions are available with HIP compilers. On AMD platform ROCm currently provides two compiler interfaces: ``hipcc`` and ``amdclang++``. The ``hipcc`` command-line interface aims to provide a more familiar user interface to users who are experienced in CUDA but relatively new to the ROCm/HIP development environment. On the other hand, ``amdclang++`` provides a user interface identical to the clang++ compiler. (For further details, check `llvm `_). On NVIDIA platform ``hipcc`` invoke the locally installed ``NVCC`` compiler. + +``NVCC`` and ``HIP-Clang`` target different architectures and use different code object formats: ``NVCC`` is ``cubin`` or ``ptx`` files, while the ``HIP-Clang`` path is the ``hsaco`` format. For compiler options, check the `GPU compiler option page `_. HIP compilation workflow ------------------------ - For example of compiling from command line, check the :ref:` SAXPY tutorial compiling `. HIP versioning