[go: up one dir, main page]
More Web Proxy on the site http://driver.im/ skip to main content
10.1145/3318170.3318178acmotherconferencesArticle/Chapter ViewAbstractPublication PagesiwoclConference Proceedingsconference-collections
research-article

Exploring Integer Sum Reduction using Atomics on Intel CPU

Published: 13 May 2019 Publication History

Abstract

Atomic functions are useful in updating a shared variable by multiple threads, barrier synchronizations, constructing complex data structures, and building high-level frameworks. In this paper, we focus on the evaluation and analysis of integer sum reduction, a common data parallel primitive. We convert the sequential reduction into parallel OpenCL implementations on a CPU. To understand the relationships between the kernel performance and the operations involved in reduction, we develop three microkernels that show the costs of one atomic addition to global memory from one work-item per work-group, a work-group barrier, and reducing within a work-group to local memory using one atomic addition per work-item. The sum reduction kernel with vectorized memory accesses can improve the performance of the baseline kernel for a wide range of work-group sizes. However, the vectorization efficiency shrinks with the growing work-group size. We also find that the vendor's default OpenCL kernel optimization does not improve the kernel performance. When the vectorization width is 16, the performance speedup of our manual vectorization over the vendor's auto-vectorization ranges from 1.03 to 16.7. We attribute the performance drop to the fact that the default kernel optimizations instantiate a large number of atomics operations.

References

[1]
Xiao, S. and Feng, W.C., 2010, April. Inter-block GPU communication via fast barrier synchronization. In Parallel & Distributed Processing (IPDPS), 2010 IEEE International Symposium on (pp. 1--12). IEEE
[2]
Michael, M.M., 2002, August. High performance dynamic lock-free hash tables and list-based sets. In Proceedings of the fourteenth annual ACM symposium on Parallel algorithms and architectures (pp. 73--82). ACM.
[3]
Hong, C., Chen, D., Chen, W., Zheng, W. and Lin, H., 2010, September. MapCG: writing parallel program portable between CPU and GPU. In Proceedings of the 19th international conference on Parallel architectures and compilation techniques (pp. 217--226). ACM
[4]
Stone, J.E., Gohara, D. and Shi, G., 2010. OpenCL: A parallel programming standard for heterogeneous computing systems. Computing in science & engineering, 12(3), pp. 66--73.
[5]
Munshi, A., Gaster, B., Mattson, T.G. and Ginsburg, D., 2011. OpenCL programming guide. Pearson Education.
[6]
Khronos OpenCL Working Group, The OpenCL Specification, version 1.2, 15 November 2011. Cited on pages, 18(7), p. 30
[7]
Work-Group Size Considerations, OpenCL Developer Guide for Intel Core and Intel Xeon Processors. https://software.intel.com/en-us/node/540512
[8]
Threading: Achieving Work-Group Level Parallelism, OpenCL Developer Guide for Intel Core and Intel Xeon Processors. https://software.intel.com/en-us/iocl-tec-opg-threading-achieving-work-group-level-parallelism
[9]
Mark, H., 2008. Optimizing parallel reduction in CUDA. NVIDIA CUDA SDK.
[10]
https://developer.amd.com/resources/articles-whitepapers/opencl-optimization-case-study-simple-reductions/
[11]
Martín, P.J., Ayuso, L.F., Torres, R. and Gavilanes, A., 2012, July. Algorithmic strategies for optimizing the parallel reduction primitive in CUDA. In High Performance Computing and Simulation (HPCS), 2012 International Conference on (pp. 511--519). IEEE.
[12]
Egielski, I.J., Huang, J. and Zhang, E.Z., 2015. Massive atomics for massive parallelism on GPUs. ACM SIGPLAN Notices, 49(11), pp. 93--103
[13]
Elteir, M., Lin, H. and Feng, W.C., 2011, September. Performance characterization and optimization of atomic operations on AMD GPUs. In Cluster Computing (CLUSTER), 2011 IEEE International Conference on (pp. 234--243). IEEE
[14]
Jin, Z. and Finkel, H., 2018, June. A Case Study of Integer Sum Reduction using Atomics. In Proceedings of the 9th International Symposium on Highly-Efficient Accelerators and Reconfigurable Technologies (p. 15). ACM.
[15]
Jin, Z. and Finkel, H., 2018, May. Optimizing an Atomics-Based Reduction Kernel on OpenCL FPGA Platform. In 2018 IEEE International Parallel and Distributed Processing Symposium Workshops (IPDPSW) (pp. 532--539). IEEE.
[16]
Jin, Z. and Finkel, H., 2018, May. Optimizing Parallel Reduction on OpenCL FPGA Platform -- A Case Study of Frequent Pattern Compression. In 2018 IEEE International Parallel and Distributed Processing Symposium Workshops (IPDPSW) (pp. 27--35). IEEE.
[17]
Wang, Z., He, B. and Zhang, W., 2015, September. A study of data partitioning on OpenCL-based FPGAs. In Field Programmable Logic and Applications (FPL), 2015 25th International Conference on (pp. 1--8). IEEE.
[18]
Ramanathan, N., Wickerson, J., Winterstein, F. and Constantinides, G.A., 2016, February. A case for work-stealing on FPGAs with OpenCL atomics. In Proceedings of the 2016 ACM/SIGDA International Symposium on Field-Programmable Gate Arrays (pp. 48--53). ACM
[19]
Jin, Z. and Finkel, H., 2018, May. Nuclear Reactor Simulation on OpenCL FPGA: a Case Study of RSBench. In Proceedings of the International Workshop on OpenCL (p. 2). ACM.

Cited By

View all

Index Terms

  1. Exploring Integer Sum Reduction using Atomics on Intel CPU

    Recommendations

    Comments

    Please enable JavaScript to view thecomments powered by Disqus.

    Information & Contributors

    Information

    Published In

    cover image ACM Other conferences
    IWOCL '19: Proceedings of the International Workshop on OpenCL
    May 2019
    102 pages
    ISBN:9781450362306
    DOI:10.1145/3318170
    Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

    In-Cooperation

    • Khronos: Khronos Group
    • Northeastern University
    • Codeplay: Codeplay Software Ltd.
    • Intel: Intel
    • The University of Bristol: The University of Bristol

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    Published: 13 May 2019

    Permissions

    Request permissions for this article.

    Check for updates

    Author Tags

    1. Atomics
    2. CPU
    3. Integer Sum reduction
    4. OpenCL
    5. Vectorization

    Qualifiers

    • Research-article
    • Research
    • Refereed limited

    Conference

    IWOCL'19
    IWOCL'19: International Workshop on OpenCL
    May 13 - 15, 2019
    MA, Boston, USA

    Acceptance Rates

    IWOCL '19 Paper Acceptance Rate 13 of 33 submissions, 39%;
    Overall Acceptance Rate 84 of 152 submissions, 55%

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • 0
      Total Citations
    • 92
      Total Downloads
    • Downloads (Last 12 months)10
    • Downloads (Last 6 weeks)1
    Reflects downloads up to 18 Dec 2024

    Other Metrics

    Citations

    Cited By

    View all

    View Options

    Login options

    View options

    PDF

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader

    Media

    Figures

    Other

    Tables

    Share

    Share

    Share this Publication link

    Share on social media