2016-07-25 14:53:15 +05:30
## Table of Contents
<!-- toc -->
2022-03-11 16:59:44 +05:30
- [Install HIP ](#installing-hip )
2016-07-25 14:53:15 +05:30
* [Prerequisites ](#prerequisites )
2020-11-02 15:54:42 -05:00
* [AMD Platform ](#amd-platform )
* [NVIDIA Platform ](#nvidia-platform )
- [Verify your installation ](#verify-your-installation )
2022-03-11 16:59:44 +05:30
- [How to build HIP from source ](#how-to-build-hip-from-source )
2016-07-25 14:53:15 +05:30
<!-- tocstop -->
2016-05-02 10:19:46 -05:00
2022-03-11 16:59:44 +05:30
# Install HIP
2016-05-02 10:19:46 -05:00
2022-03-11 16:59:44 +05:30
HIP can be installed either on AMD ROCm platform with HIP-Clang compiler, or a CUDA platform with nvcc installed.
Note: The version definition for the HIP runtime is different from CUDA. Users can use hipRuntimeGerVersion function, on the AMD platform it returns the HIP runtime version, while on the NVIDIA platform, it returns the CUDA runtime version. There is no mapping or correlation between the HIP version and CUDA version.
2016-05-02 10:19:46 -05:00
## Prerequisites
2022-03-11 16:59:44 +05:30
On AMD platform, see Prerequisite Actions in ROCm_Installation_Guide (https://docs.amd.com/) for the release.
On NVIDIA platform, check system requirements in NVIDIA CUDA Installation Guide at https://docs.nvidia.com/cuda/cuda-installation-guide-linux/.
2016-05-02 10:19:46 -05:00
2020-11-02 15:54:42 -05:00
## AMD Platform
2016-05-02 10:19:46 -05:00
2022-03-11 16:59:44 +05:30
HIP is part of ROCM packages, it will be automatically installed following the ROCm Installation Guide on AMD public documentation site (https://docs.amd.com/) for the coresponding ROCm release.
By default, HIP is installed into /opt/rocm/hip.
2020-01-06 02:02:47 -05:00
2020-11-02 15:54:42 -05:00
## NVIDIA Platform
2018-05-31 23:55:42 -04:00
2016-05-02 10:19:46 -05:00
2022-01-06 05:53:17 -05:00
* Install Nvidia Driver
```
sudo apt-get install ubuntu-drivers-common && sudo ubuntu-drivers autoinstall
sudo reboot
```
Or download the latest cuda-toolkit at https://developer.nvidia.com/cuda-downloads
The driver will be installed automatically.
2022-03-11 16:59:44 +05:30
* Add the ROCm package server to your system as per the OS-specific guide in ROCm Installation Guide (https://docs.amd.com/) for the release.
* Install the "hip-runtime-nvidia" and "hip-dev" package. This will install CUDA SDK and the HIP porting layer.
2016-05-02 10:19:46 -05:00
```
2022-01-06 05:53:17 -05:00
apt-get install hip-runtime-nvidia hip-dev
2016-05-02 10:19:46 -05:00
```
2022-03-11 16:59:44 +05:30
* Default paths:
* By default HIP looks for CUDA SDK in /usr/local/cuda.
* By default HIP is installed into /opt/rocm/hip.
* Optionally, consider adding /opt/rocm/bin to your path to make it easier to use the tools.
2021-07-20 11:00:53 -04:00
2022-01-06 05:53:17 -05:00
2020-11-02 15:54:42 -05:00
# Verify your installation
Run hipconfig (instructions below assume default installation path) :
2016-05-02 10:19:46 -05:00
``` shell
2022-03-11 16:59:44 +05:30
/opt/rocm/bin/hipconfig --full
2016-05-02 10:19:46 -05:00
```
2022-01-06 05:53:17 -05:00
2022-03-11 16:59:44 +05:30
# How to build HIP from source
Developers can build HIP from source on either AMD or NVIDIA platforms, see detail instructions at [building HIP] (docs/markdown/hip_build.md).
2016-05-02 10:19:46 -05:00