<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: SYCL example keeps crashing in Intel® oneAPI DPC++/C++ Compiler</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/SYCL-example-keeps-crashing/m-p/1737525#M4684</link>
    <description>&lt;P&gt;hi, can the sycl-ls command show the backends correctly? The compilation warnings shouldn't be a problem, but do you see any runtime errors when it crashes?&lt;/P&gt;</description>
    <pubDate>Tue, 17 Feb 2026 21:21:58 GMT</pubDate>
    <dc:creator>yzh_intel</dc:creator>
    <dc:date>2026-02-17T21:21:58Z</dc:date>
    <item>
      <title>SYCL example keeps crashing</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/SYCL-example-keeps-crashing/m-p/1736031#M4671</link>
      <description>&lt;P&gt;After evenings of attempts, I hope someone can tell me what is wrong with my setup. The CMake files are a stripped version of a much larger project I work on, and where I wanted to integrate SYCL in. The SYCL code in this post is a simple example from the Khronos website.&lt;/P&gt;&lt;P&gt;Yesterday I reinstalled the newest OneAPI development kit. I just post all my files here, to be sure I do not forget an important clue. Files may have some 'legacy' contents from the larger project.&lt;/P&gt;&lt;P&gt;My CMakePresets.json:&lt;/P&gt;&lt;LI-CODE lang="json"&gt;{
    "version": 2,
    "cmakeMinimumRequired": {
        "major": 3,
        "minor": 25,
        "patch": 0
    },

    "configurePresets": [
        {
            "name": "windows-default",
            "displayName": "Windows x64 Release",
            "description": "Sets Ninja generator, compilers, x64 architecture, build and install directory",
            "generator": "Ninja",
            "binaryDir": "${sourceDir}/build/${presetName}",
            "architecture": {
                "value": "x64",
                "strategy": "external"
            },
            "cacheVariables": {
                "CMAKE_BUILD_TYPE": "Debug",
                "CMAKE_BUILD_PARALLEL_LEVEL": "10",
                "CMAKE_C_COMPILER": "C:/Program Files (x86)/Intel/oneAPI/compiler/latest/bin/icx.exe",
                "CMAKE_CXX_COMPILER": "C:/Program Files (x86)/Intel/oneAPI/compiler/latest/bin/icx.exe"
            },
            "environment": {
                "PATH": "C:/Program Files (x86)/Intel/oneAPI/compiler/latest/bin;$penv{PATH}",
                "INCLUDE": "C:/Program Files (x86)/Intel/oneAPI/compiler/latest/include;$penv{INCLUDE}",
                "LIB": "C:/Program Files (x86)/Intel/oneAPI/compiler/latest/lib;$penv{LIB}"
            },
            "vendor": {
                "microsoft.com/VisualStudioSettings/CMake/1.0": {
                    "hostOS": [ "Windows" ]
                }
            }
        }
    ]
}&lt;/LI-CODE&gt;&lt;P&gt;My top-level CMakeLists file (which now only includes the test-executable to build):&lt;/P&gt;&lt;LI-CODE lang="none"&gt;cmake_minimum_required(VERSION 3.25.0)
project(GUI LANGUAGES C CXX)
set(CMAKE_CXX_STANDARD 20)

if (CMAKE_CXX_COMPILER_ID STREQUAL "IntelLLVM")
    find_package(IntelSYCL REQUIRED)
endif()

add_compile_definitions("CMAKE_SOURCE_ROOT=${CMAKE_SOURCE_DIR}")

set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})

add_subdirectory(gui)

add_library(compiler_options INTERFACE)

if (CMAKE_BUILD_TYPE MATCHES Debug)
    target_compile_options(compiler_options INTERFACE
        $&amp;lt;$&amp;lt;CXX_COMPILER_ID:IntelLLVM&amp;gt;:
            -Wall -Wextra
            -g -Od
            -Wno-format-security
        &amp;gt;
    )
else()
    target_compile_options(compiler_options INTERFACE
        $&amp;lt;$&amp;lt;CXX_COMPILER_ID:IntelLLVM&amp;gt;:
            -Wall -Wextra
            -O3
            -Wno-format-security
        &amp;gt;
    )
endif()

add_link_options($&amp;lt;$&amp;lt;CXX_COMPILER_ID:IntelLLVM&amp;gt;:-fuse-ld=lld&amp;gt;)
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION ON)&lt;/LI-CODE&gt;&lt;P&gt;My application CMakeLists:&lt;/P&gt;&lt;LI-CODE lang="none"&gt;add_executable(
    gui 
    gui.cpp
)
add_sycl_to_target(
    TARGET 
        gui
    SOURCES 
        gui.cpp
)

