tenstorrent/tt-metal
GitHub: tenstorrent/tt-metal
Tenstorrent AI 加速芯片的底层软件栈,包含高层神经网络算子库 TT-NN 和底层 kernel 编程框架 TT-Metalium。
Stars: 1369 | Forks: 364
[](https://github.com/tenstorrent/tt-metal/actions/workflows/all-post-commit-workflows.yaml)
[](https://deepwiki.com/tenstorrent/tt-metal)
**TT-NN** 是一个 Python 和 C++ 神经网络 OP 库。
## 重点模型
Models 团队专注于开发以下模型,并在性能、精度和兼容性方面对其进行优化。点击每个模型链接了解更多详情。
### [Llama 3.3 70B (TP=32)](./models/demos/llama3_70b_galaxy)
| Batch | Hardware | TTFT (MS) | T/S/U | Target
T/S/U | T/S | TT-Metalium Release | vLLM Tenstorrent Repo Release | |-------|----------|-----------|-------|-----------------|-----|---------------------|-------------------------------| | 32 | [Galaxy (Wormhole)](https://tenstorrent.com/hardware/galaxy) | 53 | 72.5 | 80 | 2268.8 | [v0.65.0-rc7](https://github.com/tenstorrent/tt-metal/tree/v0.65.0-rc7) | [59be953](https://github.com/tenstorrent/vllm/tree/59be953f2bbd21e227f9ef4b779f545f9c3bf599/tt_metal) | ### [Qwen 2.5 7B (TP=2)](https://github.com/tenstorrent/tt-metal/tree/main/models/tt_transformers) | Batch | Hardware | TTFT (MS) | T/S/U | Target
T/S/U | T/S | TT-Metalium Release | vLLM Tenstorrent Repo Release | |-------|----------|-----------|-------|-----------------|------|---------------------|-------------------------------| | 32 | [n300 (Wormhole)](https://tenstorrent.com/hardware/wormhole) | 109 | 22.1 | 30 | 707.2 | [v0.62.0-rc35](https://github.com/tenstorrent/tt-metal/tree/v0.62.0-rc35) | [ced0161](https://github.com/tenstorrent/vllm/tree/ced0161dc223e6d8aca5f44a6c43d13070c3fba6/tt_metal) | ### [Qwen 2.5 72B (TP=8)](https://github.com/tenstorrent/tt-metal/tree/main/models/tt_transformers) | Batch | Hardware | TTFT (MS) | T/S/U | Target
T/S/U | T/S | TT-Metalium Release | vLLM Tenstorrent Repo Release | |-------|----------|-----------|-------|-----------------|-----|---------------------|-------------------------------| | 32 | [QuietBox (Wormhole)](https://tenstorrent.com/hardware/tt-quietbox) | 223 | 15.4 | 20 | 492.8 | [v0.62.0-rc25](https://github.com/tenstorrent/tt-metal/tree/v0.62.0-rc25) | [e7c329b](https://github.com/tenstorrent/vllm/tree/e7c329b1664f8591ae8b4269bed9690726e52a24/tt_metal) | ### [Whisper (distil-large-v3)](https://github.com/tenstorrent/tt-metal/tree/main/models/demos/audio/whisper) | Batch | Hardware | TTFT (MS) | T/S/U | Target
T/S/U | T/S | TT-Metalium Release | |-------|----------|-----------|-------|-----------------|-----|---------------------| | 1 | [n150 (Wormhole)](https://tenstorrent.com/hardware/wormhole) | 163 | 105.0 | 45 | 105.0 | [v0.65.0-dev20251208](https://github.com/tenstorrent/tt-metal/tree/v0.65.0-dev20251208) | | 1 | [p150 (Blackhole)](https://tenstorrent.com/hardware/blackhole) | 63 | 263.4 | | 263.4 | [v0.65.0-dev20251208](https://github.com/tenstorrent/tt-metal/tree/v0.65.0-dev20251208) | ### [Mixtral 8x7B (TP=8)](https://github.com/tenstorrent/tt-metal/tree/main/models/tt_transformers) | Batch | Hardware | TTFT (MS) | T/S/U | Target
T/S/U | T/S | TT-Metalium Release | |-------|----------|-----------|-------|-----------------|-----|---------------------| | 32 | [QuietBox (Wormhole)](https://tenstorrent.com/hardware/tt-quietbox) | 122 | 24.9 | 33 | 796.8 | [v0.62.0-dev20251015](https://github.com/tenstorrent/tt-metal/tree/v0.62.0-dev20251015) | Blackhole 软件优化正在积极开发中。请加入我们,共同塑造开源 AI 的未来!
[\[Discord\]](https://discord.gg/tenstorrent) [\[开发者中心\]](https://tenstorrent.com/developers) 有关 vLLM 安装和环境创建的更多信息,请访问 [Tenstorrent vLLM 仓库](https://github.com/tenstorrent/vllm/blob/dev/tt_metal/README.md)。 ## 模型更新 有关最新的模型更新和功能,请参阅 [MODEL_UPDATES.md](models/docs/MODEL_UPDATES.md) ## 模型引入与测试 有关初始模型流程的信息,请参阅 [模型引入与测试](https://github.com/tenstorrent/tt-metal/blob/main/models/docs/model_bring_up.md) ## TT-NN 技术报告 - [模型的高级性能优化](./tech_reports/AdvancedPerformanceOptimizationsForModels/AdvancedPerformanceOptimizationsForModels.md) (2025年3月4日更新) - [GS 上的 TT-NN ViT 实现](./tech_reports/ViT-TTNN/vit.md) (2024年9月22日更新) - [TT-NN 中的 LLM 引入](./tech_reports/LLMs/llms.md) (2024年10月29日更新) - [TT-NN 中的 CNN 引入与优化](./tech_reports/CNNs/cnn_optimizations.md) (2025年1月22日更新) ## 基准测试 - [Wormhole 和 Blackhole 上的矩阵乘法 FLOPS](./tech_reports/GEMM_FLOPS/GEMM_FLOPS.md) (2025年6月17日更新)
**TT-Metalium** 是我们的底层编程模型,支持为 Tenstorrent 硬件开发 kernel。
## 入门指南
从 [简单 kernel](https://docs.tenstorrent.com/tt-metal/latest/tt-metalium/tt_metal/examples/index.html) 开始上手。
## TT-Metalium 技术报告
- [矩阵引擎](./tech_reports/matrix_engine/matrix_engine.md) (2024年9月6日更新)
- [数据格式](./tech_reports/data_formats/data_formats.md) (2024年9月7日更新)
- [重配置数据格式](./tech_reports/data_formats/reconfig_data_format.md) (2024年10月17日更新)
- [处理特殊浮点数](./tech_reports/Handling_Special_Value/special_values.md) (2024年10月5日更新)
- [分配器](./tech_reports/memory/allocator.md) (2024年12月19日更新)
- [张量布局](./tech_reports/tensor_layouts/tensor_layouts.md) (2024年9月6日更新)
- [饱和 DRAM 带宽](./tech_reports/Saturating_DRAM_bandwidth/Saturating_DRAM_bandwidth.md) (2024年9月6日更新)
- [Wormhole 上的 Flash Attention](./tech_reports/FlashAttention/FlashAttention.md) (2024年9月6日更新)
- [TT 架构上的 CNN](./tech_reports/CNNs/ttcnn.md) (2024年9月6日更新)
- [以太网和多芯片基础](./tech_reports/EthernetMultichip/BasicEthernetGuide.md) (2024年9月20日更新)
- [Blackhole 引入编程指南](./tech_reports/Blackhole/BlackholeBringUpProgrammingGuide.md) (2024年12月18日更新)
- [子设备](./tech_reports/SubDevices/SubDevices.md) (2025年1月7日更新)
## 扩展技术报告
- [设备网格编程 (Scale-Up)](./tech_reports/Programming_Mesh_of_Devices/Programming_Mesh_of_Devices_with_TT-NN.md) (2026年1月6日更新)
- [多网格编程 (Scale-Out)](./tech_reports/Programming_Multiple_Meshes/Programming_Multiple_Meshes.md) (2026年1月19日更新)
- [TT-Fabric 架构](./tech_reports/TT-Fabric/TT-Fabric-Architecture.md) (2025年12月1日更新)
- [TT-Distributed 架构](./tech_reports/TT-Distributed/TT-Distributed-Architecture-1219.md) (2025年10月20日更新)
## TT-Metalium 编程示例
### 你好世界
- [Hello World! 计算 Kernel](https://github.com/tenstorrent/tt-metal/blob/main/tt_metal/programming_examples/hello_world_compute_kernel/hello_world_compute.md)
- [Hello World! 数据移动 Kernel](https://github.com/tenstorrent/tt-metal/blob/main/tt_metal/programming_examples/hello_world_datamovement_kernel/hello_world_data_movement.md)
### 整数加法
- [在 Baby RiscV 中加 2 个整数](https://github.com/tenstorrent/tt-metal/blob/main/tt_metal/programming_examples/add_2_integers_in_riscv/add_2_integers_in_riscv.md)
- [在计算 Kernel 中加 2 个整数](https://github.com/tenstorrent/tt-metal/blob/main/tt_metal/programming_examples/add_2_integers_in_compute/add_2_integers_in_compute.md)
### 简单张量操作
- [分片](./tech_reports/prog_examples/shard_data_rm/shard_data_rm.md)
- [填充](./tech_reports/prog_examples/pad_multi_core/pad_multi_core.md)
### DRAM 数据移动
- [Dram 回环数据移动](https://github.com/tenstorrent/tt-metal/blob/main/tt_metal/programming_examples/loopback/dram_loopback.md)
### 逐元素
- [向量引擎 (SFPU) 中的逐元素一元 OP](https://github.com/tenstorrent/tt-metal/blob/main/tt_metal/programming_examples/eltwise_sfpu/eltwise_sfpu.md)
- [矩阵引擎 (FPU) 中的逐元素二元 OP](https://github.com/tenstorrent/tt-metal/blob/main/tt_metal/programming_examples/eltwise_binary/eltwise_binary.md)
### 矩阵乘法
- [单核 Matmul OP](https://github.com/tenstorrent/tt-metal/blob/main/tt_metal/programming_examples/matmul/matmul_single_core/matmul_single_core.md)
- [多核 Matmul OP (基础)](https://github.com/tenstorrent/tt-metal/blob/main/tt_metal/programming_examples/matmul/matmul_multi_core/matmul_multi_core.md)
- [Matmul 多核复用 (优化版)](./tech_reports/prog_examples/matmul_multi_core_optimized/data_reuse.md)
- [Matmul 多核多播 (优化版)](./tech_reports/prog_examples/matmul_multi_core_optimized/data_mcast.md)
### 工具与仪器
#### [TT-NN Visualizer](https://github.com/tenstorrent/ttnn-visualizer)
一款用于可视化和分析模型执行的综合工具,提供交互式图表、内存图、张量详情、缓冲区概览、操作流程图,以及支持通过文件或 SSH 加载报告的多实例支持。
#### [TT-Exalens](https://github.com/tenstorrent/tt-exalens)
TT-Exalens 仓库介绍了 TT-Lensium,这是一款用于 Tenstorrent 硬件的底层调试工具。它允许开发者访问 Wormhole 和 Blackhole 设备并进行通信。
#### [TT-SMI](https://github.com/tenstorrent/tt-smi)
TT-SMI 仓库介绍了 Tenstorrent 系统管理接口。该命令行实用程序可以与主机上的 Tenstorrent 设备进行交互。TT-SMI 提供了易于使用的界面,显示设备、遥测和固件信息。
#### [Model Explorer](https://github.com/tenstorrent/model-explorer)
Model Explorer 是一款使用模型图的直观分层可视化工具。它将模型操作组织成嵌套层,并提供模型探索和调试功能。
#### [Tracy Profiler](https://github.com/tenstorrent/tracy)
Tracy Profiler 是一款具有纳秒级实时分辨率、远程遥测、混合帧和采样功能的工具。Tracy 支持分析 CPU、GPU、内存分配、锁、上下文切换等。
#### [Kernel 打印调试](https://docs.tenstorrent.com/tt-metal/latest/tt-metalium/tools/kernel_print.html)
DPRINT 可以将 kernel 中的变量、地址和循环缓冲区数据打印到主机终端或日志文件。此功能对于调试 kernel 问题非常有用。
#### [Watcher](https://github.com/tenstorrent/tt-metal/blob/main/docs/source/tt-metalium/tools/watcher.rst)
Watcher 监控固件和 kernel 的常见编程错误及整体设备状态。如果发生错误或挂起,Watcher 会显示该事件的日志数据。
#### [Inspector](https://github.com/tenstorrent/tt-metal/blob/main/docs/source/tt-metalium/tools/inspector.rst)
Inspector 提供对主机运行时的洞察。它记录调查所需的数据,并允许查询主机运行时数据。
## 相关 Tenstorrent 项目
- [TT-Forge](https://github.com/tenstorrent/tt-forge/tree/main)
- [TT-Forge-FE](https://github.com/tenstorrent/tt-forge-fe)
- [TT-Torch](https://github.com/tenstorrent/tt-torch)
- [TT-XLA](https://github.com/tenstorrent/tt-xla)
- [TT-MLIR](https://github.com/tenstorrent/tt-mlir)
- [TT-TVM](https://github.com/tenstorrent/tt-tvm)
## 最新版本
| Release | Release Date | FW Version | KMD Version | SMI Version |
|:---------:|:--------------:|:------------:|:--------:|:--------:|
| 0.66.0 | ETA Jan 30, 2026 | 19.2.0 | 2.5.0 | 3.0.38 |
| [0.65.0](https://github.com/tenstorrent/tt-metal/releases/tag/v0.65.0) | Dec 15, 2025 | 19.2.0 | 2.5.0 | 3.0.38 |
| [0.64.5](https://github.com/tenstorrent/tt-metal/releases/tag/v0.64.5) | Dec 1, 2025 | 18.12.0 | 2.4.1 | 3.0.32 |
| [0.64.4](https://github.com/tenstorrent/tt-metal/releases/tag/v0.64.4) | Nov 24, 2025 | 18.12.0 | 2.4.1 | 3.0.32 |
| [0.64.3](https://github.com/tenstorrent/tt-metal/releases/tag/v0.64.3) | Nov 14, 2025 | 18.12.0 | 2.4.1 | 3.0.32 |
| [0.64.0](https://github.com/tenstorrent/tt-metal/releases/tag/v0.64.0) | Oct 29, 2025 | 18.12.0 | 2.4.1 | 3.0.32 |
| [0.63.0](https://github.com/tenstorrent/tt-metal/releases/tag/v0.63.0) | Sep 22, 2025 | 18.8.0 | 2.3.0 | 3.0.28 |
| [0.62.2](https://github.com/tenstorrent/tt-metal/releases/tag/v0.62.2) | Aug 20, 2025 | 18.6.0 | 2.0.0 | 3.0.20 |
| 0.61.0 | Skipped | - | - | - |
| [0.60.1](https://github.com/tenstorrent/tt-metal/releases/tag/v0.60.1) | Jul 22 2025 | 18.6.0 | 2.0.0 | 3.0.20 |
| [0.59.0](https://github.com/tenstorrent/tt-metal/releases/tag/v0.59.0) | Jun 18, 2025 | - | - | - |
| [0.58.0](https://github.com/tenstorrent/tt-metal/releases/tag/v0.58.0) | May 13, 2025 | - | - | - |
| [0.57.0](https://github.com/tenstorrent/tt-metal/releases/tag/v0.57.0) | Apr 15, 2025 | - | - | - |
| [0.56.0](https://github.com/tenstorrent/tt-metal/releases/tag/v0.56.0) | Mar 7, 2025 | - | - | - |
访问 [releases](https://github.com/tenstorrent/tt-metal/tree/main/releases) 文件夹以获取有关版本、发行说明和预计发布日期的详细信息。
## Tenstorrent 赏金计划条款与条件
此仓库是 Tenstorrent 赏金计划的一部分。如果您有兴趣帮助改进 tt-metal,请务必在前往 issues 标签页之前阅读 [Tenstorrent 赏金计划条款与条件](https://docs.tenstorrent.com/bounty_terms.html)。请查找同时标有“bounty”和难度等级标签的 issues!
## 许可证
TT-Metalium 和 TTNN 根据 Apache 2.0 许可证授权,详见 [LICENSE](LICENSE) 和 [LICENSE_understanding.txt](LICENSE_understanding.txt)。
本项目的某些可分发形式(例如符合 manylinux 标准的 wheels)可能需要捆绑标准 Linux 系统库之外的其他库。例如:
- libnuma
- libhwloc
- openmpi(在构建时包含多主机支持)
- libevent(在构建时包含多主机支持)
这些库受其各自许可证条款的约束。
[硬件](https://tenstorrent.com/hardware/blackhole) | [安装](./INSTALLING.md) | [Discord](https://discord.gg/tvhGzHQwaj) | [加入我们](https://boards.greenhouse.io/tenstorrent/jobs/4155609007) | [赏金 $](https://github.com/tenstorrent/tt-metal/issues?q=is%3Aissue%20state%3Aopen%20label%3Abounty)
**TT-NN** 是一个 Python 和 C++ 神经网络 OP 库。
[API 参考](https://docs.tenstorrent.com/tt-metal/latest/ttnn/index.html) | [模型演示](./models/demos/)
T/S/U | T/S | TT-Metalium Release | vLLM Tenstorrent Repo Release | |-------|----------|-----------|-------|-----------------|-----|---------------------|-------------------------------| | 32 | [Galaxy (Wormhole)](https://tenstorrent.com/hardware/galaxy) | 53 | 72.5 | 80 | 2268.8 | [v0.65.0-rc7](https://github.com/tenstorrent/tt-metal/tree/v0.65.0-rc7) | [59be953](https://github.com/tenstorrent/vllm/tree/59be953f2bbd21e227f9ef4b779f545f9c3bf599/tt_metal) | ### [Qwen 2.5 7B (TP=2)](https://github.com/tenstorrent/tt-metal/tree/main/models/tt_transformers) | Batch | Hardware | TTFT (MS) | T/S/U | Target
T/S/U | T/S | TT-Metalium Release | vLLM Tenstorrent Repo Release | |-------|----------|-----------|-------|-----------------|------|---------------------|-------------------------------| | 32 | [n300 (Wormhole)](https://tenstorrent.com/hardware/wormhole) | 109 | 22.1 | 30 | 707.2 | [v0.62.0-rc35](https://github.com/tenstorrent/tt-metal/tree/v0.62.0-rc35) | [ced0161](https://github.com/tenstorrent/vllm/tree/ced0161dc223e6d8aca5f44a6c43d13070c3fba6/tt_metal) | ### [Qwen 2.5 72B (TP=8)](https://github.com/tenstorrent/tt-metal/tree/main/models/tt_transformers) | Batch | Hardware | TTFT (MS) | T/S/U | Target
T/S/U | T/S | TT-Metalium Release | vLLM Tenstorrent Repo Release | |-------|----------|-----------|-------|-----------------|-----|---------------------|-------------------------------| | 32 | [QuietBox (Wormhole)](https://tenstorrent.com/hardware/tt-quietbox) | 223 | 15.4 | 20 | 492.8 | [v0.62.0-rc25](https://github.com/tenstorrent/tt-metal/tree/v0.62.0-rc25) | [e7c329b](https://github.com/tenstorrent/vllm/tree/e7c329b1664f8591ae8b4269bed9690726e52a24/tt_metal) | ### [Whisper (distil-large-v3)](https://github.com/tenstorrent/tt-metal/tree/main/models/demos/audio/whisper) | Batch | Hardware | TTFT (MS) | T/S/U | Target
T/S/U | T/S | TT-Metalium Release | |-------|----------|-----------|-------|-----------------|-----|---------------------| | 1 | [n150 (Wormhole)](https://tenstorrent.com/hardware/wormhole) | 163 | 105.0 | 45 | 105.0 | [v0.65.0-dev20251208](https://github.com/tenstorrent/tt-metal/tree/v0.65.0-dev20251208) | | 1 | [p150 (Blackhole)](https://tenstorrent.com/hardware/blackhole) | 63 | 263.4 | | 263.4 | [v0.65.0-dev20251208](https://github.com/tenstorrent/tt-metal/tree/v0.65.0-dev20251208) | ### [Mixtral 8x7B (TP=8)](https://github.com/tenstorrent/tt-metal/tree/main/models/tt_transformers) | Batch | Hardware | TTFT (MS) | T/S/U | Target
T/S/U | T/S | TT-Metalium Release | |-------|----------|-----------|-------|-----------------|-----|---------------------| | 32 | [QuietBox (Wormhole)](https://tenstorrent.com/hardware/tt-quietbox) | 122 | 24.9 | 33 | 796.8 | [v0.62.0-dev20251015](https://github.com/tenstorrent/tt-metal/tree/v0.62.0-dev20251015) | Blackhole 软件优化正在积极开发中。请加入我们,共同塑造开源 AI 的未来!
[\[Discord\]](https://discord.gg/tenstorrent) [\[开发者中心\]](https://tenstorrent.com/developers) 有关 vLLM 安装和环境创建的更多信息,请访问 [Tenstorrent vLLM 仓库](https://github.com/tenstorrent/vllm/blob/dev/tt_metal/README.md)。 ## 模型更新 有关最新的模型更新和功能,请参阅 [MODEL_UPDATES.md](models/docs/MODEL_UPDATES.md) ## 模型引入与测试 有关初始模型流程的信息,请参阅 [模型引入与测试](https://github.com/tenstorrent/tt-metal/blob/main/models/docs/model_bring_up.md) ## TT-NN 技术报告 - [模型的高级性能优化](./tech_reports/AdvancedPerformanceOptimizationsForModels/AdvancedPerformanceOptimizationsForModels.md) (2025年3月4日更新) - [GS 上的 TT-NN ViT 实现](./tech_reports/ViT-TTNN/vit.md) (2024年9月22日更新) - [TT-NN 中的 LLM 引入](./tech_reports/LLMs/llms.md) (2024年10月29日更新) - [TT-NN 中的 CNN 引入与优化](./tech_reports/CNNs/cnn_optimizations.md) (2025年1月22日更新) ## 基准测试 - [Wormhole 和 Blackhole 上的矩阵乘法 FLOPS](./tech_reports/GEMM_FLOPS/GEMM_FLOPS.md) (2025年6月17日更新)
**TT-Metalium** 是我们的底层编程模型,支持为 Tenstorrent 硬件开发 kernel。
[编程指南](./METALIUM_GUIDE.md) | [API 参考](https://docs.tenstorrent.com/tt-metal/latest/tt-metalium/tt_metal/apis/index.html)
标签:AI加速器, AI芯片, Apex, C++, DLL 劫持, Galaxy, HPC, Llama 3, LLM, Python, Qwen, RISC-V, Tenstorrent, Transformer, TT-Metalium, TT-NN, Unmanaged PE, vLLM, Wormhole, 人工智能, 内核编程, 大语言模型, 底层开发, 开源硬件, 张量计算, 数据擦除, 无后门, 机器学习, 模型推理, 深度学习, 用户模式Hook绕过, 神经网络, 算子库, 逆向工具, 高性能计算