Writing software to run efficiently on today’s heterogeneous compute architectures is an ongoing challenge made increasingly difficult by the growing number of processor and accelerator choices. One effort to help mitigate the challenge is the high level programming model – SYCL – developed by the Khronos industry consortium. SYCL builds on OpenCL (Open Computing Language) and “enables code for heterogeneous processors to be written in a single-source style using completely standard C++.”
Intel, for example, is leaning heavily on SYCL[I] for Intel’s OneAPI initiative for porting software to its forthcoming line of Xe GPUs. So far SYCL support for Nvidia GPUs has been somewhat cumbersome. On Monday, Codeplay announced an open source early version of Intel’s implementation of SYCL, DPC++, that has more robust support for NVIDIA GPUs.
Ruyman Reyes, Codeplay principal software engineer, described the offering in a blog. Here’s an excerpt:
“Last year we were really excited to learn that Intel is putting a huge effort behind SYCL and has been developing oneAPI that includes DPC++ (an implementation of SYCL with extensions) for its CPUs, GPUs and FPGAs. With the additional support for SYCL from Xilinx, Renesas and Imagination Technologies, software developers are now able to target a wide range of devices using SYCL.
“While ComputeCpp offers experimental support for Nvidia GPUs using OpenCL and Nvidia’s PTX, DPC++ (Intel’s SYCL implementation) offered the opportunity to add full support for Nvidia GPUs integrated into the LLVM compiler without going through OpenCL, and today we are pleased to open source the initial, experimental phase of our implementation that enables SYCL developers to target Nvidia GPUs.
“The codebase for this implementation lives in a separate fork from both the main LLVM compiler project and the DPC++ branch, which means that for now you need to use this project to try out the support for Nvidia GPUs with SYCL. We aim to work with Intel to get the Nvidia GPU support added to the upstream Intel/LLVM compiler.
“This is an early, incomplete, release and further work is ongoing to integrate more features and improved performance.”
The blog is best read in full and includes more detail for experimenting with the new DPC++ capability. There’s also a description of what seems to work well and what doesn’t. For example, “At the moment, the compiled SYCL application will only be able to either target CUDA or OpenCL, not both at the same time. In order to build a SYCL application for the CUDA back-end, the flag nvptx64-nvidia-cuda-sycldevice is required.”
Link to blog (Codeplay contribution to DPC++ brings SYCL support for NVIDIA GPUs): https://www.codeplay.com/portal/02-03-20-codeplay-contribution-to-dpcpp-brings-sycl-support-for-nvidia-gpus
SYCL (pronounced ‘sickle’) is a royalty-free, cross-platform abstraction layer that builds on the underlying concepts, portability and efficiency of OpenCL that enables code for heterogeneous processors to be written in a “single-source” style using completely standard C++. SYCL single-source programming enables the host and kernel code for an application to be contained in the same source file, in a type-safe way and with the simplicity of a cross-platform asynchronous task graph. SYCL includes templates and generic lambda functions to enable higher-level application software to be cleanly coded with optimized acceleration of kernel code across the extensive range of shipping OpenCL 1.2 implementations. Developers program at a higher level than OpenCL C or C++, but always have access to lower-level code through seamless integration with OpenCL, C/C++ libraries, and frameworks such as OpenCV or OpenMP.