From 52db6a55b3f0b12366e9657aea49a7c779277d95 Mon Sep 17 00:00:00 2001 From: Anton Volkov Date: Tue, 1 Dec 2026 12:51:17 +0100 Subject: [PATCH 1/2] Accept the DPClang compiler ID in IntelSYCLConfig.cmake CMake 4.5 identifies the open source DPC++ compiler, version 7.0 and newer, by the new compiler ID `DPClang` instead of `Clang`, with no policy to keep the old one. The vendored `IntelSYCLConfig.cmake` accepted only `Clang` and `IntelLLVM`, so configuring dpnp with the open source DPC++ and CMake 4.5 failed with "Intel SYCL Compiler not found". Both of its compiler-ID checks now accept `DPClang` too. Nothing else in the build depends on the ID: with CMake 4.5.1 every compile and link command of dpnp, its extensions and oneMath is the same as with CMake 4.4.5. --- CHANGELOG.md | 1 + dpnp/backend/cmake/Modules/IntelSYCLConfig.cmake | 3 +++ 2 files changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 08ddc567b3f3..718205dd9c30 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -64,6 +64,7 @@ This release drops support for Python 3.10, making Python 3.11 the minimum requi * Fixed a segfault in `dpnp.from_dlpack` and `dpnp.tensor.from_dlpack` when importing a DLPack tensor on a oneAPI device with NULL strides, which DLPack before 1.2 allows for a C-contiguous tensor [#3183](https://github.com/IntelPython/dpnp/pull/3183) * Fixed `ValueError` in `dpnp.from_dlpack` and `dpnp.tensor.from_dlpack` when copying a 0-d or non-C-contiguous host array to a SYCL device, unless its items are one byte [#3207](https://github.com/IntelPython/dpnp/pull/3207) * Fixed wrong values from `dpnp.from_dlpack` and `dpnp.tensor.from_dlpack` when copying a `float64` or `complex128` host array to a SYCL device without fp64 support, which copied its bytes unchanged into the `float32` or `complex64` result [#3209](https://github.com/IntelPython/dpnp/pull/3209) +* Fixed building with the open source DPC++ compiler and CMake 4.5 or newer, which identifies it as `DPClang` instead of `Clang` [#XXXX](https://github.com/IntelPython/dpnp/pull/XXXX) ### Security diff --git a/dpnp/backend/cmake/Modules/IntelSYCLConfig.cmake b/dpnp/backend/cmake/Modules/IntelSYCLConfig.cmake index d31816871c1f..deff34446d0a 100644 --- a/dpnp/backend/cmake/Modules/IntelSYCLConfig.cmake +++ b/dpnp/backend/cmake/Modules/IntelSYCLConfig.cmake @@ -126,8 +126,10 @@ if("x${CMAKE_CXX_COMPILER_ID}" STREQUAL "x") endif() # Check for known compiler family that supports SYCL +# (CMake 4.5 and newer identify the open source DPC++ 7.0 and newer as DPClang) if( NOT "x${CMAKE_CXX_COMPILER_ID}" STREQUAL "xClang" AND + NOT "x${CMAKE_CXX_COMPILER_ID}" STREQUAL "xDPClang" AND NOT "x${CMAKE_CXX_COMPILER_ID}" STREQUAL "xIntelLLVM") set(IntelSYCL_FOUND False) set(SYCL_REASON_FAILURE "Unsupported compiler family ${CMAKE_CXX_COMPILER_ID} and compiler ${CMAKE_CXX_COMPILER}. Also default Intel SYCL compiler not found in the environment!!") @@ -363,6 +365,7 @@ set(SYCL_LINK_FLAGS "") # Based on Compiler ID, add support for SYCL if( "x${CMAKE_CXX_COMPILER_ID}" STREQUAL "xClang" OR + "x${CMAKE_CXX_COMPILER_ID}" STREQUAL "xDPClang" OR "x${CMAKE_CXX_COMPILER_ID}" STREQUAL "xIntelLLVM" OR IntelSYCL_FOUND) list(APPEND SYCL_FLAGS "-fsycl") list(APPEND SYCL_LINK_FLAGS "-fsycl") From e35ed60aae49ab6779dc60ca10f9b22a6e3b6a11 Mon Sep 17 00:00:00 2001 From: Anton Volkov Date: Tue, 1 Dec 2026 12:52:25 +0100 Subject: [PATCH 2/2] Add gh-3216 to changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 718205dd9c30..9926ae223b29 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -64,7 +64,7 @@ This release drops support for Python 3.10, making Python 3.11 the minimum requi * Fixed a segfault in `dpnp.from_dlpack` and `dpnp.tensor.from_dlpack` when importing a DLPack tensor on a oneAPI device with NULL strides, which DLPack before 1.2 allows for a C-contiguous tensor [#3183](https://github.com/IntelPython/dpnp/pull/3183) * Fixed `ValueError` in `dpnp.from_dlpack` and `dpnp.tensor.from_dlpack` when copying a 0-d or non-C-contiguous host array to a SYCL device, unless its items are one byte [#3207](https://github.com/IntelPython/dpnp/pull/3207) * Fixed wrong values from `dpnp.from_dlpack` and `dpnp.tensor.from_dlpack` when copying a `float64` or `complex128` host array to a SYCL device without fp64 support, which copied its bytes unchanged into the `float32` or `complex64` result [#3209](https://github.com/IntelPython/dpnp/pull/3209) -* Fixed building with the open source DPC++ compiler and CMake 4.5 or newer, which identifies it as `DPClang` instead of `Clang` [#XXXX](https://github.com/IntelPython/dpnp/pull/XXXX) +* Fixed building with the open source DPC++ compiler and CMake 4.5 or newer, which identifies it as `DPClang` instead of `Clang` [#3216](https://github.com/IntelPython/dpnp/pull/3216) ### Security