[Paper Review] Tensor processing primitives: a programming abstraction for efficiency and portability in deep learning workloads
This paper introduces Tensor Processing Primitives (TPP), a portable, high-performance programming abstraction for deep learning workloads that uses a compact set of 2D-tensor operators as building blocks for complex, high-dimensional operations. TPP enables efficient, platform-agnostic implementations that outperform state-of-the-art kernels across multiple platforms.
During the past decade, novel Deep Learning (DL) algorithms/workloads and hardware have been developed to tackle a wide range of problems. Despite the advances in workload/hardware ecosystems, the programming methodology of DL systems is stagnant. DL workloads leverage either highly-optimized, yet platform-specific and inflexible kernels from DL libraries, or in the case of novel operators, reference implementations are built via DL framework primitives with underwhelming performance. This work introduces the Tensor Processing Primitives (TPP), a programming abstraction striving for efficient, portable implementation of DL workloads with high-productivity. TPPs define a compact, yet versatile set of 2D-tensor operators (or a virtual Tensor ISA), which subsequently can be utilized as building-blocks to construct complex operators on high-dimensional tensors. The TPP specification is platform-agnostic, thus code expressed via TPPs is portable, whereas the TPP implementation is highly-optimized and platform-specific. We demonstrate the efficacy of our approach using standalone kernels and end-to-end DL workloads expressed entirely via TPPs that outperform state-of-the-art implementations on multiple platforms.
Motivation & Objective
- Address the stagnation in deep learning programming methodologies despite advances in DL algorithms and hardware.
- Overcome the limitations of platform-specific, inflexible kernels in existing DL libraries.
- Provide a high-productivity programming abstraction that enables portable yet highly optimized implementations of complex DL operators.
- Bridge the gap between performance portability and developer productivity in DL system development.
Proposed method
- Define a minimal, platform-agnostic set of 2D-tensor operators (the virtual Tensor ISA) as the core abstraction for building complex DL workloads.
- Use these primitives as building blocks to express higher-dimensional operations through composition and tiling.
- Implement TPPs with highly optimized, platform-specific kernels to ensure high performance.
- Decouple the high-level specification (TPP) from low-level implementation, enabling portability while maintaining performance.
- Demonstrate end-to-end DL workloads and standalone kernels fully expressed via TPPs.
- Evaluate performance across multiple platforms to validate efficiency and portability.
Experimental results
Research questions
- RQ1Can a minimal, portable set of 2D-tensor operators serve as an effective abstraction for implementing complex deep learning workloads?
- RQ2To what extent can TPPs achieve performance comparable to or better than hand-optimized, platform-specific kernels?
- RQ3How does the separation of specification (TPP) from implementation enable both portability and high performance?
- RQ4Can end-to-end deep learning workloads be efficiently and portably expressed using only TPP primitives?
Key findings
- TPP-based implementations of standalone kernels outperform state-of-the-art, hand-optimized implementations on multiple platforms.
- End-to-end deep learning workloads expressed entirely via TPPs achieve competitive or superior performance compared to existing optimized frameworks.
- The platform-agnostic specification of TPP ensures code portability across diverse hardware targets without sacrificing performance.
- The abstraction enables high productivity by allowing developers to express complex operations using a small, consistent set of primitives.
- The separation of specification and implementation allows for targeted optimization of TPP kernels per platform while preserving interface compatibility.
- The approach demonstrates that high-performance and portability in deep learning systems are not mutually exclusive.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.