SYCL in HPC Peter Žužek, Senior Software Engineer, SYCL Performance
Workshop on Efficient Computing for High Energy Physics, Edinburgh February 18th 2020 Leadership Products Enabling Advanced Applications on Complex Processor Systems
Company Markets High-performance software solutions Vision Processing for custom heterogeneous systems Machine Learning Data Compute Enabling the toughest processor systems with open-standards-based High Performance Computing (HPC) tools and middleware Automotive (ISO 26262) IoT, Smartphones & Tablets Established 2002 in Scotland, UK Medical & Industrial
Products Partners
C++ platform with SYCL, enabling vision and machine learning applications e.g. TensorFlow™
Many Global The heart of Codeplay's compute technology, Companies enabling OpenCL™, SPIR™, HSA™ and Vulkan™
2/20 © 2020 Codeplay Software Ltd. Codeplay lead the The ISO C++ body trust definition of the SYCL Codeplay to lead the Codeplay staff are standard in Khronos to transition to Machine target modern C+ AI Learning & heterogeneous closely involved in acceleration parallelism in C++ defining new open standards
Codeplay has joined Codeplay lead the AUTOSAR to deliver new definition of the SYCL autonomous drive standard in Khronos to capabilities target modern C+ AI acceleration
3/20 © 2020 Codeplay Software Ltd. • Single source heterogeneous programming model • Designed to run on host device, CPU, GPU, FPGA, DSP, accelerators … • Cross platform, open standard alternative to CUDA • Entirely standard C++ • No #pragma, restrict, <<
4/20 © 2020 Codeplay Software Ltd. 5/20 © 2020 Codeplay Software Ltd. ComputeCpp compilation
6/20 © 2020 Codeplay Software Ltd. Asynchronous Execution • Command queue submissions are asynchronous by default • Can throw asynchronous exceptions -> async_handler • Automatic management of data movement • Can wait on events for manual synchronization
7/20 © 2020 Codeplay Software Ltd. 8/20 © 2020 Codeplay Software Ltd. SYCL Ecosystem
A range of open source project use SYCL to accelerate execution of complex algorithms
Linear Algebra AI Imaging std C++ Benchmarks
Eigen TensorFlow VisionCpp SYCL-ParallelSTL BabelStream
OpenGL SYCL-BLAS SYCL-DNN Mathematics SLAMbench (GLM)
SYCL-ML RSBench
TensorOpt ParRes
9/20 © 2020 Codeplay Software Ltd. SYCL Implementations
Acoran oneAPI
ComputeCpp DPC++ triSYCL hipSYCL CPU, OpenCL SPIR, CPU, OpenCL SPIR-V, CPU OpenMP, OpenCL CPU OpenMP, ROCm, SPIR-V, PTX, GCN CUDA PTX SPIR-df FPGA CUDA
SYCL 1.2.1
10/20 © 2020 Codeplay Software Ltd. oneAPI • Unified, Cross- Architecture Programming Model • SYCL with DPC++ and extensions • oneAPI libraries • Optimized for Intel hardware
11/20 © 2020 Codeplay Software Ltd. Software platforms for AI acceleration
Device-specific graph compilers NVIDIA CUDA Intel oneAPI Codeplay Acoran •Limited capabilities, rarely used in •Widely adopted, full-featured •Industry-standard, full-featured •Industry-standard, full-featured production •Proprietary, locked to NVIDIA GPUs •Optimized for Intel processors; GPU, AI, •Optimized for a wide range of platforms •Non-standard, hard to integrate FPGA •Available for new processors
Compatible
12/20 © 2020 Codeplay Software Ltd. Unified Shared Memory extension • USM pointers • Same representation and same location for all devices • Easier to port HPC code • 4 levels • Explicit, Restricted, Concurrent, System
13/20 © 2020 Codeplay Software Ltd. 14/20 © 2020 Codeplay Software Ltd. • SYCL 1.2.1 Conformant (CTS) • Optimized data movement • Application tuning via configuration file • Vendor specific optimizations • Address space deduction • Targets SPIR and SPIR-V devices • Experimental support for PTX and GCN
15/20 © 2020 Codeplay Software Ltd. Who is using SYCL?
https://sycl.tech/research/
• Wigner Institute, Heriot Watt University, Stellar Group, UWS, Argonne NL, Lawrence Berkeley NL, DOE, Oak Ridge NL, Abertay University, TU Dresden….
16/20 © 2020 Codeplay Software Ltd. 17/20 © 2020 Codeplay Software Ltd. Learning Materials for SYCL
• An open source project • Learning materials for high performance programming • Teaches common C++ features and uses open standards
More information at https://sycl.tech
18/20 © 2020 Codeplay Software Ltd. Try out SYCL • https://developer.codeplay.com/ • https://support.codeplay.com/ • https://software.intel.com/en-us/oneapi • SYCL extensions • https://github.com/codeplaysoftware/standards-proposals • https://github.com/intel/llvm/tree/sycl/sycl/doc/extensions
19/20 © 2020 Codeplay Software Ltd. @codeplaysoft [email protected] codeplay.com