How Spyre is integrated as a native PyTorch device

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

IBM describes integrating Spyre as a native PyTorch device: torch-spyre connects PyTorch abstractions for devices, memory, streams, and compilation to the Spyre runtime and firmware. The aim is to keep tensors on the accelerator and use the same integration path for eager and compiled execution.

According to the post, Spyre is IBM’s dataflow accelerator for inference. Its hardware has 32 cores with local scratchpad memory, while up to 128 GB of LPDDR5 holds tensors and programs. The runtime manages LPDDR5, and the compiler prepares data movement between that memory and the cores’ local storage.

PrivateUse1 gives Spyre its own device identity in PyTorch. A backend allocator manages device memory, allowing PyTorch tensors to retain their device placement and lifetime. Streams order operations, while events connect dependent work across separate compute and transfer pipelines. Because compute jobs share one runtime queue, the described overlap comes from transferring data during computation, not from running independent compute jobs in parallel.

FX graphs remain in the Inductor compiler path. A compiled program is translated once into a prepared sequence of typed operations that can be launched for each invocation. The post explains this architecture and why it avoids an additional runtime graph; the supplied text does not report measured performance results. Original post on the PyTorch blog

🇬🇧 https://pytorch.org/blog/building-spyre-as-a-native-pytorch-device

Leave a Comment

The weekly brief: selected developments, projects and videos