Stateful Dataflow Multigraphs: a Data-Centric Model for Performance Portability on Heterogeneous Architectures

Total Page:16

File Type:pdf, Size:1020Kb

Load more

Stateful Dataflow Multigraphs: A Data-Centric Model for Performance Portability on Heterogeneous Architectures Tal Ben-Nun, Johannes de Fine Licht, Alexandros N. Ziogas, Timo Schneider, Torsten Hoefler Department of Computer Science, ETH Zurich, Switzerland {talbn,definelicht,alziogas,timos,htor}@inf.ethz.ch ABSTRACT Section 2 Sections 3-4 Sections 5-6 Domain Scientist Performance Engineer System The ubiquity of accelerators in high-performance computing has Problem Formulation Hardware driven programming complexity beyond the skill-set of the average Information = 0 domain scientist. To maintain performance portability in the fu- 2 − Transformed Python / Dataflow SDFG Compiler ture, it is imperative to decouple architecture-specific programming DSLs numpy paradigms from the underlying scientific computations. We present Data-Centric Intermediate TensorFlow MATLAB Representation (SDFG, §3) the Stateful DataFlow multiGraph (SDFG), a data-centric intermedi- CPU Binary Performance * GPU Binary ate representation that enables separating program definition from * Results Runtime SDFG Builder API * its optimization. By combining fine-grained data dependencies with * FPGA Modules * * high-level control-flow, SDFGs are both expressive and amenable High-Level Program Graph Transformations Thin Runtime to program transformations, such as tiling and double-buffering. (API, Interactive, §4) Infrastructure These transformations are applied to the SDFG in an interactive Figure 1: Proposed Development Scheme process, using extensible pattern matching, graph rewriting, and a graphical user interface. We demonstrate SDFGs on CPUs, GPUs, utilization. Programmers would now not only worry about com- and FPGAs over various motifs — from fundamental computational munication (fortunately, the MPI specification grew by less than kernels to graph analytics. We show that SDFGs deliver competitive 4x from MPI-1.0 to 3.1) but also about the much more complex performance, allowing domain scientists to develop applications on-node heterogeneous programming. The sheer number of new naturally and port them to approach peak hardware performance approaches, such as OpenACC, OpenCL, or CUDA demonstrate the without modifying the original scientific code. difficult situation in on-node programming. This increasing com- plexity makes it nearly impossible for domain scientists to write CCS CONCEPTS portable and performant code today. The growing complexity in performance programming led to a • Software and its engineering → Parallel programming lan- specialization of roles into domain scientists and performance engi- guages; Data flow languages; Just-in-time compilers; • Human- neers. Performance engineers typically optimize codes by moving centered computing → Interactive systems and tools. functionality to performance libraries such as BLAS or LAPACK. If ACM Reference Format: this is insufficient, they translate the user-code to optimized ver- Tal Ben-Nun, Johannes de Fine Licht, Alexandros N. Ziogas, Timo Schneider, sions, often in different languages such as assembly code, CUDA, Torsten Hoefler. 2019. Stateful Dataflow Multigraphs: A Data-Centric Model or tuned OpenCL. Both libraries and manual tuning reduce code for Performance Portability on Heterogeneous Architectures. In The Inter- maintainability, because the optimized versions are not only hard national Conference for High Performance Computing, Networking, Storage, to understand for the original author (the domain scientist) but also and Analysis (SC ’19), November 17–22, 2019, Denver, CO, USA. ACM, New York, NY, USA, 18 pages. https://doi.org/10.1145/3295500.3356173 cannot be changed without major effort. Code annotations as used by OpenMP or OpenACC do not 1 MOTIVATION change the original code that then remains understandable to the domain programmer. However, the annotations must re-state (or arXiv:1902.10345v3 [cs.PL] 2 Jan 2020 HPC programmers have long sacrificed ease of programming and modify) some of the semantics of the annotated code (e.g., data place- portability for achieving better performance. This mindset was ment or reduction operators). This means that a (domain scientist) established at a time when computer nodes had a single proces- programmer who modifies the code, must modify some annota- sor/core and were programmed with C/Fortran and MPI. The last tions or she may introduce hard-to-find bugs. With heterogeneous decade, witnessing the end of Dennard scaling and Moore’s law, target devices, it now becomes common that the complexity of brought a flurry of new technologies into the compute nodes. Those annotations is higher than the code they describe [56]. Thus, scien- range from simple multi-core and manycore CPUs to heterogeneous tific programmers can barely manage the complexity of thecode GPUs and specialized FPGAs. To support those architectures, the targeted at heterogeneous devices. complexity of OpenMP’s specification grew by more than an or- The main focus of the community thus moved from scalability der of magnitude from 63 pages in OpenMP 1.0 to 666 pages in to performance portability as a major research target [69]. We call OpenMP 5.0. This one example illustrates how (performance) pro- a code-base performance-portable if the domain scientist’s view gramming complexity shifted from network scalability to node (“what is computed”) does not change while the code is optimized to SC ’19, November 17–22, 2019, Denver, CO, USA different target architectures, achieving consistently high performance. 2019. ACM ISBN 978-1-4503-6229-0/19/11...$15.00 The execution should be approximately as performant (e.g., attaining https://doi.org/10.1145/3295500.3356173 SC ’19, November 17–22, 2019, Denver, CO, USA Ben-Nun et al. similar ratio of peak performance) as the best-known implementation @dace . program def Laplace (A: dace .float64[2,N], A or theoretical best performance on the target architecture [67]. As T: dace . uint32 ): A[t%2, 0:N] [i = 1:N-1] for t in range (T): A[t%2, i-1] A[t%2, i+1] discussed before, hardly any existing programming model that A[t%2,i] for i in dace .map [1:N -1]: t < T; t++ Laplace supports portability to different accelerators satisfies this definition. A[(t+1)%2, i] = \ A[(t+1)%2, i] A[t%2, i-1:i+2] * [1,-2,1] Our Data-centric Parallel Programming (DAPP) concept ad- [i = 1:N-1] A[(t+1)%2, 1:N-1] dresses performance portability. It uses a data-centric viewpoint a = numpy.random.rand(2, 2033) Laplace(A=a, T=500) A of an application to separate the roles of domain scientist and per- t T formance programmer, as shown in Fig. 1. DAPP relies on Stateful ≥ DataFlow multiGraphs (SDFGs) to represent code semantics and (a) Python Representation (b) Resulting SDFG transformations, and supports modifying them to tune for particular Figure 2: Data-Centric Computation of a Laplace Operator target architectures. It bases on the observation that data-movement 2 DATA-CENTRIC PROGRAMMING dominates time and energy in today’s computing systems [66] and pioneers the necessary fundamental change of view in parallel Current approaches in high-performance computing optimizations programming. As such, it builds on ideas of data-centric mappers [66] revolve around improving data locality. Regardless of the un- and schedule annotations such as Legion [9] and Halide [58] and derlying architecture, the objective is to keep information as close extends them with a multi-level visualization of data movement, code as possible to the processing elements and promote memory reuse. transformation and compilation for heterogeneous targets, and strict Even a simple application, such as matrix multiplication, requires separation of concerns for programming roles. The domain program- multiple stages of transformations, including data layout modifica- mer thus works in a convenient and well-known language such as tions (packing) and register-aware caching [33]. Because optimiza- (restricted) Python or MATLAB. The compiler transforms the code tions do not modify computations and differ for each architecture, into an SDFG, on which the performance engineer solely works maintaining performance portability of scientific applications re- on, specifying transformations that match certain data-flow struc- quires separating computational semantics from data movement. tures on all levels (from registers to inter-node communication) SDFGs enable separating application development into two and modify them. Our transformation language can implement stages, as shown in Fig. 2. The problem is formulated as a high-level arbitrary changes to the SDFG and supports creating libraries of program (Fig. 2a), and is then transformed into a human-readable transformations to optimize workflows. Thus, SDFGs separate the SDFG as an Intermediate Representation (IR, Fig. 2b). The SDFG concerns of the domain scientist and the performance engineers can then be modified without changing the original code, and as through a clearly defined interface, enabling highest productivity long as the dataflow aspects do not change, the original code can of both roles. be updated while keeping SDFG transformations intact. What dif- We provide a full implementation of this concept in our Data- ferentiates the SDFG from other IRs is the ability to hierarchically Centric (DaCe) programming environment, which supports (lim- and parametrically view data movement, where scopes in the graph ited) Python, MATLAB, and TensorFlow as frontends, as well as contain overall data requirements. This enables reusing transfor- support for selected
Recommended publications
  • A Taxonomy of Accelerator Architectures and Their

    A Taxonomy of Accelerator Architectures and Their

    A taxonomy of accelerator C. Cas$caval S. Chatterjee architectures and their H. Franke K. J. Gildea programming models P. Pattnaik As the clock frequency of silicon chips is leveling off, the computer architecture community is looking for different solutions to continue application performance scaling. One such solution is the multicore approach, i.e., using multiple simple cores that enable higher performance than wide superscalar processors, provided that the workload can exploit the parallelism. Another emerging alternative is the use of customized designs (accelerators) at different levels within the system. These are specialized functional units integrated with the core, specialized cores, attached processors, or attached appliances. The design tradeoff is quite compelling because current processor chips have billions of transistors, but they cannot all be activated or switched at the same time at high frequencies. Specialized designs provide increased power efficiency but cannot be used as general-purpose compute engines. Therefore, architects trade area for power efficiency by placing in the design additional units that are known to be active at different times. The resulting system is a heterogeneous architecture, with the potential of specialized execution that accelerates different workloads. While designing and building such hardware systems is attractive, writing and porting software to a heterogeneous platform is even more challenging than parallelism for homogeneous multicore systems. In this paper, we propose a taxonomy that allows us to define classes of accelerators, with the goal of focusing on a small set of programming models for accelerators. We discuss several types of currently popular accelerators and identify challenges to exploiting such accelerators in current software stacks.
  • Integration of CUDA Processing Within the C++ Library for Parallelism and Concurrency (HPX)

    Integration of CUDA Processing Within the C++ Library for Parallelism and Concurrency (HPX)

    1 Integration of CUDA Processing within the C++ library for parallelism and concurrency (HPX) Patrick Diehl, Madhavan Seshadri, Thomas Heller, Hartmut Kaiser Abstract—Experience shows that on today’s high performance systems the utilization of different acceleration cards in conjunction with a high utilization of all other parts of the system is difficult. Future architectures, like exascale clusters, are expected to aggravate this issue as the number of cores are expected to increase and memory hierarchies are expected to become deeper. One big aspect for distributed applications is to guarantee high utilization of all available resources, including local or remote acceleration cards on a cluster while fully using all the available CPU resources and the integration of the GPU work into the overall programming model. For the integration of CUDA code we extended HPX, a general purpose C++ run time system for parallel and distributed applications of any scale, and enabled asynchronous data transfers from and to the GPU device and the asynchronous invocation of CUDA kernels on this data. Both operations are well integrated into the general programming model of HPX which allows to seamlessly overlap any GPU operation with work on the main cores. Any user defined CUDA kernel can be launched on any (local or remote) GPU device available to the distributed application. We present asynchronous implementations for the data transfers and kernel launches for CUDA code as part of a HPX asynchronous execution graph. Using this approach we can combine all remotely and locally available acceleration cards on a cluster to utilize its full performance capabilities.
  • Visual Development Environment for Openvx

    Visual Development Environment for Openvx

    ______________________________________________________PROCEEDING OF THE 20TH CONFERENCE OF FRUCT ASSOCIATION Visual Development Environment for OpenVX Alexey Syschikov, Boris Sedov, Konstantin Nedovodeev, Sergey Pakharev Saint Petersburg State University of Aerospace Instrumentation Saint Petersburg, Russia {alexey.syschikov, boris.sedov, konstantin.nedovodeev, sergey.pakharev}@guap.ru Abstract—OpenVX standard has appeared as an answer II. STATE OF THE ART from the computer vision community to the challenge of accelerating vision applications on embedded heterogeneous OpenVX is intended to increase performance and reduce platforms. It is designed as a low-level programming framework power consumption of machine vision applications. It is that enables software developers to leverage the computer vision focused on embedded systems with real-time use cases such as hardware potential with functional and performance portability. face, body and gesture tracking, video surveillance, advanced In this paper, we present the visual environment for OpenVX driver assistance systems (ADAS), object and scene programs development. To the best of our knowledge, this is the reconstruction, augmented reality, visual inspection etc. first time the graphical notation is used for OpenVX programming. Our environment addresses the need to design The using of OpenVX standard functions is a way to ensure OpenVX graphs in a natural visual form with automatic functional portability of the developed software to all hardware generation of a full-fledged program, saving the programmer platforms that support OpenVX. from writing a bunch of a boilerplate code. Using the VIPE visual IDE to develop OpenVX programs also makes it possible to work Since the OpenVX API is based on opaque data types, with our performance analysis tools.
  • GLSL 4.50 Spec

    GLSL 4.50 Spec

    The OpenGL® Shading Language Language Version: 4.50 Document Revision: 7 09-May-2017 Editor: John Kessenich, Google Version 1.1 Authors: John Kessenich, Dave Baldwin, Randi Rost Copyright (c) 2008-2017 The Khronos Group Inc. All Rights Reserved. This specification is protected by copyright laws and contains material proprietary to the Khronos Group, Inc. It or any components may not be reproduced, republished, distributed, transmitted, displayed, broadcast, or otherwise exploited in any manner without the express prior written permission of Khronos Group. You may use this specification for implementing the functionality therein, without altering or removing any trademark, copyright or other notice from the specification, but the receipt or possession of this specification does not convey any rights to reproduce, disclose, or distribute its contents, or to manufacture, use, or sell anything that it may describe, in whole or in part. Khronos Group grants express permission to any current Promoter, Contributor or Adopter member of Khronos to copy and redistribute UNMODIFIED versions of this specification in any fashion, provided that NO CHARGE is made for the specification and the latest available update of the specification for any version of the API is used whenever possible. Such distributed specification may be reformatted AS LONG AS the contents of the specification are not changed in any way. The specification may be incorporated into a product that is sold as long as such product includes significant independent work developed by the seller. A link to the current version of this specification on the Khronos Group website should be included whenever possible with specification distributions.
  • The Importance of Data

    The Importance of Data

    The landscape of Parallel Programing Models Part 2: The importance of Data Michael Wong and Rod Burns Codeplay Software Ltd. Distiguished Engineer, Vice President of Ecosystem IXPUG 2020 2 © 2020 Codeplay Software Ltd. Distinguished Engineer Michael Wong ● Chair of SYCL Heterogeneous Programming Language ● C++ Directions Group ● ISOCPP.org Director, VP http://isocpp.org/wiki/faq/wg21#michael-wong ● [email protected][email protected] Ported ● Head of Delegation for C++ Standard for Canada Build LLVM- TensorFlow to based ● Chair of Programming Languages for Standards open compilers for Council of Canada standards accelerators Chair of WG21 SG19 Machine Learning using SYCL Chair of WG21 SG14 Games Dev/Low Latency/Financial Trading/Embedded Implement Releasing open- ● Editor: C++ SG5 Transactional Memory Technical source, open- OpenCL and Specification standards based AI SYCL for acceleration tools: ● Editor: C++ SG1 Concurrency Technical Specification SYCL-BLAS, SYCL-ML, accelerator ● MISRA C++ and AUTOSAR VisionCpp processors ● Chair of Standards Council Canada TC22/SC32 Electrical and electronic components (SOTIF) ● Chair of UL4600 Object Tracking ● http://wongmichael.com/about We build GPU compilers for semiconductor companies ● C++11 book in Chinese: Now working to make AI/ML heterogeneous acceleration safe for https://www.amazon.cn/dp/B00ETOV2OQ autonomous vehicle 3 © 2020 Codeplay Software Ltd. Acknowledgement and Disclaimer Numerous people internal and external to the original C++/Khronos group, in industry and academia, have made contributions, influenced ideas, written part of this presentations, and offered feedbacks to form part of this talk. But I claim all credit for errors, and stupid mistakes. These are mine, all mine! You can’t have them.
  • Introduction to GPU Computing

    Introduction to GPU Computing

    Introduction to GPU Computing J. Austin Harris Scientific Computing Group Oak Ridge National Laboratory ORNL is managed by UT-Battelle for the US Department of Energy Performance Development in Top500 • Yardstick for measuring 1 Exaflop/s performance in HPC – Solve Ax = b – Measure floating-point operations per second (Flop/s) • U.S. targeting Exaflop system as early as 2022 – Building on recent trend of using GPUs https://www.top500.org/statistics/perfdevel 2 J. Austin Harris --- JETSCAPE --- 2020 Hardware Trends • Scaling number of cores/chip instead of clock speed • Power is the root cause – Power density limits clock speed • Goal has shifted to performance through parallelism • Performance is now a software concern Figure from Kathy Yelick, “Ten Ways to Waste a Parallel Computer.” Data from Kunle Olukotun, Lance Hammond, Herb Sutter, Burton Smith, Chris Batten, and Krste Asanoviç. 3 J. Austin Harris --- JETSCAPE --- 2020 GPUs for Computation • Excellent at graphics rendering – Fast computation (e.g., TV refresh rate) – High degree of parallelism (millions of independent pixels) – Needs high memory bandwidth • Often sacrifices latency, but this can be ameliorated • This computation pattern common in many scientific applications 4 J. Austin Harris --- JETSCAPE --- 2020 GPUs for Computation • CPU Strengths • GPU Strengths – Large memory – High mem. BW – Fast clock speeds – Latency tolerant via – Large cache for parallelism latency optimization – More compute – Small number of resources (cores) threads that can run – High perf./watt very quickly • GPU Weaknesses • CPU Weaknesses – Low mem. Capacity – Low mem. bandwidth – Low per-thread perf. – Costly cache misses – Low perf./watt Slide from Jeff Larkin, “Fundamentals of GPU Computing” 5 J.
  • Bench - Benchmarking the State-Of- The-Art Task Execution Frameworks of Many- Task Computing

    Bench - Benchmarking the State-Of- The-Art Task Execution Frameworks of Many- Task Computing

    MATRIX: Bench - Benchmarking the state-of- the-art Task Execution Frameworks of Many- Task Computing Thomas Dubucq, Tony Forlini, Virgile Landeiro Dos Reis, and Isabelle Santos Illinois Institute of Technology, Chicago, IL, USA {tdubucq, tforlini, vlandeir, isantos1}@hawk.iit.edu Stanford University. Finally HPX is a general purpose C++ Abstract — Technology trends indicate that exascale systems will runtime system for parallel and distributed applications of any have billion-way parallelism, and each node will have about three scale developed by Louisiana State University and Staple is a orders of magnitude more intra-node parallelism than today’s framework for developing parallel programs from Texas A&M. peta-scale systems. The majority of current runtime systems focus a great deal of effort on optimizing the inter-node parallelism by MATRIX is a many-task computing job scheduling system maximizing the bandwidth and minimizing the latency of the use [3]. There are many resource managing systems aimed towards of interconnection networks and storage, but suffer from the lack data-intensive applications. Furthermore, distributed task of scalable solutions to expose the intra-node parallelism. Many- scheduling in many-task computing is a problem that has been task computing (MTC) is a distributed fine-grained paradigm that considered by many research teams. In particular, Charm++ [4], aims to address the challenges of managing parallelism and Legion [5], Swift [6], [10], Spark [1][2], HPX [12], STAPL [13] locality of exascale systems. MTC applications are typically structured as direct acyclic graphs of loosely coupled short tasks and MATRIX [11] offer solutions to this problem and have with explicit input/output data dependencies.
  • HPX – a Task Based Programming Model in a Global Address Space

    HPX – a Task Based Programming Model in a Global Address Space

    HPX – A Task Based Programming Model in a Global Address Space Hartmut Kaiser1 Thomas Heller2 Bryce Adelstein-Lelbach1 [email protected] [email protected] [email protected] Adrian Serio1 Dietmar Fey2 [email protected] [email protected] 1Center for Computation and 2Computer Science 3, Technology, Computer Architectures, Louisiana State University, Friedrich-Alexander-University, Louisiana, U.S.A. Erlangen, Germany ABSTRACT 1. INTRODUCTION The significant increase in complexity of Exascale platforms due to Todays programming models, languages, and related technologies energy-constrained, billion-way parallelism, with major changes to that have sustained High Performance Computing (HPC) appli- processor and memory architecture, requires new energy-efficient cation software development for the past decade are facing ma- and resilient programming techniques that are portable across mul- jor problems when it comes to programmability and performance tiple future generations of machines. We believe that guarantee- portability of future systems. The significant increase in complex- ing adequate scalability, programmability, performance portability, ity of new platforms due to energy constrains, increasing paral- resilience, and energy efficiency requires a fundamentally new ap- lelism and major changes to processor and memory architecture, proach, combined with a transition path for existing scientific ap- requires advanced programming techniques that are portable across plications, to fully explore the rewards of todays and tomorrows multiple future generations of machines [1]. systems. We present HPX – a parallel runtime system which ex- tends the C++11/14 standard to facilitate distributed operations, A fundamentally new approach is required to address these chal- enable fine-grained constraint based parallelism, and support run- lenges.
  • SID Khronos Open Standards for AR May17

    SID Khronos Open Standards for AR May17

    Open Standards for AR Neil Trevett | Khronos President NVIDIA VP Developer Ecosystem [email protected] | @neilt3d LA, May 2017 © Copyright Khronos Group 2017 - Page 1 Khronos Mission Software Silicon Khronos is an International Industry Consortium of over 100 companies creating royalty-free, open standard APIs to enable software to access hardware acceleration for 3D graphics, Virtual and Augmented Reality, Parallel Computing, Neural Networks and Vision Processing © Copyright Khronos Group 2017 - Page 2 Khronos Standards Ecosystem 3D for the Web Real-time 2D/3D - Real-time apps and games in-browser - Cross-platform gaming and UI - Efficiently delivering runtime 3D assets - VR and AR Displays - CAD and Product Design - Safety-critical displays VR, Vision, Neural Networks Parallel Computation - VR/AR system portability - Tracking and odometry - Machine Learning acceleration - Embedded vision processing - Scene analysis/understanding - High Performance Computing (HPC) - Neural Network inferencing © Copyright Khronos Group 2017 - Page 3 Why AR Needs Standard Acceleration APIs Without API Standards With API Standards Platform Application Fragmentation Portability Everything Silicon runs on CPU Acceleration Standard Acceleration APIs provide PERFORMANCE, POWER AND PORTABILITY © Copyright Khronos Group 2017 - Page 4 AR Processing Flow Download 3D augmentation object and scene data Tracking and Positioning Generate Low Latency Vision Geometric scene 3D Augmentations for sensor(s) reconstruction display by optical system Semantic scene understanding
  • Standards for Vision Processing and Neural Networks

    Standards for Vision Processing and Neural Networks

    Standards for Vision Processing and Neural Networks Radhakrishna Giduthuri, AMD [email protected] © Copyright Khronos Group 2017 - Page 1 Agenda • Why we need a standard? • Khronos NNEF • Khronos OpenVX dog Network Architecture Pre-trained Network Model (weights, …) © Copyright Khronos Group 2017 - Page 2 Neural Network End-to-End Workflow Neural Network Third Vision/AI Party Applications Training Frameworks Tools Datasets Trained Vision and Neural Network Network Inferencing Runtime Network Model Architecture Desktop and Cloud Hardware Embedded/Mobile Embedded/MobileEmbedded/Mobile Embedded/Mobile/Desktop/CloudVision/InferencingVision/Inferencing Hardware Hardware cuDNN MIOpen MKL-DNN Vision/InferencingVision/Inferencing Hardware Hardware GPU DSP CPU Custom FPGA © Copyright Khronos Group 2017 - Page 3 Problem: Neural Network Fragmentation Neural Network Training and Inferencing Fragmentation NN Authoring Framework 1 Inference Engine 1 NN Authoring Framework 2 Inference Engine 2 NN Authoring Framework 3 Inference Engine 3 Every Tool Needs an Exporter to Every Accelerator Neural Network Inferencing Fragmentation toll on Applications Inference Engine 1 Hardware 1 Vision/AI Inference Engine 2 Hardware 2 Application Inference Engine 3 Hardware 3 Every Application Needs know about Every Accelerator API © Copyright Khronos Group 2017 - Page 4 Khronos APIs Connect Software to Silicon Software Silicon Khronos is an International Industry Consortium of over 100 companies creating royalty-free, open standard APIs to enable software to access
  • Intel® Oneapi Programming Guide

    Intel® Oneapi Programming Guide

    Intel® oneAPI Programming Guide Intel Corporation www.intel.com Notices and Disclaimers Contents Notices and Disclaimers....................................................................... 5 Chapter 1: Introduction oneAPI Programming Model Overview ..........................................................7 Data Parallel C++ (DPC++)................................................................8 oneAPI Toolkit Distribution..................................................................9 About This Guide.......................................................................................9 Related Documentation ..............................................................................9 Chapter 2: oneAPI Programming Model Sample Program ..................................................................................... 10 Platform Model........................................................................................ 14 Execution Model ...................................................................................... 15 Memory Model ........................................................................................ 17 Memory Objects.............................................................................. 19 Accessors....................................................................................... 19 Synchronization .............................................................................. 20 Unified Shared Memory.................................................................... 20 Kernel Programming
  • Opencl SYCL 2.2 Specification

    Opencl SYCL 2.2 Specification

    SYCLTM Provisional Specification SYCL integrates OpenCL devices with modern C++ using a single source design Version 2.2 Revision Date: – 2016/02/15 Khronos OpenCL Working Group — SYCL subgroup Editor: Maria Rovatsou Copyright 2011-2016 The Khronos Group Inc. All Rights Reserved Contents 1 Introduction 13 2 SYCL Architecture 15 2.1 Overview . 15 2.2 The SYCL Platform and Device Model . 15 2.2.1 Platform Mixed Version Support . 16 2.3 SYCL Execution Model . 17 2.3.1 Execution Model: Queues, Command Groups and Contexts . 18 2.3.2 Execution Model: Command Queues . 19 2.3.3 Execution Model: Mapping work-items onto an nd range . 21 2.3.4 Execution Model: Execution of kernel-instances . 22 2.3.5 Execution Model: Hierarchical Parallelism . 24 2.3.6 Execution Model: Device-side enqueue . 25 2.3.7 Execution Model: Synchronization . 25 2.4 Memory Model . 26 2.4.1 Access to memory . 27 2.4.2 Memory consistency . 28 2.4.3 Atomic operations . 28 2.5 The SYCL programming model . 28 2.5.1 Basic data parallel kernels . 30 2.5.2 Work-group data parallel kernels . 30 2.5.3 Hierarchical data parallel kernels . 30 2.5.4 Kernels that are not launched over parallel instances . 31 2.5.5 Synchronization . 31 2.5.6 Error handling . 32 2.5.7 Scheduling of kernels and data movement . 32 2.5.8 Managing object lifetimes . 34 2.5.9 Device discovery and selection . 35 2.5.10 Interfacing with OpenCL . 35 2.6 Anatomy of a SYCL application .