Build Tensile from source#
This topic provides information required to install Tensile from source and run benchmarks.
Install ROCm#
To begin, install ROCm for your platform. For installation instructions, refer to the Linux or Windows installation guide.
Note
If using Bash, set PATH=/opt/rocm/bin/:$PATH in your ~/.bashrc and refresh your shell using source ~/.bashrc.
Alternatively, export the path for your current shell session using export PATH=/opt/rocm/bin/:$PATH.
Install OS dependencies#
Note
The following steps are for Ubuntu. For other distributions, use the appropriate package manager.
Install dependencies:
apt-get install libyaml-dev python3-yaml libomp-dev
Install one of the following, depending on your preferred Tensile data format. If both are installed,
msgpackis preferred:apt-get install libmsgpack-dev # If using the msgpack backend # OR apt-get install libtinfo-dev # If using the YAML backend
Install build tools. For additional installation methods for the latest versions of CMake, see the CMake installation page.
apt-get install build-essential cmake
Build Tensile from source#
First, fetch Tensile standalone with git sparse checkout to avoid cloning all of rocm-libraries.
git clone --no-checkout --filter=blob:none https://github.com/ROCm/rocm-libraries.git
cd rocm-libraries
git sparse-checkout init --cone
git sparse-checkout set shared/tensile
git checkout develop # or the branch you are starting from
cd shared/tensile
Then, install Tensile from source in a virtual environment:
python3 -m venv .venv
source .venv/bin/activate
pip3 install .
You can now run Tensile’s Python applications, such as Tensile, TensileCreateLibrary, and others.