Install
These instructions will guide you through the installation of Tenstorrent system tools and drivers, followed by the installation of TT-Metalium and TT-NN.
Installation Steps
Step 1. Driver & Firmware
Follow the Software Setup instructions for your specific board or system provided on our general docs.
If you have purchased a Grayskull card, you will find the instructions here.
Note the current compatability matrix:
Device |
OS |
P y t h o n |
Drive r (TT-K MD) |
Firmware (TT-Flash) |
TT-SMI |
TT-Topolog y |
---|---|---|---|---|---|---|
Graysk ull |
Ubun tu 20.0 4 |
1 0 |
v1.26 |
fw_pack-80.4.0. 0_acec1267.tar. gz (v4.0.0) |
v2.1.0 or above |
N/A |
Wormho le |
Ubun tu 20.0 4 |
1 0 |
v1.26 |
fw_pack-80.8.11 .0.tar.gz (v80.8.11.0) |
v2.1.0 or above |
N/A |
T3000 (Wormh ole) |
Ubun tu 20.0 4 |
1 0 |
v1.26 |
fw_pack-80.8.11 .0.tar.gz (v80.8.11.0) |
v2.1.0 or above |
v1.0.2 or
above,
|
Step 2. System-level dependencies
sudo apt update
sudo apt install software-properties-common=0.99.9.12 build-essential=12.8ubuntu1.1 python3.8-venv=3.8.10-0ubuntu1~20.04.9 libhwloc-dev graphviz patchelf
wget https://apt.llvm.org/llvm.sh
chmod u+x llvm.sh
sudo ./llvm.sh 17
sudo apt install libc++-17-dev libc++abi-17-dev
Step 3. Hugepages
Download latest setup_hugepages.py script.
wget https://raw.githubusercontent.com/tenstorrent/tt-metal/main/infra/machine_setup/scripts/setup_hugepages.py
Run first setup script.
sudo -E python3 setup_hugepages.py first_pass
Reboot
sudo reboot now
Run second setup script & check setup.
sudo -E python3 setup_hugepages.py enable && sudo -E python3 setup_hugepages.py check
Step 4. Install and start using TT-NN and TT-Metalium!
[!NOTE]
You may choose to install from either source or a Python wheel.
However, no matter your method, in order to use our pre-built models or to follow along with the documentation and tutorials to get started, you will still need the source code.
If you do not want to use the models or follow the tutorials and want to immediately start using the API, you may install just the wheel.
Install git and git-lfs
sudo apt install git git-lfs
Clone the repo.
git clone https://github.com/tenstorrent/tt-metal.git --recurse-submodules
cd tt-metal
git submodule foreach 'git lfs fetch --all && git lfs pull'
Set up the environment variables. For Grayskull, use:
export ARCH_NAME=grayskull
export TT_METAL_HOME=$(pwd)
export PYTHONPATH=$(pwd)
For Wormhole boards, use:
export ARCH_NAME=wormhole_b0
export TT_METAL_HOME=$(pwd)
export PYTHONPATH=$(pwd)
Install either from source, or from our release wheel.
Option 1: From source
We use CMake for our build flows.
./build_metal.sh
# If you would like an out-of-the-box virtual environment to use,
./create_venv.sh
source python_env/bin/activate
Note about Python environments: You do not have to use
create_venv.sh
. If you are less familiar with Python and its various
environment tools, just use create_venv.sh
as shown above and the
pre-built environment.
Option 2: From wheel
Download the latest wheel from our releases page for the particular Tenstorrent card architecture that you have installed on your system. (ie. Grayskull, Wormhole, etc)
Install the wheel using your Python environment manager of choice. For
example, to install with pip
:
pip install <wheel_file.whl>
If you are going to try our pre-built models in models/
, then you
must also further install their requirements:
pip install -r tt_metal/python_env/requirements-dev.txt
Start coding
You are all set! Visit the TT-NN Basic examples page or get started with simple kernels on TT-Metalium.
Step 5. (Optional) Software dependencies for codebase contributions
Please follow the next additional steps if you want to contribute to the codebase.
Install dependencies
sudo apt install cmake=3.16.3-1ubuntu1.20.04.1 pandoc libtbb-dev libcapstone-dev pkg-config ninja-build
Download and install Doxygen, (v1.9 or higher, but less than v1.10)