Installation#
Advanced Micro Devices, Inc.
2023-06-23
5 min read
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™ installation, or vice versa – i n particular, if you want to use the Cython interfaces. See the [ROCm™ installation guide](https://docs.amd.com/bundle/ROCm™ -Installation-Guide-v5.3/page/Introduction_to_ROCm_Installation_Guide_for_Linux.html) for more details on how to install ROCm™ .
Important
Identifying matching ROCm™ and HIP Python pairs must be done via
the HIP (runtime) version! On a system with installed ROCm™ , you can, e.g., run
hipconfig to read out the HIP version.
HIP Python Versioning#
While, the HIP runtime is versioned according to the below scheme
HIP_VERSION_MAJOR.HIP_VERSION_MINOR.HIP_VERSION_PATCH[...]
HIP Python packages are versioned as follows:
HIP_VERSION_MAJOR.HIP_VERSION_MINOR.HIP_VERSION_PATCH.HIP_PYTHON_VERSION
The HIP Python version HIP_PYTHON_VERSION consists of the revision count on
the main branch plus an optional dev<number> that indicates
the deviation from the main branch. Such a suffix is typically appended
if the HIP Python packages have been built via a code generator on a development branch.
Example
ROCm™ 5.4.3 comes with HIP runtime version 5.4.22804-474e8620,
which can, e.g., be obtained via hipconfig.
Hence, any HIP Python package >= 5.4.22804.0 can be used.
Note
HIP Python package builts load HIP functions in a lazy manner. Therefore, you will likely “get away” with using “incompatible” HIP-HIP Python pairs if you are only using Python code, if the definitions of the types that you use have not changed between ROCm™ releases, and you are using a subset of functions that is present in both ROCm™ releases.
Installation Commands#
After having identified the correct package for your ROCm™ installation, type:
python3 -m pip install hip-python-<hip_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
Note
The first option will only be available after the public release on PyPI.