- Oct 22, 2004
- 816
- 1,448
- 136
It looks more like SYCL is an extra abstraction layer on top of lower level GPU APIs like CUDA or OpenCL, than it is a replacement for either.
Although some implementations may rest upon other programming models and supporting frameworks — such as hipSYCL using HIP (AMD's CUDA dialect) to provide cross-platform support on top of AMD ROCm and Nvidia CUDA frameworks and toolchains — there is nothing in the SYCL 2020 standard that mandates a particular implementation. You can make a SYCL 2020 compliant implementation using pure machine code, if you should want to.
With regards to abstraction level, the SYCL programming model is similar to CUDA and HIP. They are all providing a single-source programming model, using similar fundamental concepts (kernels, scheduling, memory access, etc.), and all are based on C++, compiling down to high-performance native machine code for the targeted system architecture. Porting between them is feasible and can be relatively straight-forward, with the help of automation, as AMD has proven with their numerous recent supercomputer wins.
For example, here is a blog post on porting from CUDA to HIP for the LUMI supercomputer:
"As mentioned, HIP is AMD’s answer to CUDA, however, whereas CUDA code can only run on Nvidia GPUs, programs using HIP can run on both AMD and Nvidia GPUs. The HIP API syntax is very similar to the CUDA API, and the abstraction level is the same meaning that porting between the two is easy and we will cover the practical ways this can be done below. [...] In the end converting CUDA code to HIP is usually quite straightforward, with the catch being that the most bleeding edge CUDA features are not supported but may be supported in the future. The AMD GPU software stack comes with tools that will significantly speed up the conversion process compared to doing it manually."
Preparing codes for LUMI: converting CUDA applications to HIP - LUMI
How to convert CUDA application to HIP?
www.lumi-supercomputer.eu
Intel provides similar tools in their oneAPI framework for automating the translation of CUDA code to SYCL.
Last edited: