Skip to main content
QUICK REVIEW

[Paper Review] BLASX: A High Performance Level-3 BLAS Library for Heterogeneous Multi-GPU Computing

Linnan Wang, Wei Wu|arXiv (Cornell University)|Oct 16, 2015
Parallel Computing and Optimization TechniquesComputer Science9 citations
TL;DR

BLASX is a high-performance, backward-compatible Level-3 BLAS library for heterogeneous multi-GPU systems that uses a dynamic, cache- and locality-aware runtime with a novel two-level hierarchical tile cache to minimize communication and maximize concurrency. It achieves linear speedup and outperforms cuBLAS-XT, MAGMA, and SuperMatrix by up to 2.48x in deep learning and 12.75x in MATLAB workloads, with 200% less communication volume.

ABSTRACT

Basic Linear Algebra Subprograms (BLAS) are a set of low level linear algebra kernels widely adopted by applications involved with the deep learning and scientific computing. The massive and economic computing power brought forth by the emerging GPU architectures drives interest in implementation of compute-intensive level 3 BLAS on multi-GPU systems. In this paper, we investigate existing multi-GPU level 3 BLAS and present that 1) issues, such as the improper load balancing, inefficient communication, insufficient GPU stream level concurrency and data caching, impede current implementations from fully harnessing heterogeneous computing resources; 2) and the inter-GPU Peer-to-Peer(P2P) communication remains unexplored. We then present BLASX: a highly optimized multi-GPU level-3 BLAS. We adopt the concepts of algorithms-by-tiles treating a matrix tile as the basic data unit and operations on tiles as the basic task. Tasks are guided with a dynamic asynchronous runtime, which is cache and locality aware. The communication cost under BLASX becomes trivial as it perfectly overlaps communication and computation across multiple streams during asynchronous task progression. It also takes the current tile cache scheme one step further by proposing an innovative 2-level hierarchical tile cache, taking advantage of inter-GPU P2P communication. As a result, linear speedup is observable with BLASX under multi-GPU configurations; and the extensive benchmarks demonstrate that BLASX consistently outperforms the related leading industrial and academic projects such as cuBLAS-XT, SuperMatrix, MAGMA and PaRSEC.

Motivation & Objective

  • Address the suboptimal performance of existing multi-GPU Level-3 BLAS libraries due to poor load balancing, inefficient communication, and lack of GPU stream concurrency.
  • Overcome the limitations of current implementations in heterogeneous GPU environments where GPU capabilities and real-time performance vary.
  • Minimize CPU-GPU communication by leveraging GPU-to-GPU Peer-to-Peer (P2P) access and introducing a two-level hierarchical tile cache.
  • Enable backward compatibility with existing CPU BLAS-based applications while abstracting low-level complexities like task scheduling and memory management.
  • Achieve linear scalability and high performance across diverse multi-GPU systems, including heterogeneous configurations with Kepler and Maxwell GPUs.

Proposed method

  • Adopt tile-based algorithms where matrices are partitioned into tiles, and operations on tiles are treated as atomic tasks for fine-grained parallelism.
  • Employ a dynamic asynchronous runtime that is cache- and locality-aware, enabling adaptive task scheduling to balance workloads across heterogeneous GPUs.
  • Implement a two-level hierarchical tile cache: L1 cache uses GPU onboard memory, and L2 cache aggregates multi-GPU memory, reducing CPU-GPU data movement.
  • Design a new LRU replacement algorithm and cache coherence protocol to maintain data consistency under asynchronous task execution across GPUs.
  • Overlap communication and computation across multiple GPU streams using asynchronous task progression, making communication cost negligible.
  • Expose a single tuning parameter—tile size—to optimize performance across platforms with minimal user effort, balancing GPU saturation, PCI-E efficiency, and parallelism.

Experimental results

Research questions

  • RQ1How can load imbalance across heterogeneous GPUs be effectively mitigated in multi-GPU Level-3 BLAS implementations?
  • RQ2To what extent can communication overhead be reduced and hidden through overlapping with computation in multi-GPU systems?
  • RQ3Can a two-level hierarchical tile cache effectively reduce CPU-GPU communication by leveraging GPU-to-GPU P2P access?
  • RQ4How does BLASX achieve backward compatibility with existing CPU BLAS-based applications while delivering superior performance on multi-GPU systems?
  • RQ5What is the impact of tile size on performance, and can a single tile size configuration deliver optimal performance across diverse hardware platforms?

Key findings

  • BLASX achieves linear speedup on multi-GPU systems, including heterogeneous configurations with 2 K40 and 2 TITAN X GPUs, while cuBLAS-XT, MAGMA, and SuperMatrix show poor scalability.
  • On the Everest system with 3 K40c GPUs, BLASX consistently outperforms academic implementations like SuperMatrix, MAGMA, and PaRSEC in DGEMM performance.
  • Compared to NVIDIA’s cuBLAS-XT, BLASX delivers an average 25% performance gain and reduces communication volume by 200%.
  • In Caffe, BLASX accelerates deep learning training by up to 2.48x compared to GPU-only Caffe and 62.3x compared to CPU-only Caffe, enabling models with up to 3.2×10^10 parameters.
  • In MATLAB, BLASX accelerates matrix multiplication (single precision) by 12.75x and double-precision operations by 8.27x on the Everest system.
  • The performance of BLASX is maximized at a tile size of 1024×1024, which balances GPU saturation, PCI-E efficiency, and available parallelism.

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.