From 677d4127cac309eec206339ecc51e60976049424 Mon Sep 17 00:00:00 2001 From: "Harlow, Jordan" Date: Tue, 24 Nov 2026 14:35:02 -0700 Subject: [PATCH 01/12] Stop requiring the OpenCL ICD loader library in FindIntelSyclCompiler intel/llvm#23807 stopped installing the OpenCL ICD loader with the SYCL toolchain, so nightly builds from 2026-11-12 on have no lib/OpenCL.lib on Windows and the module failed to find the compiler. dpctl loads the loader at run time, and only the C-API tests link it, so the module now sets IntelSyclCompiler_OPENCL_LIBRARY only if the toolchain has it, and dpctl_c_api_tests links it when set. --- CHANGELOG.md | 1 + libsyclinterface/cmake/modules/FindIntelSyclCompiler.cmake | 4 ++-- libsyclinterface/tests/CMakeLists.txt | 4 +++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d3fa840adf..9cb1dc6ba6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,6 +31,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 * Removed stale `select_host_device` and `has_host_device` names from `dpctl.__all__`, which made `from dpctl import *` fail with `AttributeError` [gh-2410](https://github.com/IntelPython/dpctl/pull/2410) * A USM allocation that fails now drops the references held for offloaded tasks that have completed, and is attempted once more if that released anything, so that memory only waiting to be given up is not reported as unavailable [gh-2359](https://github.com/IntelPython/dpctl/pull/2359) * `dpctl.SyclPlatform.get_devices` no longer prints Unified Runtime warnings for `device_type="custom"` on non-OpenCL platforms, where custom devices are not supported [gh-2306](https://github.com/IntelPython/dpctl/pull/2306) +* Building with the open source DPC++ toolchain no longer requires the toolchain to bundle the OpenCL ICD loader, which `dpctl` loads at run time [gh-2431](https://github.com/IntelPython/dpctl/pull/2431) * Fixed building with the open source DPC++ compiler and CMake 4.5 or newer, which identifies it as `DPClang` instead of `Clang` [gh-2433](https://github.com/IntelPython/dpctl/pull/2433) ### Maintenance diff --git a/libsyclinterface/cmake/modules/FindIntelSyclCompiler.cmake b/libsyclinterface/cmake/modules/FindIntelSyclCompiler.cmake index 8e71d4d2b6..1ac2fc493d 100644 --- a/libsyclinterface/cmake/modules/FindIntelSyclCompiler.cmake +++ b/libsyclinterface/cmake/modules/FindIntelSyclCompiler.cmake @@ -30,7 +30,8 @@ # IntelSyclCompiler_SYCL_INCLUDE_DIR # IntelSyclCompiler_LIBRARY_DIR # IntelSyclCompiler_SYCL_LIBRARY -# IntelSyclCompiler_OPENCL_LIBRARY +# IntelSyclCompiler_OPENCL_LIBRARY, if the toolchain bundles the OpenCL ICD +# loader, which open source DPC++ builds don't include(FindPackageHandleStandardArgs) if(NOT DEFINED IntelSYCL_FOUND OR NOT IntelSYCL_FOUND) @@ -172,5 +173,4 @@ find_package_handle_standard_args(IntelSyclCompiler DEFAULT_MSG IntelSyclCompiler_SYCL_INCLUDE_DIR IntelSyclCompiler_LIBRARY_DIR IntelSyclCompiler_SYCL_LIBRARY - IntelSyclCompiler_OPENCL_LIBRARY ) diff --git a/libsyclinterface/tests/CMakeLists.txt b/libsyclinterface/tests/CMakeLists.txt index 9ef7717bc2..d54f3aef5a 100644 --- a/libsyclinterface/tests/CMakeLists.txt +++ b/libsyclinterface/tests/CMakeLists.txt @@ -79,10 +79,12 @@ target_link_libraries(dpctl_c_api_tests GTest::gtest_main GTest::GTest DPCTLSyclInterface - ${IntelSyclCompiler_OPENCL_LIBRARY} # Seems to work without it... ${CMAKE_DL_LIBS} ) +if(IntelSyclCompiler_OPENCL_LIBRARY) + target_link_libraries(dpctl_c_api_tests ${IntelSyclCompiler_OPENCL_LIBRARY}) +endif() target_include_directories(dpctl_c_api_tests PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/../helper/include" From dceb1871c6879f0d61d696e744fab538d25e1ae6 Mon Sep 17 00:00:00 2001 From: Nikita Grigorian Date: Tue, 1 Dec 2026 13:28:24 -0800 Subject: [PATCH 02/12] accept the clang version in ChkDPCPPVersion open source DPC++ reports its clang version, which __VERSION__ does not contain --- libsyclinterface/tests/test_service.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libsyclinterface/tests/test_service.cpp b/libsyclinterface/tests/test_service.cpp index 95788fed83..5ea593b1e3 100644 --- a/libsyclinterface/tests/test_service.cpp +++ b/libsyclinterface/tests/test_service.cpp @@ -39,6 +39,10 @@ TEST(TestServicesFns, ChkDPCPPVersion) ASSERT_TRUE(ver.length() > 0); std::string ver_from_cmplr(ASSTR(__VERSION__)); +#ifdef __clang_version__ + // open source DPC++ reports its clang version, which __VERSION__ omits + ver_from_cmplr += ASSTR(__clang_version__); +#endif auto found = ver_from_cmplr.find(ver); // version returned by DPCTLService_GetDPCPPVersion From 8545be8568bd6748b29e2cbaa6d4d6ca2a78745b Mon Sep 17 00:00:00 2001 From: Nikita Grigorian Date: Tue, 1 Dec 2026 13:28:33 -0800 Subject: [PATCH 03/12] copy DPCTLSyclInterface.dll next to the C-API tests on Windows test discovery runs the executable after the link --- libsyclinterface/tests/CMakeLists.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/libsyclinterface/tests/CMakeLists.txt b/libsyclinterface/tests/CMakeLists.txt index d54f3aef5a..3d4592319f 100644 --- a/libsyclinterface/tests/CMakeLists.txt +++ b/libsyclinterface/tests/CMakeLists.txt @@ -183,5 +183,15 @@ if(DPCTL_GENERATE_COVERAGE) ) endif() +if(WIN32) + # Windows has no rpath, and test discovery runs the executable after the + # link, so put DPCTLSyclInterface.dll next to it + add_custom_command(TARGET dpctl_c_api_tests POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy_if_different + $ + $ + ) +endif() + gtest_discover_tests(dpctl_c_api_tests) add_dependencies(check dpctl_c_api_tests) From 2f4ab8da94ac8524f9e272b29dfe3f739b771626 Mon Sep 17 00:00:00 2001 From: Nikita Grigorian Date: Tue, 1 Dec 2026 13:28:41 -0800 Subject: [PATCH 04/12] run C-API tests in OS compiler workflows install GTest from apt on Linux and build it from source on Windows --- .../workflows/os-llvm-sycl-build-windows.yml | 37 ++++++++++++++++++- .github/workflows/os-llvm-sycl-build.yml | 23 +++++++++++- 2 files changed, 58 insertions(+), 2 deletions(-) diff --git a/.github/workflows/os-llvm-sycl-build-windows.yml b/.github/workflows/os-llvm-sycl-build-windows.yml index 6b86a35f88..41469f77de 100644 --- a/.github/workflows/os-llvm-sycl-build-windows.yml +++ b/.github/workflows/os-llvm-sycl-build-windows.yml @@ -131,6 +131,28 @@ jobs: $PSNativeCommandUseErrorActionPreference = $true python -m pip install numpy cython "setuptools<80" pytest scikit-build cmake ninja "versioneer[toml]==0.29" + - name: Build GTest + shell: pwsh + env: + GH_TOKEN: ${{ github.token }} + GTEST_VERSION: 1.15.2 + run: | + $ErrorActionPreference = 'Stop' + $PSNativeCommandUseErrorActionPreference = $true + + $root = Join-Path $env:RUNNER_TEMP 'gtest' + $install = Join-Path $root 'install' + gh release download "v$env:GTEST_VERSION" -R google/googletest --archive tar.gz -D $root + & "$env:SystemRoot\System32\tar.exe" -xzf (Join-Path $root "googletest-$env:GTEST_VERSION.tar.gz") -C $root + $src = Join-Path $root "googletest-$env:GTEST_VERSION" + $build = Join-Path $root 'build' + # -fsycl links the dynamic CRT, so GTest must too + cmake -S $src -B $build -A x64 -DBUILD_GMOCK=OFF -Dgtest_force_shared_crt=ON ` + "-DCMAKE_INSTALL_PREFIX=$install" + cmake --build $build --config Release --target install + $gtestDir = (Join-Path $install 'lib\cmake\GTest').Replace('\', '/') + Add-Content -Path $env:GITHUB_ENV -Value "GTEST_DIR=$gtestDir" + - name: Report compiler version shell: pwsh run: clang-cl --version @@ -163,7 +185,10 @@ jobs: rem link.exe can't link the LTO bitcode pybind11 would otherwise build python scripts\build_locally.py --c-compiler=clang-cl.exe --cxx-compiler=clang-cl.exe ^ --compiler-root="%SYCL_BUNDLE_FOLDER%\dpcpp_compiler\bin" ^ - --cmake-opts="-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=OFF" || exit /b 1 + --cmake-opts="-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=OFF -DDPCTL_BUILD_CAPI_TESTS=ON -DGTest_DIR=%GTEST_DIR%" || exit /b 1 + for /d %%d in (_skbuild\*) do ( + cmake --build "%%d\cmake-build" --target dpctl_c_api_tests || exit /b 1 + ) - name: Run lsplatforms shell: pwsh @@ -180,3 +205,13 @@ jobs: $ErrorActionPreference = 'Stop' $PSNativeCommandUseErrorActionPreference = $true python -m pytest -sv dpctl/tests + + - name: Run C-API tests + shell: pwsh + env: + DPCTL_VERBOSITY: warning + run: | + $ErrorActionPreference = 'Stop' + $PSNativeCommandUseErrorActionPreference = $true + Set-Location (Resolve-Path '_skbuild\*\cmake-build\libsyclinterface\tests') + .\dpctl_c_api_tests.exe diff --git a/.github/workflows/os-llvm-sycl-build.yml b/.github/workflows/os-llvm-sycl-build.yml index 90c40afb91..95e1e64fe2 100644 --- a/.github/workflows/os-llvm-sycl-build.yml +++ b/.github/workflows/os-llvm-sycl-build.yml @@ -55,6 +55,11 @@ jobs: run: | sudo apt install lld + - name: Install GTest + shell: bash -l {0} + run: | + sudo apt install -y libgtest-dev + - name: Cache sycl bundle id: cache-sycl-bundle uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 @@ -190,7 +195,8 @@ jobs: run: | source set_allvars.sh python scripts/build_locally.py --c-compiler=clang --cxx-compiler=clang++ \ - --compiler-root="${SYCL_BUNDLE_FOLDER}/dpcpp_compiler/bin" || exit 1 + --compiler-root="${SYCL_BUNDLE_FOLDER}/dpcpp_compiler/bin" \ + --cmake-opts="-DDPCTL_BUILD_CAPI_TESTS=ON" || exit 1 - name: Run lsplatforms shell: bash -l {0} @@ -205,3 +211,18 @@ jobs: run: | source set_allvars.sh python -m pytest -sv dpctl/tests + + - name: Build C-API tests + shell: bash -l {0} + run: | + source set_allvars.sh + cmake --build _skbuild/*/cmake-build --target dpctl_c_api_tests + + - name: Run C-API tests + shell: bash -l {0} + env: + DPCTL_VERBOSITY: warning + run: | + source set_allvars.sh + cd _skbuild/*/cmake-build/libsyclinterface/tests + ./dpctl_c_api_tests From 4665235a3cd7a7b52cd12cda81736cce64577695 Mon Sep 17 00:00:00 2001 From: Nikita Grigorian Date: Tue, 1 Dec 2026 23:04:23 -0800 Subject: [PATCH 05/12] update changelog --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9cb1dc6ba6..ee078d88fc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,11 +31,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 * Removed stale `select_host_device` and `has_host_device` names from `dpctl.__all__`, which made `from dpctl import *` fail with `AttributeError` [gh-2410](https://github.com/IntelPython/dpctl/pull/2410) * A USM allocation that fails now drops the references held for offloaded tasks that have completed, and is attempted once more if that released anything, so that memory only waiting to be given up is not reported as unavailable [gh-2359](https://github.com/IntelPython/dpctl/pull/2359) * `dpctl.SyclPlatform.get_devices` no longer prints Unified Runtime warnings for `device_type="custom"` on non-OpenCL platforms, where custom devices are not supported [gh-2306](https://github.com/IntelPython/dpctl/pull/2306) -* Building with the open source DPC++ toolchain no longer requires the toolchain to bundle the OpenCL ICD loader, which `dpctl` loads at run time [gh-2431](https://github.com/IntelPython/dpctl/pull/2431) * Fixed building with the open source DPC++ compiler and CMake 4.5 or newer, which identifies it as `DPClang` instead of `Clang` [gh-2433](https://github.com/IntelPython/dpctl/pull/2433) +* Building with the open source DPC++ toolchain no longer requires the toolchain to bundle the OpenCL ICD loader, which `dpctl` loads at run time [gh-2435](https://github.com/IntelPython/dpctl/pull/2435) ### Maintenance * Removed the `-fno-sycl-id-queries-fit-in-int` compile option, which none of the `dpctl` extensions need since `dpctl.tensor` moved to `dpnp` [gh-2413](https://github.com/IntelPython/dpctl/pull/2413) +* The C-API tests are now built and run in the workflows using the open source DPC++ compiler on Linux and Windows [gh-2435](https://github.com/IntelPython/dpctl/pull/2435) ## [0.23.0] - Oct. 22, 2026 From ae4b013a0d531c314e356e64433975e19a3c210b Mon Sep 17 00:00:00 2001 From: Nikita Grigorian Date: Wed, 2 Dec 2026 07:07:27 -0800 Subject: [PATCH 06/12] check __VERSION__ and __clang_version__ separately in ChkDPCPPVersion --- libsyclinterface/tests/test_service.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/libsyclinterface/tests/test_service.cpp b/libsyclinterface/tests/test_service.cpp index 5ea593b1e3..7b2946b14e 100644 --- a/libsyclinterface/tests/test_service.cpp +++ b/libsyclinterface/tests/test_service.cpp @@ -38,15 +38,15 @@ TEST(TestServicesFns, ChkDPCPPVersion) std::string ver = std::string(c_ver); ASSERT_TRUE(ver.length() > 0); + // version returned by DPCTLService_GetDPCPPVersion + // should occur as a substring in the version obtained + // from compiler std::string ver_from_cmplr(ASSTR(__VERSION__)); + bool found = ver_from_cmplr.find(ver) != std::string::npos; #ifdef __clang_version__ // open source DPC++ reports its clang version, which __VERSION__ omits - ver_from_cmplr += ASSTR(__clang_version__); + std::string clang_ver(ASSTR(__clang_version__)); + found = found || clang_ver.find(ver) != std::string::npos; #endif - auto found = ver_from_cmplr.find(ver); - - // version returned by DPCTLService_GetDPCPPVersion - // should occur as a substring in the version obtained - // from compiler - ASSERT_TRUE(found != std::string::npos); + ASSERT_TRUE(found); } From 68e86de29375cea85069784fc166258275deed5b Mon Sep 17 00:00:00 2001 From: Nikita Grigorian Date: Wed, 2 Dec 2026 07:07:30 -0800 Subject: [PATCH 07/12] resolve the single build directory in the Windows OS compiler workflow Fail if _skbuild has more or less than one build directory, and pass it to the C-API test step through BUILD_DIR --- .github/workflows/os-llvm-sycl-build-windows.yml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/os-llvm-sycl-build-windows.yml b/.github/workflows/os-llvm-sycl-build-windows.yml index 41469f77de..4fd5d8c361 100644 --- a/.github/workflows/os-llvm-sycl-build-windows.yml +++ b/.github/workflows/os-llvm-sycl-build-windows.yml @@ -186,9 +186,20 @@ jobs: python scripts\build_locally.py --c-compiler=clang-cl.exe --cxx-compiler=clang-cl.exe ^ --compiler-root="%SYCL_BUNDLE_FOLDER%\dpcpp_compiler\bin" ^ --cmake-opts="-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=OFF -DDPCTL_BUILD_CAPI_TESTS=ON -DGTest_DIR=%GTEST_DIR%" || exit /b 1 + set "BUILD_DIR=" for /d %%d in (_skbuild\*) do ( - cmake --build "%%d\cmake-build" --target dpctl_c_api_tests || exit /b 1 + if defined BUILD_DIR ( + echo ::error::more than one build directory in _skbuild + exit /b 1 + ) + set "BUILD_DIR=%CD%\%%d\cmake-build" ) + if not defined BUILD_DIR ( + echo ::error::no build directory in _skbuild + exit /b 1 + ) + cmake --build "%BUILD_DIR%" --target dpctl_c_api_tests || exit /b 1 + echo BUILD_DIR=%BUILD_DIR%>> "%GITHUB_ENV%" - name: Run lsplatforms shell: pwsh @@ -213,5 +224,5 @@ jobs: run: | $ErrorActionPreference = 'Stop' $PSNativeCommandUseErrorActionPreference = $true - Set-Location (Resolve-Path '_skbuild\*\cmake-build\libsyclinterface\tests') + Set-Location (Join-Path $env:BUILD_DIR 'libsyclinterface\tests') .\dpctl_c_api_tests.exe From 4cdf5c3b3c9f8b7c75a5718c8d0496898d8b54e6 Mon Sep 17 00:00:00 2001 From: Nikita Grigorian Date: Wed, 2 Dec 2026 11:11:25 -0800 Subject: [PATCH 08/12] stop linking the C-API tests to the OpenCL ICD loader Nothing in the tests calls OpenCL directly, and libDPCTLSyclInterface loads the loader at run time, so drop the lookup of IntelSyclCompiler_OPENCL_LIBRARY. --- .../cmake/modules/FindIntelSyclCompiler.cmake | 12 ------------ libsyclinterface/tests/CMakeLists.txt | 3 --- 2 files changed, 15 deletions(-) diff --git a/libsyclinterface/cmake/modules/FindIntelSyclCompiler.cmake b/libsyclinterface/cmake/modules/FindIntelSyclCompiler.cmake index 1ac2fc493d..8d5e95fd3b 100644 --- a/libsyclinterface/cmake/modules/FindIntelSyclCompiler.cmake +++ b/libsyclinterface/cmake/modules/FindIntelSyclCompiler.cmake @@ -30,8 +30,6 @@ # IntelSyclCompiler_SYCL_INCLUDE_DIR # IntelSyclCompiler_LIBRARY_DIR # IntelSyclCompiler_SYCL_LIBRARY -# IntelSyclCompiler_OPENCL_LIBRARY, if the toolchain bundles the OpenCL ICD -# loader, which open source DPC++ builds don't include(FindPackageHandleStandardArgs) if(NOT DEFINED IntelSYCL_FOUND OR NOT IntelSYCL_FOUND) @@ -129,22 +127,12 @@ if(${clangxx_result} MATCHES "0") NAMES "sycl.lib" "sycl6.lib" "sycl7.lib" "sycl8.lib" PATHS ${IntelSyclCompiler_LIBRARY_DIR} ) - find_file( - IntelSyclCompiler_OPENCL_LIBRARY - NAMES "OpenCL.lib" - PATHS ${IntelSyclCompiler_LIBRARY_DIR} - ) elseif("x${CMAKE_SYSTEM_NAME}" STREQUAL "xLinux") find_file( IntelSyclCompiler_SYCL_LIBRARY NAMES "libsycl.so" PATHS ${IntelSyclCompiler_LIBRARY_DIR} ) - find_file( - IntelSyclCompiler_OPENCL_LIBRARY - NAMES "libOpenCL.so" - PATHS ${IntelSyclCompiler_LIBRARY_DIR} - ) endif() endif() diff --git a/libsyclinterface/tests/CMakeLists.txt b/libsyclinterface/tests/CMakeLists.txt index 3d4592319f..97ed3a0ec6 100644 --- a/libsyclinterface/tests/CMakeLists.txt +++ b/libsyclinterface/tests/CMakeLists.txt @@ -82,9 +82,6 @@ target_link_libraries(dpctl_c_api_tests # Seems to work without it... ${CMAKE_DL_LIBS} ) -if(IntelSyclCompiler_OPENCL_LIBRARY) - target_link_libraries(dpctl_c_api_tests ${IntelSyclCompiler_OPENCL_LIBRARY}) -endif() target_include_directories(dpctl_c_api_tests PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/../helper/include" From e31be7818c6335194576990495531413f4128669 Mon Sep 17 00:00:00 2001 From: Nikita Grigorian Date: Wed, 2 Dec 2026 12:14:50 -0800 Subject: [PATCH 09/12] stop linking the C-API tests to libdl The tests make no dlopen calls. --- libsyclinterface/tests/CMakeLists.txt | 2 -- 1 file changed, 2 deletions(-) diff --git a/libsyclinterface/tests/CMakeLists.txt b/libsyclinterface/tests/CMakeLists.txt index 97ed3a0ec6..dac01ad743 100644 --- a/libsyclinterface/tests/CMakeLists.txt +++ b/libsyclinterface/tests/CMakeLists.txt @@ -79,8 +79,6 @@ target_link_libraries(dpctl_c_api_tests GTest::gtest_main GTest::GTest DPCTLSyclInterface - # Seems to work without it... - ${CMAKE_DL_LIBS} ) target_include_directories(dpctl_c_api_tests PRIVATE From cd20e9737abeacbd95d70a7d983666fd2e2e6be2 Mon Sep 17 00:00:00 2001 From: Nikita Grigorian Date: Thu, 3 Dec 2026 11:23:41 -0800 Subject: [PATCH 10/12] stop copying the OpenCL ICD loader into the Linux nightly bundle Also remove the copy that earlier runs left in the cached bundle, so CI builds without a bundled loader --- .github/workflows/os-llvm-sycl-build.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/os-llvm-sycl-build.yml b/.github/workflows/os-llvm-sycl-build.yml index 95e1e64fe2..9c8feb89a7 100644 --- a/.github/workflows/os-llvm-sycl-build.yml +++ b/.github/workflows/os-llvm-sycl-build.yml @@ -149,7 +149,8 @@ jobs: mkdir -p oclcpuexp [ -d oclcpuexp/x64 ] || tar xf "${OCLCPUEXP_FN}" -C oclcpuexp || exit 1 [ -d "${TBB_INSTALL_DIR}/lib" ] || tar xf "${TBB_FN}" || exit 1 - cp -f oclcpuexp/x64/libOpenCL.so* dpcpp_compiler/lib/ || exit 1 + # earlier runs copied the OpenCL loader into the cached bundle + rm -f dpcpp_compiler/lib/libOpenCL.so* - name: Setup Python uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0 From 9ef74cc1bb3cd4ad2300f6c47a54e0985f9d7b03 Mon Sep 17 00:00:00 2001 From: Nikita Grigorian Date: Thu, 3 Dec 2026 11:23:43 -0800 Subject: [PATCH 11/12] build the C-API tests in their own step on Windows A failed C-API test build no longer skips dpctl/tests --- .github/workflows/os-llvm-sycl-build-windows.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/os-llvm-sycl-build-windows.yml b/.github/workflows/os-llvm-sycl-build-windows.yml index 4fd5d8c361..d3d0604353 100644 --- a/.github/workflows/os-llvm-sycl-build-windows.yml +++ b/.github/workflows/os-llvm-sycl-build-windows.yml @@ -198,8 +198,8 @@ jobs: echo ::error::no build directory in _skbuild exit /b 1 ) - cmake --build "%BUILD_DIR%" --target dpctl_c_api_tests || exit /b 1 echo BUILD_DIR=%BUILD_DIR%>> "%GITHUB_ENV%" + echo VS_PATH=%VS_PATH%>> "%GITHUB_ENV%" - name: Run lsplatforms shell: pwsh @@ -217,6 +217,13 @@ jobs: $PSNativeCommandUseErrorActionPreference = $true python -m pytest -sv dpctl/tests + - name: Build C-API tests + shell: cmd + run: | + call "%VS_PATH%\VC\Auxiliary\Build\vcvars64.bat" || exit /b 1 + set "LIB=%SYCL_BUNDLE_FOLDER%\dpcpp_compiler\lib;%LIB%" + cmake --build "%BUILD_DIR%" --target dpctl_c_api_tests || exit /b 1 + - name: Run C-API tests shell: pwsh env: From cce4a4390315aad2a9f324969eafd0569235a286 Mon Sep 17 00:00:00 2001 From: Nikita Grigorian Date: Thu, 3 Dec 2026 11:23:44 -0800 Subject: [PATCH 12/12] free the version string in ChkDPCPPVersion --- libsyclinterface/tests/test_service.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libsyclinterface/tests/test_service.cpp b/libsyclinterface/tests/test_service.cpp index 7b2946b14e..6e4086f890 100644 --- a/libsyclinterface/tests/test_service.cpp +++ b/libsyclinterface/tests/test_service.cpp @@ -26,6 +26,7 @@ #include "Config/dpctl_config.h" #include "dpctl_service.h" +#include "dpctl_utils.h" #include #include @@ -36,6 +37,7 @@ TEST(TestServicesFns, ChkDPCPPVersion) { auto c_ver = DPCTLService_GetDPCPPVersion(); std::string ver = std::string(c_ver); + DPCTLCString_Delete(c_ver); ASSERT_TRUE(ver.length() > 0); // version returned by DPCTLService_GetDPCPPVersion