PyTorch 官方最新动态:Modernizing Table Batched Embeddings with FBTriton

ADK PyTorch官方 / ADK编译 2026-10-1 3分钟 57 次浏览
速览导读 / Summary

This post explores the FBTriton kernel design for Table Batched Embedding (TBE) forward and backward passes. These core operators handle embedding lookups across thousands of sharded GPUs within recom

官方发布 2026-10-1 官网即时同步

Key Insights / 核心看点

  • 1 This post explores the FBTriton kernel design for Table Batched Embedding (TBE)

PyTorch 官方最新动态:Modernizing Table Batched Embeddings with FBTriton

来源:PyTorch 官方动态 | 发布日期:2026-10-1

核心更新概览

This post explores the FBTriton kernel design for Table Batched Embedding (TBE) forward and backward passes. These core operators handle embedding lookups across thousands of sharded GPUs within recom

详细内容记录

This post explores the FBTriton kernel design for Table Batched Embedding (TBE) forward and backward passes. These core operators handle embedding lookups across thousands of sharded GPUs within recommendation systems. Our Triton implementation successfully outperforms the legacy CUDA kernels on these workloads. Here, we explain the architectural design, detail the measured performance gains, and highlight future optimization opportunities. TBE (Table-Batched Embedding) kernel efficiently performs embedding lookups and pooling across many tables in one GPU operation. TBE combines embedding lookup and pooling for many tables in a single GPU launch, reducing launch overhead and improving memory efficiency. You can read more general info 2. Implementation of Triton TBE Forward For each table and bag, forward gathers the indexed rows, optionally multiplies them by per-sample weights, accumulates them in FP32 (FP64 for FP32 weights), and writes one D-wide pooled output. We built two implementations: a generic gather and a fast path implementation with a small-table histogram. programs. Each program loops over T features instead of launching a B×T grid. The inner loop issues four independent row loads. The tuned two-bag path issues eight Large non-VBE, non-FP32 workloads use two bags per program. When a histogram feature is split out, the remaining generic feature ranges use four. Other shapes use one TorchRec accepts config-driven int32 indices and offsets when the linearized range fits below 2^31. This halves index/offset storage and the CUB radix-sort key width while keeping int64 as the default

更多技术细节可访问官方原文:https://pytorch.org/blog/modernizing-table-batched-embeddings-with-fbtriton/。

code · 免费+付费
★ 5.0 · 120评测
P

PyTorch

开源的机器学习库

PyTorch 是开源的机器学习库,主要用在深度学习研究和应用开发,以灵活性、易用性和强大的 GPU 加速功能而闻名。PyTorch 提供动态计算图,支持开发者在运行时动态修改模型结构,非常适合快速开发和实验。PyTorch 支持张量计算、自动微分(torch.autograd)和模块化的神经网络构建(torch.nn)。PyTorch 拥有丰富的社区支持和大量的预训练模型及教程,是学术界和工业界的首选深度学习框架之一。

查看 PyTorch 使用教程与功能