Files

Ignorando revisiones en .git-blame-ignore-revs. Haga clic aquí para saltar y para a la vista normal.

116 líneas
3.6 KiB
ReStructuredText

.. meta::
:description: This page explains how to install HIP
:keywords: AMD, ROCm, HIP, install, installation
2024-03-18 15:48:19 -04:00
*******************************************
Install HIP
*******************************************
2024-05-28 18:42:08 +02:00
HIP can be installed on AMD (ROCm with HIP-Clang) and NVIDIA (CUDA with NVCC) platforms.
2024-03-18 15:48:19 -04:00
.. note::
The version definition for the HIP runtime is different from CUDA. On AMD
platforms, the :cpp:func:`hipRuntimeGetVersion` function returns the HIP
runtime version. On NVIDIA platforms, this function returns the CUDA runtime
version.
.. _install_prerequisites:
2024-03-18 15:48:19 -04:00
Prerequisites
=======================================
.. tab-set::
.. tab-item:: AMD
:sync: amd
2024-03-18 15:48:19 -04:00
Refer to the Prerequisites section in the ROCm install guides:
2024-03-18 15:48:19 -04:00
* `System requirements (Linux) <https://rocm.docs.amd.com/projects/install-on-linux/en/latest/reference/system-requirements.html>`_
* `System requirements (Windows) <https://rocm.docs.amd.com/projects/install-on-windows/en/latest/reference/system-requirements.html>`_
2024-03-18 15:48:19 -04:00
.. tab-item:: NVIDIA
:sync: nvidia
2024-03-18 15:48:19 -04:00
With NVIDIA GPUs, HIP requires unified memory. All CUDA-enabled NVIDIA
GPUs with compute capability 5.0 or later should be supported. For more
information, see `NVIDIA's list of CUDA enabled GPUs <https://developer.nvidia.com/cuda-gpus>`_.
2024-03-18 15:48:19 -04:00
Installation
=======================================
.. tab-set::
.. tab-item:: AMD
:sync: amd
2024-03-18 15:48:19 -04:00
HIP is automatically installed during the ROCm installation. If you haven't
yet installed ROCm, you can find installation instructions here:
2024-03-18 15:48:19 -04:00
* `ROCm installation for Linux <https://rocm.docs.amd.com/projects/install-on-linux/en/latest/index.html>`_
* `HIP SDK installation for Windows <https://rocm.docs.amd.com/projects/install-on-windows/en/latest/index.html>`_
2024-03-18 15:48:19 -04:00
By default, HIP is installed into ``/opt/rocm``.
2024-03-18 15:48:19 -04:00
.. note::
There is no autodetection for the HIP installation. If you choose to
install it somewhere other than the default location, you must set the
``HIP_PATH`` environment variable as explained in
`Build HIP from source <./build.html>`_.
.. tab-item:: NVIDIA
:sync: nvidia
2024-03-18 15:48:19 -04:00
#. Install the NVIDIA toolkit.
2024-03-18 15:48:19 -04:00
The latest release can be found here:
`CUDA Toolkit <https://developer.nvidia.com/cuda-downloads>`_.
2024-03-18 15:48:19 -04:00
#. Setup the radeon repo.
2024-03-18 15:48:19 -04:00
.. code-block::shell
2024-11-21 16:39:29 +00:00
# Replace url with appropriate link in the table below
wget https://repo.radeon.com/amdgpu-install/6.2/distro/version_name/amdgpu-install_6.2.60200-1_all.deb
sudo apt install ./amdgpu-install_6.2.60200-1_all.deb
sudo apt update
2024-11-21 16:39:29 +00:00
.. list-table:: amdgpu-install links
:widths: 25 100
:header-rows: 1
2024-11-21 16:39:29 +00:00
* - Ubuntu version
- URL
* - 24.04
- https://repo.radeon.com/amdgpu-install/6.2.4/ubuntu/noble/amdgpu-install_6.2.60204-1_all.deb
* - 22.04
- https://repo.radeon.com/amdgpu-install/6.2.4/ubuntu/jammy/amdgpu-install_6.2.60204-1_all.deb
2024-03-18 15:48:19 -04:00
#. Install the ``hip-runtime-nvidia`` and ``hip-dev`` packages. This installs the CUDA SDK and HIP
porting layer.
2024-03-18 15:48:19 -04:00
.. code-block:: shell
2024-03-18 15:48:19 -04:00
apt-get install hip-runtime-nvidia hip-dev
2024-03-18 15:48:19 -04:00
The default paths are:
* CUDA SDK: ``/usr/local/cuda``
* HIP: ``/opt/rocm``
2024-03-18 15:48:19 -04:00
#. Set the HIP_PLATFORM to nvidia.
2024-11-21 16:39:29 +00:00
.. code-block:: shell
2024-11-21 16:39:29 +00:00
export HIP_PLATFORM="nvidia"
2024-03-18 15:48:19 -04:00
Verify your installation
==========================================================
Run ``hipconfig`` in your installation path.
2024-05-28 18:42:08 +02:00
.. code-block:: shell
2024-03-18 15:48:19 -04:00
/opt/rocm/bin/hipconfig --full