target_include_directories(gui PUBLIC ${CMAKE_SOURCE_DIR})
target_include_directories(gui PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})

find_package(OpenGL REQUIRED)

target_link_libraries(
    gui
    PRIVATE
        compiler_options
        OpenGL::GL
)
add_link_options($&amp;lt;$&amp;lt;CXX_COMPILER_ID:IntelLLVM&amp;gt;:-fsycl&amp;gt;)&lt;/LI-CODE&gt;&lt;P&gt;And finally the SYCL code:&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;#include &amp;lt;sycl/sycl.hpp&amp;gt;

#include &amp;lt;iostream&amp;gt;

int main()
{
    auto platforms = sycl::platform::get_platforms();

    for (auto&amp;amp; platform : platforms) {
        std::cout
            &amp;lt;&amp;lt; "Platform: "
            &amp;lt;&amp;lt; platform.get_info&amp;lt;sycl::info::platform::name&amp;gt;()
            &amp;lt;&amp;lt; std::endl;

        auto devices = platform.get_devices();
        for (auto&amp;amp; device : devices) {
            std::cout
                &amp;lt;&amp;lt; "  Device: "
                &amp;lt;&amp;lt; device.get_info&amp;lt;sycl::info::device::name&amp;gt;()
                &amp;lt;&amp;lt; std::endl;
        }
    }
    return -1;
}&lt;/LI-CODE&gt;&lt;P&gt;Crashing occurs directly on the first SYCL call, but I have also seen it crashing in the second for-loop.&lt;/P&gt;&lt;P&gt;I edit, compile and run from the Visual Studio 2022 IDE.&lt;/P&gt;&lt;P&gt;What may be a clue: I get hundreds of warnings from the OneAPI header files themselves:&lt;/P&gt;&lt;LI-CODE lang="none"&gt;C:\Program Files (x86)\Intel\oneAPI\compiler\latest\include\sycl\ext\oneapi\filter_selector.hpp(37,46): warning : 'device_selector' is deprecated: Use SYCL 2020 callable device selectors instead. [-Wdeprecated-declarations]
     37 | class __SYCL_EXPORT filter_selector : public device_selector {
        |                                              ^
  C:\Program Files (x86)\Intel\oneAPI\compiler\latest\include\sycl\device_selector.hpp(38,21): note: 'device_selector' has been explicitly marked deprecated here
     38 | class __SYCL_EXPORT __SYCL2020_DEPRECATED(
        |                     ^
  C:\Program Files (x86)\Intel\oneAPI\compiler\latest\include\sycl\detail\defines_elementary.hpp(62,40): note: expanded from macro '__SYCL2020_DEPRECATED'
     62 | #define __SYCL2020_DEPRECATED(message) __SYCL_DEPRECATED(message)
        |                                        ^
  C:\Program Files (x86)\Intel\oneAPI\compiler\latest\include\sycl\detail\defines_elementary.hpp(53,38): note: expanded from macro '__SYCL_DEPRECATED'
     53 | #define __SYCL_DEPRECATED(message) [[deprecated(message)]]
        |                                      ^
  In file included from C:\Users\boschmajj\OneDrive - TNO\SYCL\gui\gui.cpp:1:
  In file included from C:\Program Files (x86)\Intel\oneAPI\compiler\latest\include\sycl\sycl.hpp:49:
  In file included from C:\Program Files (x86)\Intel\oneAPI\compiler\latest\include\sycl\detail\core.hpp:21:
C:\Program Files (x86)\Intel\oneAPI\compiler\latest\include\sycl\accessor.hpp(1786,12): warning : 'atomic&amp;lt;unsigned int, sycl::access::address_space::global_space&amp;gt;' is deprecated: sycl::atomic is deprecated since SYCL 2020 [-Wdeprecated-declarations]
   1786 |     return atomic&amp;lt;DataT, AS&amp;gt;(multi_ptr&amp;lt;DataT, AS, access::decorated::yes&amp;gt;(
        |            ^
  C:\Program Files (x86)\Intel\oneAPI\compiler\latest\include\sycl\stream.hpp(538,21): note: in instantiation of function template specialization 'sycl::accessor&amp;lt;unsigned int, 1, sycl::access::mode::atomic, sycl::access::target::device&amp;gt;::operator[]&amp;lt;1&amp;gt;' requested here
    538 |   Cur = GlobalOffset[0].load();
        |                     ^
  C:\Program Files (x86)\Intel\oneAPI\compiler\latest\include\sycl\atomic.hpp(173,7): note: 'atomic&amp;lt;unsigned int, sycl::access::address_space::global_space&amp;gt;' has been explicitly marked deprecated here
    173 | class __SYCL2020_DEPRECATED(&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Feb 2026 21:52:25 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/SYCL-example-keeps-crashing/m-p/1736031#M4671</guid>
      <dc:creator>JeroenBoschma</dc:creator>
      <dc:date>2026-02-05T21:52:25Z</dc:date>
    </item>
    <item>
      <title>Re: SYCL example keeps crashing</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/SYCL-example-keeps-crashing/m-p/1736414#M4673</link>
      <description>&lt;P&gt;That sounds frustrating! One thing that sometimes helps with SYCL examples crashing is making sure your runtime and drivers are up to date and then trying a clean rebuild. If it still fails, narrowing down which part of the code triggers the crash can give clues on what’s going wrong. Hope you get it sorted soon!&lt;/P&gt;</description>
      <pubDate>Mon, 09 Feb 2026 15:40:37 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/SYCL-example-keeps-crashing/m-p/1736414#M4673</guid>
      <dc:creator>mattewwade06</dc:creator>
      <dc:date>2026-02-09T15:40:37Z</dc:date>
    </item>
    <item>
      <title>Re: SYCL example keeps crashing</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/SYCL-example-keeps-crashing/m-p/1736817#M4676</link>
      <description>&lt;P&gt;Frustrating is putting it mildly.. I decided to go back to an Intel basic example (base-vector-add): apart from CMake nagging that a deprecated CMake command was used (why is it then there, please update the example Intel) and after adding C++17 which apparently also was missing (why?) it compiles. But Visual Studio 2022 does not let me choose it as a startup item and running it directly outside VS does nothing more than a flash of a black terminal.... These simple examples should work out of the box. I am getting close to the decision dropping SYCL completely and start to learn CUDA.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Feb 2026 08:23:51 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/SYCL-example-keeps-crashing/m-p/1736817#M4676</guid>
      <dc:creator>JeroenBoschma</dc:creator>
      <dc:date>2026-02-12T08:23:51Z</dc:date>
    </item>
    <item>
      <title>Re: SYCL example keeps crashing</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/SYCL-example-keeps-crashing/m-p/1736895#M4678</link>
      <description>&lt;P&gt;Sorry for the additional reply, I'm not allowed to edit posts. But you're probably right it is a driver issue. I work on a laptop with Intel Iris, and although Windows is convinced I have the correct/newest driver, disabling the Iris in the device manager makes the example run. At least I have a clue now where to look....&lt;/P&gt;</description>
      <pubDate>Thu, 12 Feb 2026 21:40:41 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/SYCL-example-keeps-crashing/m-p/1736895#M4678</guid>
      <dc:creator>JeroenBoschma</dc:creator>
      <dc:date>2026-02-12T21:40:41Z</dc:date>
    </item>
    <item>
      <title>Re: SYCL example keeps crashing</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/SYCL-example-keeps-crashing/m-p/1737525#M4684</link>
      <description>&lt;P&gt;hi, can the sycl-ls command show the backends correctly? The compilation warnings shouldn't be a problem, but do you see any runtime errors when it crashes?&lt;/P&gt;</description>
      <pubDate>Tue, 17 Feb 2026 21:21:58 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/SYCL-example-keeps-crashing/m-p/1737525#M4684</guid>
      <dc:creator>yzh_intel</dc:creator>
      <dc:date>2026-02-17T21:21:58Z</dc:date>
    </item>
    <item>
      <title>Re: SYCL example keeps crashing</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/SYCL-example-keeps-crashing/m-p/1738000#M4689</link>
      <description>&lt;P&gt;The backends did not show correctly with scyl-ls, but in the end it turns out to be my misstake by not looking into drivers. I had some simple SYCL try-out code running weeks ago, then updated SYCL and after that it did not run anymore. It did not cross my mind that updating SYCL a bit (I saw sycl7.dll changing into sycl8.dll) could mean that the GPU driver I had was not accepted anymore. After installing newer ones, SYCL code functioned again. Did cost me almost 2 weeks of evenings trying to find out what was going on, good lesson....&lt;/P&gt;&lt;P&gt;So there's not really something here to accept as a solution, other then to stress that drivers should be the first to look at (as mattewwade06 also mentioned).&lt;/P&gt;</description>
      <pubDate>Sat, 21 Feb 2026 14:04:44 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/SYCL-example-keeps-crashing/m-p/1738000#M4689</guid>
      <dc:creator>JeroenBoschma</dc:creator>
      <dc:date>2026-02-21T14:04:44Z</dc:date>
    </item>
  </channel>
</rss>

