Skip to main content
QUICK REVIEW

[Paper Review] Task-Based Algorithm for Matrix Multiplication: A Step Towards Block-Sparse Tensor Computing

Justus A. Calvin, Edward F. Valeev|arXiv (Cornell University)|Apr 20, 2015
Parallel Computing and Optimization TechniquesComputer Science38 references7 citations
TL;DR

This paper presents a task-based reformulation of the Scalable Universal Matrix Multiplication Algorithm (SUMMA) that enables efficient, scalable matrix multiplication on distributed-memory systems with irregular, block-sparse data structures. By using fine-grained task parallelism and multiple-issue scheduling, the approach tolerates load imbalance from nonuniform matrix blocking and achieves up to 75% efficiency on up to 262,144 cores, demonstrating strong performance on both commodity and high-end HPC systems.

ABSTRACT

Distributed-memory matrix multiplication (MM) is a key element of algorithms in many domains (machine learning, quantum physics). Conventional algorithms for dense MM rely on regular/uniform data decomposition to ensure load balance. These traits conflict with the irregular structure (block-sparse or rank-sparse within blocks) that is increasingly relevant for fast methods in quantum physics. To deal with such irregular data we present a new MM algorithm based on Scalable Universal Matrix Multiplication Algorithm (SUMMA). The novel features are: (1) multiple-issue scheduling of SUMMA iterations, and (2) fine-grained task-based formulation. The latter eliminates the need for explicit internodal synchronization; with multiple-iteration scheduling this allows load imbalance due to nonuniform matrix structure. For square MM with uniform and nonuniform block sizes (the latter simulates matrices with general irregular structure) we found excellent performance in weak and strong-scaling regimes, on commodity and high-end hardware.

Motivation & Objective

  • To address the challenge of load imbalance in distributed-memory matrix multiplication when matrices exhibit irregular, block-sparse structures common in quantum physics and tensor computing.
  • To develop a communication-avoiding, latency-tolerant matrix multiplication algorithm that can handle data inhomogeneity without sacrificing performance on dense or uniformly blocked matrices.
  • To enable efficient computation on irregular tensorial data structures by reformulating standard dense MM algorithms using task-based parallelism.
  • To demonstrate strong and weak scaling performance across diverse hardware, including commodity clusters and the IBM BG/Q supercomputer.

Proposed method

  • Reformulate the standard SUMMA algorithm using a fine-grained task-based programming model to decouple computation from synchronization.
  • Implement multiple-issue scheduling of SUMMA iterations to allow overlapping of computation and communication across nodes.
  • Use a task graph to represent matrix multiplication operations, enabling dynamic load balancing and tolerance to irregular data distributions.
  • Leverage existing optimized BLAS kernels (e.g., DGEMM) as computational primitives within the task-based framework.
  • Integrate the algorithm into the open-source TiledArray library to support general-purpose tensor computing with support for user-defined types and block structures.
  • Apply data over-decomposition to reduce per-process load imbalance despite large variations in block sizes.

Experimental results

Research questions

  • RQ1Can a task-based reformulation of SUMMA effectively handle non-uniform, block-sparse matrix structures while maintaining high performance on dense matrices?
  • RQ2How does task-based parallelism improve load balancing and communication hiding in distributed-memory matrix multiplication with irregular data?
  • RQ3To what extent can multiple-issue scheduling of SUMMA iterations mitigate performance degradation due to data inhomogeneity and network latency?
  • RQ4What is the strong and weak scaling behavior of the task-based SUMMA implementation on high-end and commodity HPC systems?
  • RQ5How does the algorithm’s efficiency compare to single-node peak performance across varying core counts and matrix sizes?

Key findings

  • The task-based SUMMA implementation achieved 90.98% of theoretical peak performance on a single node using Intel MKL, demonstrating high computational efficiency.
  • On the IBM BG/Q system, the algorithm maintained over 75% efficiency across a wide range of matrix sizes and core counts, even with nonuniform blocking.
  • Efficiency dropped to as low as 50% in the strong scaling limit when each core had four or fewer matrix blocks, due to task granularity constraints.
  • Despite a minimum-to-maximum block size ratio of up to 1:7.12 in nonuniform matrices, per-process load imbalance was reduced to 1:1.35 due to data over-decomposition.
  • The algorithm scaled effectively on up to 262,144 cores (2^18), with performance remaining stable across both uniform and nonuniform blocking patterns.
  • The implementation demonstrated robustness to hardware heterogeneity and network latency, with performance less sensitive to topology and CPU clock variations.

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.