Skip to main content
QUICK REVIEW

[Paper Review] FusionStitching: Boosting Memory Intensive Computations for Deep Learning Workloads

Zhen Zheng, Pengzhan Zhao|arXiv (Cornell University)|Sep 23, 2020
Advanced Neural Network ApplicationsComputer Science46 references12 citations
TL;DR

FusionStitching is a JIT deep learning compiler that optimizes memory-intensive deep learning workloads by fusing operators with complex data dependencies and non-homogeneous parallelism into large GPU kernels. It enables intermediate value reuse via shared memory and register-shuffle, reduces off-chip memory access and context switch overhead, and achieves up to 2.21× speedup over state-of-the-art techniques with a 1.45× average improvement.

ABSTRACT

We show in this work that memory intensive computations can result in severe performance problems due to off-chip memory access and CPU-GPU context switch overheads in a wide range of deep learning models. For this problem, current just-in-time (JIT) kernel fusion and code generation techniques have limitations, such as rough fusion plan exploration strategies and limited code generation ability. We propose FusionStitching, a deep learning compiler capable of fusing memory intensive operators, with varied data dependencies and non-homogeneous parallelism, into large GPU kernels to reduce global memory access and context switch overhead automatically. FusionStitching widens the range of operation combinations that fusion can target beyond previous JIT works by introducing data reuse of intermediate values. It explores large fusion spaces to decide optimal fusion plans with considerations of memory access costs, kernel calls and resource usage constraints. FusionStitching tunes the optimal stitching scheme with a domain-specific cost model efficiently. Experimental results show that FusionStitching can reach up to 2.21x speedup compared to state-of-the-art, with 1.45x on average. Besides these experimental results, we integrated our approach into a compiler product and deployed it onto a production cluster for AI workloads with thousands of GPUs. The system has been in operation for more than 4 months and saves 7,000 GPU hours on average for approximately 30,000 tasks per month.

Motivation & Objective

  • Address the performance bottleneck caused by off-chip memory access and CPU-GPU context switches in memory-intensive deep learning operators.
  • Overcome limitations of existing JIT fusion techniques, such as narrow fusion space and lack of data reuse support.
  • Enable efficient fusion of complex, diverse combinations of memory-intensive ops (e.g., element-wise, transpose, reduction) with varied data dependencies and parallelism.
  • Develop a scalable, domain-specific cost model and tuning framework for optimal fusion plan selection and high-performance kernel generation.
  • Integrate and validate the system in a production AI cluster environment to demonstrate real-world performance and resource savings.

Proposed method

  • Introduce four stitching scheme abstractions to model diverse fusion patterns involving memory-intensive operators with complex dependencies and non-homogeneous parallelism.
  • Enable intermediate value reuse across threads using on-chip memory (shared memory) and register-shuffle to reduce recomputation overhead.
  • Design a two-layer domain-specific cost model to guide fusion space exploration by estimating memory access cost, kernel launch cost, and resource usage.
  • Implement a fusion explorer that performs intelligent, cost-driven search over a large fusion space, avoiding greedy local optima.
  • Develop a code generator that maps fusion plans to optimized GPU kernels with schedule tuning for performance.
  • Integrate FusionStitching into the XLA framework to support dynamic shapes and production deployment.

Experimental results

Research questions

  • RQ1How can intermediate data reuse be systematically exploited in JIT fusion of memory-intensive deep learning operators?
  • RQ2What fusion patterns and cost models enable optimal trade-offs between memory access, kernel launch overhead, and resource usage in complex, dynamic workloads?
  • RQ3Can a JIT fusion framework with advanced exploration and code generation outperform rule-based or greedy approaches in real-world deep learning models?
  • RQ4To what extent can intermediate value reuse and on-chip memory utilization reduce off-chip memory traffic and context switch overhead?
  • RQ5How effective is the proposed fusion framework in production-scale AI workloads with dynamic shapes and high operator diversity?

Key findings

  • FusionStitching achieves up to 2.21× speedup and 1.45× average speedup over state-of-the-art JIT optimization techniques on real-world deep learning models.
  • The system reduces GPU kernel launch overhead and off-chip memory access by fusing diverse memory-intensive operators into single, highly optimized kernels.
  • By enabling intermediate value reuse through shared memory and register-shuffle, FusionStitching avoids redundant computation that plagues existing JIT tools like XLA.
  • The framework successfully integrates into a production XLA-based compiler stack and has been operational in a cluster with thousands of GPUs for over four months.
  • The deployment saved approximately 7,000 GPU hours per month across 30,000 tasks, demonstrating significant real-world efficiency gains.
  • The domain-specific cost model enables effective fusion plan selection with low tuning overhead, even for dynamic shapes and complex operator combinations.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.