Komorebi¶
Move the data, move the thread, or move the code.
A programming model for a network of independently programmable processors, in which a thread reads what it needs or goes to where it is. Today it runs on the Tensix grid and the X280 cores of a Tenstorrent Blackhole card.
Komorebi lets you run your own C++ code on the Tensix cores of a Tenstorrent Blackhole card, and C code on its X280 cores, driven from Python.
At the end of the tutorial you can write a program that spreads work over the cores, moves tensors between the card's memory and the cores, and measure and debug it.
You need to know C++ and Python. You do not need to have written a kernel for a card like this one.
Start with lesson 1, What Komorebi is; every lesson teaches one thing and ends with a link to the next.
Komorebi 0.1.0 is on PyPI (pip install "komorebi-tt[runtime]"), a first release for one card model. Programs run on one P150A card, and every example in the tutorial shows what it printed on one.
Where things are¶
- Getting started: install Komorebi and check the host and the card.
- Tutorial: 42 lessons in six parts, from one core to a whole program.
- Concepts: why the framework is the way it is. The thread language, planned, the dispatcher and the Tensix runtime, then the longer design pages on micro-op streams, graphs and X280 threads.
- Guides: how to do one thing. Debug a command that does not finish, measure a command and development.
- Reference: exact descriptions of what is built: the host API, the Tensix runtime, ports, emit and reduce, broadcast, Movement, dynamic handlers and the X280 threads.
- Examples: ten programs of the repository, each with its own page, from the first one on.
The repository map is in the README; the full layout and the checks are in development. Measurements are in the experiments and the projects.