Skip to main content
QUICK REVIEW

[Paper Review] Cpp-Taskflow: A General-purpose Parallel and Heterogeneous Task Programming System at Scale

Tsung‐Wei Huang, Dian-Lun Lin|arXiv (Cornell University)|Apr 23, 2020
Parallel Computing and Optimization TechniquesComputer Science1 citations
TL;DR

Cpp-Taskflow is a C++-based task programming system that enables high-performance, heterogeneous parallel computing through a flexible task graph model supporting both static and dynamic task scheduling. It achieves up to 1.5x faster execution, 1.6x less memory usage, and 1.7x fewer lines of code than oneTBB and StarPU on a 40-CPU, 4-GPU system for large-scale machine learning workloads.

ABSTRACT

The Taskflow project addresses the long-standing question: How can we make it easier for developers to write parallel and heterogeneous programs with high performance and simultaneous high productivity? Taskflow develops a simple and powerful task programming model to enable efficient implementations of heterogeneous decomposition strategies. Our programming model empowers users with both static and dynamic task graph constructions to incorporate a broad range of computational patterns including hybrid CPU-GPU computing, dynamic control flow, and irregularity. We develop an efficient heterogeneous work-stealing strategy that adapts worker threads to available task parallelism at any time during the graph execution. We have demonstrated promising performance of Taskflow on both micro-benchmark and real-world applications. As an example, we solved a large machine learning workload by up to 1.5x faster, 1.6x less memory, and 1.7x fewer lines of code than two industrial-strength systems, oneTBB and StarPU, on a machine of 40 CPUs and 4 GPUs.

Motivation & Objective

  • To address the challenge of writing high-performance, productive parallel and heterogeneous programs.
  • To simplify the development of complex computational patterns such as hybrid CPU-GPU execution and dynamic control flow.
  • To enable efficient task scheduling across diverse hardware by adapting to runtime parallelism.
  • To reduce code complexity while improving performance compared to existing industrial tasking systems.

Proposed method

  • The system uses a general-purpose task programming model supporting both static and dynamic task graph construction.
  • It employs a heterogeneous work-stealing strategy that adapts worker threads to available task parallelism during execution.
  • Taskflow integrates support for irregular and dynamic computational patterns through flexible task dependencies.
  • The runtime efficiently manages task distribution across CPUs and GPUs, minimizing synchronization overhead.
  • It provides a C++-native API that enables expressive, high-level task composition with minimal boilerplate.
  • The system dynamically balances workloads by redistributing tasks across available execution units based on runtime conditions.

Experimental results

Research questions

  • RQ1How can we design a task programming model that supports both static and dynamic task graphs for heterogeneous systems?
  • RQ2What scheduling strategy enables efficient load balancing across CPUs and GPUs in dynamic workloads?
  • RQ3Can a unified tasking system outperform specialized industrial systems in performance, memory usage, and code simplicity?
  • RQ4How does the system handle irregular and irregularly structured computational patterns in heterogeneous environments?
  • RQ5To what extent can a single tasking framework reduce development complexity without sacrificing performance?

Key findings

  • Cpp-Taskflow achieved up to 1.5x faster execution than oneTBB and StarPU on a 40-CPU, 4-GPU machine for a large machine learning workload.
  • The system reduced memory usage by up to 1.6x compared to the two industrial systems on the same workload.
  • Code size was reduced by up to 1.7x compared to oneTBB and StarPU, indicating improved productivity.
  • The heterogeneous work-stealing strategy effectively adapts to dynamic task parallelism during runtime execution.
  • The system successfully supports complex patterns like hybrid CPU-GPU computing and dynamic control flow with minimal performance overhead.
  • The task graph model enables efficient implementation of irregular and data-dependent computational workflows.

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.