Usermode Driver for Tenstorrent AI Accelerators
Required Ubuntu dependencies:
sudo apt install -y libhwloc-dev cmake ninja-build
To build libdevice.so
:
cmake -B build -G Ninja
ninja -C build
# or
ninja umd_device -C build
Tests are build separatelly for each architecture.
Specify the ARCH_NAME
environment variable as grayskull
, wormhole_b0
or blackhole
before building.
You also need to configure cmake to enable tests, hence the need to run cmake configuration step again.
To build tests:
cmake -B build -G Ninja -DTT_UMD_BUILD_TESTS=ON
ninja umd_tests -C build
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)