Skip to main content
QUICK 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 Techniques被引用 1
一句话总结

Cpp-Taskflow 是一个基于 C++ 的任务编程系统,通过支持静态和动态任务调度的灵活任务图模型,实现高性能、异构并行计算。在 40 个 CPU 和 4 个 GPU 的系统上,针对大规模机器学习工作负载,其执行速度比 oneTBB 和 StarPU 快达 1.5 倍,内存使用减少 1.6 倍,代码行数减少 1.7 倍。

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.

研究动机与目标

  • 为解决编写高性能、高 productivity 的并行和异构程序的挑战。
  • 简化混合 CPU-GPU 执行和动态控制流等复杂计算模式的开发。
  • 通过适应运行时并行性,实现跨多样化硬件的高效任务调度。
  • 相比现有工业级任务系统,在降低代码复杂度的同时提升性能。

提出的方法

  • 该系统采用通用任务编程模型,支持静态和动态任务图的构建。
  • 采用异构工作窃取策略,在执行过程中根据可用任务并行性自适应调整工作线程。
  • 通过灵活的任务依赖关系,集成对不规则和动态计算模式的支持。
  • 运行时高效管理任务在 CPU 和 GPU 之间的分发,最大限度减少同步开销。
  • 提供原生 C++ API,支持表达性强、高层次的任务组合,且样板代码极少。
  • 系统通过根据运行时条件在可用执行单元间重新分配任务,实现动态负载均衡。

实验结果

研究问题

  • RQ1如何设计一种支持异构系统中静态和动态任务图的任务编程模型?
  • RQ2何种调度策略能实现在动态工作负载下 CPU 和 GPU 之间的高效负载均衡?
  • RQ3统一的任务系统是否能在性能、内存使用和代码简洁性方面超越专用工业系统?
  • RQ4该系统如何在异构环境中处理不规则和结构不规则的计算模式?
  • RQ5单一任务框架在不牺牲性能的前提下,能在多大程度上降低开发复杂度?

主要发现

  • 在 40 个 CPU 和 4 个 GPU 的机器上,Cpp-Taskflow 在大规模机器学习工作负载中,执行速度比 oneTBB 和 StarPU 快达 1.5 倍。
  • 在相同工作负载下,与两个工业系统相比,该系统内存使用量最高减少 1.6 倍。
  • 与 oneTBB 和 StarPU 相比,代码量减少最多达 1.7 倍,表明开发效率显著提升。
  • 异构工作窃取策略在运行时执行过程中,能有效适应动态任务并行性。
  • 该系统成功以极低性能开销支持复杂的计算模式,如混合 CPU-GPU 计算和动态控制流。
  • 任务图模型支持不规则和数据依赖型计算工作流的高效实现。

更好的研究,从现在开始

从论文设计到论文写作,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。