SYCL has various different implementations like DPC++/oneAPI , ComputeCpp , hipSYCL, triSYCL. Is it possible to write the same SYCL code and compile this with all different implementations?
If it is not how much different can it be?
Thanks
SYCL is an open standard, so this means that any SYCL implementation needs to follow the specification.
So, theoretically if you write SYCL code it can be compiled and run using any of the SYCL implementations without modification.
However there are some caveats to this.
A unified build system does not yet exist for SYCL implementations, some use CMake but there may be modifications needed at this level to get the code files to compile.
Some have not implemented the whole specification yet so certain features may be missing. This should not be an issue in general though and individual implementations are likely to show what is and is not supported. This is because SYCL 2020 was only ratified fairly recently and some features are still being implemented by the compilers.
These issues aside, you should be very confident that your SYCL code will compile and run using ComputeCpp, hipSYCL and DPC++. For example, the SYCL Academy exercises can be compiled for any of these compilers with some minor changes that fall into the two categories I listed above.