Create

Sign in to ReadmeX

or

How we handle your data: Privacy Policy

ReadmeX

Your AI reading companion

What would you like to catch up on?

Pick a briefing, or ask your own question.

Your community and people briefings stay personal to you.

Story

torch-spyre moves its compiler onto PyTorch Inductor

AI summary

A PyTorch blog post explains that torch-spyre, the PyTorch integration for IBM's Spyre accelerator, has moved its torch.compile backend from sendnn — a compilation stack built entirely from scratch — to backend=inductor, built by extending PyTorch's own open-source Inductor. Most of Inductor carried over untouched, with the work concentrated in three hardware differences: Spyre moves and computes on 128-byte sticks rather than individual elements; each of its 32 cores has only a 2MB local scratchpad with no hardware-managed caching, so every data movement must be an explicit compiler-emitted instruction; and the cores run as a static dataflow machine, so work division must be decided at compile time. The authors say the resulting compiler is roughly 7x smaller than what it replaced, and report that changing input and output tensor tiling cut batched matmul kernel time by 29–69% across batch sizes and shapes when tensors were already resident in device memory. The Spyre passes currently hook Inductor by monkey-patching GraphLowering.codegen(), and the team is working with upstream PyTorch to formalize those extension points.

In-depth insight

It shows how a mainstream open-source compiler stack can be reshaped for a non-GPU inference accelerator, which is directly useful to hardware-backend and compiler engineers.

IBMIBM SpyrePyTorch

Original · 16 min readRead the original
Group chat

No comments yet. Start the conversation.