SYCL Breaking Changes in Intel® oneAPI DPC++/C++ Compiler 2025.0

December 6, 2024

author-image

By

Breaking Changes

Intel® oneAPI DPC++/C++ Compiler(icpx) 2025.0 is an ABI-breaking release necessitating recompilation of applications built with earlier toolchain versions for compatibility with the new SYCL runtime library. This article summarizes the list of breaking changes and recommended code modifications to resolve compilation errors due to these breaking changes and there by make the code SYCL 2020 conformant. 

Corrected return type for sycl::vec::operator!

In the SYCL implementation before icpx 2025.0, the return type of sycl::vec::operator! is the same as the type of the input operand. For example, for sycl::vec<float, 4> a, the return value of !a will also be type sycl::vec<float, 4>. However this is in conflict with the SYCL 2020 specification. Table 143 in the spec describes the behavior of sycl::vec operators, and for operator!, it states “The DataT template parameter of the constructed SYCL vec, RET, varies depending on the DataT template parameter of this SYCL vec”.  According to the spec, the return type of !a should be sycl::vec<int32_t, 4>.

This change implies that, the following code which can compile with earlier compiler may fail when compiled with the latest compiler icpx 2025.0 and the developer may need to modify and recompile their code. For example,

sycl::vec<float, 4> a;
sycl::vec<float, 4> c = !a;

The code above needs to be modified into,

auto c = !a; or sycl::vec<int32_t, 4> c = !a;

Removed deprecated shuffles from sub-group class

SYCL 2020 deprecated two argument shuffle functions of the sub-group class and shuffle is now a free function so icpx 2025.0 has been updated to support this. Existing code with shuffle APIs such as 

sycl::sub_group sg = item.get_sub_group();

sg.shuffle(var, srcLane);

needs to be modified to 

sycl::select_from_group(sg, var, srcLane);

Removed header files

<cmath> and <complex> header files were implicitly included in sycl.hpp header file. They are removed from the sycl header file in compiler 2025.0, and users relying on this will need to explicitly include such header files and recompile the code.

Removed host device APIs

Host device is no longer supported in SYCL 2020 and to align with this change in specification, all methods and functions related to host device like platform::is_host were removed in 2025.0. This change implies that, the following code which compiles with 2024.2 and earlier compilers will fail when compiled with the latest compiler icpx 2025.0 and the developer will need to modify and recompile their code. For example,

run = (devid.find(device_filter) != std::string::npos) || (d.is_host());

This code can be modified to the following if the user intends to check if the device is a cpu

run = (devid.find(device_filter) != std::string::npos) || (d.is_cpu());

Restriction to use nd_item in nd_range parallel_for

Following code which worked with a previous version of the compiler will throw a build error when compiled with 2025.0.

q.parallel_for(sycl::nd_range<2>{sycl::range<2>{N, N}, sycl::range<2>{N}}, [=](sycl::item<2> It){
      SomeAccessor[It] = 0;
    });

Use nd_item instead instead of item.

Removed the raw-pointer math functions overloads

As part of conforming with the SYCL 2020 specification raw-pointer math function overloads are no longer supported in icpx 2025.0. As a result of this breaking change, code such as  

cgh.single_task<class fractF1UF1>([=]() { 
    Buf[0] = s::fract(float{1.5f}, &Buf[1]); 
});

needs to be modified to the following

cgh.single_task<class fractF1UF1>([=]() {
    Buf[0] = s::fract(float{1.5f},
             s::address_space_cast<s::access::address_space::global_space,
             s::access::decorated::yes>(Buf + 1));
});

Removed sycl::id to sycl::range conversion

The operator sycl::range<dimensions>() const is removed from id class. Change original code that uses range(id), if available.

Removed floating point overload for sycl::abs

sycl::abs(0.0f) is now invalid as SYCL 2020 only supports int data type. Use fabs instead for floating point data type.

Added support for _GLIBCXX_USE_CXX11_ABI=0

This is not exactly a breaking change but a change that impacts users working with pre-C++11 features. Earlier versions of icpx compiler/runtime lack support for pre-C++11 standard. The icpx compiler 2025.0 added support for _GLIBCXX_USE_CXX11_ABI=0. This allows users to use pre-C++ 2011 standard and shouldn’t impact users who do not work with pre-C++11 features. Please note that the compiler default setting is still  _GLIBCXX_USE_CXX11_ABI=1. If the user need to work with pre-C++11 features, they can explicitly set _GLIBCXX_USE_CXX11_ABI=0 during the compilation process.