tenstorrent / tt-umd

User-Mode Driver for Tenstorrent hardware
Apache License 2.0
6 stars 3 forks source link

UMD

Dependencies

Required Ubuntu dependencies:

sudo apt install -y libhwloc-dev

Build flow

We are transitioning away from Make. The main libraries and tests should now be built with CMake. Specify the ARCH_NAME environment variable as grayskull or wormhole_b0 before building.

To build libdevice.so:

cmake -B build -G Ninja
ninja -C build
# or
ninja umd_device -C build

To build tests:

ninja umd_tests -C build

As a submodule/external project

If your project has CMake support, simply add this repo as a subdirectory:

add_subdirectory(<path to umd>)

You can then use libdevice.so by linking against the umd_device target wheverever is needed.

target_link_libraries(tt_metal PUBLIC umd_device)

Deprecated Make flow

This flow is no longer maintained. libdevice.so will build however if you want to run tests, we suggest using the CMake flow

Required Ubuntu dependencies:

sudo apt install -y libyaml-cpp-dev libhwloc-dev libgtest-dev libboost-dev

This target builds libdevice.so. Specify the ARCH_NAME environment variable when building (wormhole_b0 or grayskull):

make build

Run this target to build library, and gtest suite.

make test

Running test suite:

make run

To Clean build directory

make clean

To change device selection, change the ARCH_NAME flag in the top-level Makefile or run:

make build ARCH_NAME=...
make test ARCH_NAME=...