A Novel CPU-GPU Cooperative Implementation of A Parallel Two-List Algorithm for the Subset-Sum Problem

  • Authors:
  • Lanjun Wan;Kenli Li;Jing Liu;Keqin Li

  • Affiliations:
  • Hunan University, Hunan 410082, China;Hunan University, Hunan 410082, China;Hunan University, Hunan 410082, China;Hunan University, Hunan 410082, China and State University of New York, New Paltz, New York 12561

  • Venue:
  • Proceedings of Programming Models and Applications on Multicores and Manycores
  • Year:
  • 2014

Quantified Score

Hi-index 0.00

Visualization

Abstract

The subset-sum problem is a well-known NP-complete decision problem. Many parallel algorithms have been developed to solve the problem within a reasonable computation time, and some of them have been implemented on a GPU. However, the GPU implementations of these parallel algorithms may fail to fully utilize all the CPU cores and the GPU resources at the same time. When the GPU performs some tasks, only one CPU core is used to control the GPU, all the rest of CPU cores are in idle state, this leads to large amounts of available CPU resources are wasted. This paper proposes a novel CPU-GPU cooperative implementation of a parallel two-list algorithm to efficiently solve the subset-sum problem in a heterogeneous CPU-GPU system, which enables the efficient utilization of all the available computational resources of both CPUs and GPUs. In order to find the most appropriate task distribution ratio between CPUs and GPUs, this paper establishes an optimal task distribution model. A series of experiments are conducted on two different hardware platforms. The experimental results show that the CPU-GPU cooperative implementation produces a speedup factor of 9.2 over the best sequential implementation, achieves up to 96.3% performance improvement over the optimized CPU-only implementation, and yields up to 25.7% performance improvement over the optimized GPU-only implementation.