Extending PyTorch Inductor for IBM’s Spyre Accelerator

News PyTorch Blog · Source account, not independently verified by us.

IBM’s PyTorch integration for its Spyre AI accelerator has moved the torch.compile backend from sendnn, a separately built compiler, to an extended version of Inductor. PyTorch says most of Inductor carried over unchanged and that the replacement compiler is roughly seven times smaller. The project illustrates how PyTorch’s compiler can be adapted to different hardware, while still requiring targeted extensions.

Spyre is a 75-watt inference accelerator with 32 cores and local memory on each core. Unlike a GPU, it moves data in fixed 128-byte units called sticks. The compiler must also plan data transfers between device memory and local storage, and assign work to cores before execution. The Spyre extensions therefore add capabilities including layout assignment, tiling, and scratchpad management.

The authors report that changing the tiling for a batched matrix multiplication reduced kernel time by 29 to 69 percent, depending on batch size and shape. This is a result for that particular case, not a general performance claim. The post also stresses that the migration was not a drop-in replacement: some extensions live outside the PyTorch project.

The article explains the two-stage compiler path from Inductor to SuperDSC and then to the proprietary DeepTools compiler. It also details the hardware-specific compiler phases and work with the PyTorch project to formalize extension points. Source: PyTorch Blog

🇬🇧 https://pytorch.org/blog/extending-inductor-for-the-ibm-spyre-accelerator

Leave a Comment

The weekly brief: selected developments, projects and videos