Installation#
2023-06-23
5 min read
Advanced Micro Devices, Inc.
Supported Hardware#
Currently, only AMD GPUs are supported.
See the ROCm™ Hardware_and_Software_Support page for a list of supported AMD GPUs.
Supported Operation Systems#
Currently, only Linux is supported by the HIP Python interfaces’s library loader. The next section lists additional constraints with respect to the required ROCm™ installation.
Software Requirements#
You must install a HIP Python version that is compatible with your ROCm™ HIP SDK installation, or vice versa – in particular, if you want to use the Cython interfaces. See the ROCm™ documentation for more details on how to install the ROCm™ HIP SDK.
HIP Python Versioning#
The ROCm™ HIP SDK is versioned according to the below scheme:
ROCM_VERSION_MAJOR.ROCM_VERSION_MINOR.ROCM_VERSION_PATCH[...]
:
While HIP Python packages are versioned according to:
ROCM_VERSION_MAJOR.ROCM_VERSION_MINOR.ROCM_VERSION_PATCH.HIP_PYTHON_CODEGEN_VERSION.HIP_PYTHON_RELEASE_VERSION
Any version of HIP Python that matches the first three numbers is suitable for your ROCm™ HIP SDK installation.
Example
If you have the ROCm™ HIP SDK 5.6.0 installed, any
HIP Python package with version 5.6.0.X.Y
can be used.
Note
The HIP Python Python packages load HIP SDK functions in a lazy manner. Therefore, you will likely “get away” with using “incompatible” ROCm™ and HIP Python pairs if the following assumptions apply:
You are only using Python code,
the definitions of the types that you use have not changed between the respective ROCm™ releases, and
you are using a subset of functions that is present in both ROCm™ releases.
Both assumptions often apply.
Installation Commands#
Important
Especially on older operating systems, ensure that your pip
is upgraded to
the latest version. You can upgrade it, e.g., as follows:
python3 -m pip install --upgrade pip
After having identified the correct package for your ROCm™ installation, type:
python3 -m pip install -i https://test.pypi.org/simple hip-python>=<rocm_version>.<hip_python_version>
or if you have a HIP Python wheel somewhere in your filesystem:
python3 -m pip install <path/to/hip_python>.whl
Warning
Currently, we have not uploaded any HIP Python packages to PyPI yet. So far we have only uploaded packages to TestPyPI, mainly intended for internal testing purposes. If you find similar named packages on PyPI they may been provided by others, possibly with malicious intent.
Note
The first option will only be available after the public release on PyPI.