PyTorch开源IBM Spyre数据流调度器v1
PyTorch博客称,开源Dataflow调度器第1版可将KTIR程序转换为数据流流水线,并通过DataflowIR编译为面向IBM Spyre加速器的SpyreCode。该版本支持多核逐元素运算、广播和归约维度,并在代表性Transformer操作上完成端到端验证。矩阵乘法支持和基于成本模型的性能优化仍在开发中。
该项目提供了一个连接PyTorch工作流与IBM Spyre的开源MLIR数据流后端。报告称,端到端运行LLM是目标而非已展示的能力,矩阵乘法支持也仍在完善中。
TL;DR
Torch-spyre’s Inductor decides how each kernel’s work is divided across Spyre’s cores and manages tensor residency between on-chip scratchpad and off-chip memory, and the backend compiler turns those decisions into something the hardware can actually run. The contract between them is represented using KTIR (Kernel Tile IR), an MLIR representation built on a data-parallel view of the accelerator, in which every compute tile can see every memory and a single logical tensor can live spread across several cores’ scratchpads. A new open-source Dataflow Scheduler consumes KTIR and turns each tile’s work into a dataflow pipeline: it splits the kernel into programs, starts from a simple load → compute → store pipeline, routes every transfer through the memory hierarchy given in an architecture description, and expands that pipeline into a nested, double-buffered, multi-instance schedule. The output of the scheduler is represented using DataflowIR, an MLIR intermediate representation that Spyre’s device-specific stages use to produce SpyreCode, a symbolic SpyreBinary plus a job plan that the Spyre runtime prepares once and launches many times, filling in tensor addresses and shapes at launch.
#PyTorch#IBM Spyre#torch-spyre#Dataflow Scheduler#KTIR#DataflowIR#SpyreCode#Triton