After gaining support from leading companies like Intel, Xilinx, Renesas and Imagination Technologies, the SYCL (pronounced ‘sickle’), the developers using NVIDIA GPUs will now be able to gain the benefit as well. Codeplay, the organization that has steadfastly been an active contributor to the SYCL Community, has now culminated the advanced development of DPC++ (Data Parallel C++), which facilities recycling and reusing code across several hardware platforms. The result is ComputeCpp, Codeplay’s own implementation of SYCL.
ComputeCpp’s Latest Edition Offers Experimental Support For NVIDIA GPUs using OpenCL and NVIDIA’s PTX
Last year, Intel took a decisive step to give a push to SYCL, and even began working on oneAPI Standard. The oneAPI includes DPC++ (an implementation of SYCL with extensions) for Intel’s CPUs, GPUs and FPGAs. The movement soon became quite big and gained momentum after support for SYCL came in from Xilinx, Renesas, and Imagination Technologies. Simply put, software developers are now able to target a wide range of devices using SYCL.
We're working to bring full support for NVIDIA GPUs to SYCL developers integrated into the open source DPC++ project. Find out how you can try it out today. https://t.co/RJoruLg8ae #sycl pic.twitter.com/4o07O9iNQW
— Codeplay Software (@codeplaysoft) February 3, 2020
The ComputeCpp offers experimental support for NVIDIA GPUs using OpenCL and NVIDIA’s PTX. But DPC++ (Intel’s SYCL implementation) offers the opportunity to add full support for NVIDIA GPUs integrated into the LLVM compiler without going through OpenCL. Codeplay announced that they are open-sourcing the initial, experimental phase of their implementation that enables SYCL developers to target NVIDIA GPUs. The codebase for this implementation stays in a separate fork from both the main LLVM compiler project and the DPC++ branch. The organization added that they intend to work with Intel to get the NVIDIA GPU support added to the upstream Intel/LLVM compiler.
How Can Developers Benefit From The SYCL Support For NVIDIA GPUs?
This project enables developers to target NVIDIA GPUs using SYCL code, without having to go through the OpenCL layer in the system. In other words, with just an NVIDIA GPU, developers can run DPC++ on their system to compile SYCL applications. Moreover, any existing CUDA Application can be incrementally ported to SYCL using the CUDA support, and then run it on a platform that doesn’t have CUDA. This clearly saves a lot of time and repeated efforts.
— insideHPC.com (@insideHPC) October 20, 2019
Codeplay has offered instructions on the project README file explaining how to use the NVIDIA back-end for DPC++. Developers are required to use some flags when compiling, and some code to set up their device selector to ensure the runtime knows what device to target. In particular, the section “Build SYCL toolchain with support for NVIDIA CUDA” and the Clang compiler options have specific instructions.
Codeplay confirmed they successfully ran the project with Ubuntu 18.04 using CUDA 10.1 on a Titan RTX GPU (compute capabilities 7.5). The team assures that it should also work on other Linux versions with any NVIDIA GPU compatible with SM 5.0 or above. However, the compiled SYCL application will only be able to either target CUDA or OpenCL, not both at the same time.
"Bringing NVIDIA GPU support to SYCL developers", Dec 16, 2019 https://t.co/GBZL76DGOZ
"experimental" support for NVIDIA with ComputeCpp using CUDA
=> In 2020, Codeplay will be releasing a fully open source project supporting for NVIDIA devices to SYCL developers
with oneAPI pic.twitter.com/66sQ5vu9Tz
— OGAWA, Tadashi (@ogawa_tter) December 16, 2019
The team also cautions that the initial release of the project has not been optimized, so performance may not be optimal in all circumstances. In other words, developers will need to deploy the same and ascertain the speed improvements themselves, if there are any. This is because the code generation doesn’t apply any particular optimization passes. Moreover, the CUDA implementation of the SYCL specification in the Plugin Interface doesn’t use any advanced CUDA features.
Codeplay has indicated that boosting compatibility and functionality remain their top priorities. They indicated that the current focus is to implement as much functionality as possible so that developers can run a range of SYCL applications on NVIDIA GPU platforms. Performance optimizations will come later on with the help of community members.