From 35e707f21e4dcd496e180c8f679a185eefe8a7b5 Mon Sep 17 00:00:00 2001 From: Anton Volkov Date: Thu, 6 Aug 2026 14:33:33 +0200 Subject: [PATCH 01/18] Add workflow to build and test dpnp with open source LLVM SYCL compiler Adapt dpctl's os-llvm-sycl-build workflow to dpnp: download the nightly open source DPC++ toolchain, build dpnp against it via build_locally.py, and run the test suite. Triggered manually only for now. --- .github/workflows/os-llvm-sycl-build.yml | 157 +++++++++++++++++++++++ 1 file changed, 157 insertions(+) create mode 100644 .github/workflows/os-llvm-sycl-build.yml diff --git a/.github/workflows/os-llvm-sycl-build.yml b/.github/workflows/os-llvm-sycl-build.yml new file mode 100644 index 00000000000..be99de9d379 --- /dev/null +++ b/.github/workflows/os-llvm-sycl-build.yml @@ -0,0 +1,157 @@ +name: Build with Open Source LLVM SYCL compiler + +on: + # To be able to be triggered manually + workflow_dispatch: + +permissions: read-all + +jobs: + install-compiler: + name: Build with nightly build of DPC++ toolchain + + runs-on: ubuntu-latest + timeout-minutes: 120 + + defaults: + run: + shell: bash -el {0} + + env: + DOWNLOAD_URL_PREFIX: https://github.com/intel/llvm/releases/download + DRIVER_PATH: 2026-WW28 + OCLCPUEXP_FN: oclcpuexp-2026.22.6.1.17_160000_rel.tar.gz + TBB_URL: https://github.com/uxlfoundation/oneTBB/releases/download/v2023.1.0/ + TBB_INSTALL_DIR: oneapi-tbb-2023.1.0 + TBB_FN: oneapi-tbb-2023.1.0-lin.tgz + + steps: + - name: Cancel Previous Runs + uses: styfle/cancel-workflow-action@d07a454dad7609a92316b57b23c9ccfd4f59af66 # 0.13.1 + with: + access_token: ${{ github.token }} + + - name: Install hwloc + run: sudo apt install hwloc + + - name: Install lld + run: sudo apt install lld + + - name: Download and install nightly and components + env: + ARTIFACT_NAME: sycl_linux + USE_LATEST_SYCLOS: 1 + run: | + cd /home/runner/work + mkdir -p sycl_bundle + cd sycl_bundle + if [[ "${USE_LATEST_SYCLOS:-0}" -eq "1" ]]; then + # get list of shas and tags from remote, filter nightly tags and reverse order + LLVM_TAGS=$(git -c 'versionsort.suffix=-' ls-remote --tags --sort='v:refname' https://github.com/intel/llvm.git | \ + grep 'refs/tags/nightly-' | awk '{a[i++]=$0} END {for (j=i-1; j>=0;) print a[j--] }') + export LLVM_TAGS + # initialize + unset DEPLOY_NIGHTLY_TAG + unset DEPLOY_NIGHTLY_TAG_SHA + + # go through tags and find the most recent one where nighly build binary is available + while IFS= read -r NEXT_LLVM_TAG; do + NEXT_LLVM_TAG_SHA=$(echo "${NEXT_LLVM_TAG}" | awk '{print $1}') + export NEXT_LLVM_TAG_SHA + NEXT_NIGHTLY_TAG=$(python3 -c "import sys, urllib.parse as ul; print(ul.quote_plus(sys.argv[1]))" \ + "$(echo "${NEXT_LLVM_TAG}" | awk '{gsub(/^refs\/tags\//, "", $2)} {print $2}')") + export NEXT_NIGHTLY_TAG + if wget -S --spider "${DOWNLOAD_URL_PREFIX}/${NEXT_NIGHTLY_TAG}/${ARTIFACT_NAME}.tar.gz" 2>&1 | grep -q 'HTTP/1.1 200 OK'; + then + DEPLOY_NIGHTLY_TAG="${NEXT_NIGHTLY_TAG}" + export DEPLOY_NIGHTLY_TAG + DEPLOY_LLVM_TAG_SHA="${NEXT_LLVM_TAG_SHA}" + export DEPLOY_LLVM_TAG_SHA + break + fi + done <<< "${LLVM_TAGS}" + else + # Use latest known to work tag instead + DEPLOY_NIGHTLY_TAG="sycl-nightly%2F20230606" + export DEPLOY_NIGHTLY_TAG + DEPLOY_LLVM_TAG_SHA=f44d0133d4b0077298f034697a1f3818ff1d6134 + export DEPLOY_LLVM_TAG_SHA + fi + + [[ -n "${DEPLOY_NIGHTLY_TAG}" ]] || exit 1 + [[ -n "${DEPLOY_LLVM_TAG_SHA}" ]] || exit 1 + echo "Using ${DEPLOY_NIGHTLY_TAG} corresponding to intel/llvm at ${DEPLOY_LLVM_TAG_SHA}" + + rm -rf "${ARTIFACT_NAME}.tar.gz" + wget "${DOWNLOAD_URL_PREFIX}/${DEPLOY_NIGHTLY_TAG}/${ARTIFACT_NAME}.tar.gz" + wget "${DOWNLOAD_URL_PREFIX}/${DRIVER_PATH}/${OCLCPUEXP_FN}" + wget "${TBB_URL}/${TBB_FN}" + mkdir -p dpcpp_compiler + tar xf "${ARTIFACT_NAME}.tar.gz" -C dpcpp_compiler + mkdir -p oclcpuexp + tar xf "${OCLCPUEXP_FN}" -C oclcpuexp + tar xf "${TBB_FN}" + cp oclcpuexp/x64/libOpenCL.so* dpcpp_compiler/lib/ + + - name: Setup Python + uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 + with: + python-version: '3.14' + + - name: Install dpnp dependencies + run: | + pip install numpy cython setuptools"<80" pytest scikit-build cmake ninja versioneer[toml]==0.29 \ + dpctl mkl-devel-dpcpp onedpl-devel + + - name: Checkout repo + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + fetch-depth: 0 + + - name: Create set_allvars.sh + run: | + cat << 'EOF' > set_allvars.sh + #!/usr/bin/bash + export SYCL_BUNDLE_FOLDER=/home/runner/work/sycl_bundle + export PATH=${SYCL_BUNDLE_FOLDER}/dpcpp_compiler/bin:${PATH} + export LD_LIBRARY_PATH=${SYCL_BUNDLE_FOLDER}/dpcpp_compiler/lib:${LD_LIBRARY_PATH} + export LD_LIBRARY_PATH=${SYCL_BUNDLE_FOLDER}/oclcpuexp/x64:${LD_LIBRARY_PATH} + export LD_LIBRARY_PATH=${SYCL_BUNDLE_FOLDER}/${TBB_INSTALL_DIR}/lib/intel64/gcc4.8:${LD_LIBRARY_PATH} + export OCL_ICD_VENDORS= + export OCL_ICD_FILENAMES=libintelocl.so + # Help CMake find MKL/oneDPL/TBB shipped in the Python environment + export MKLROOT=$(python -c "import sys, os; print(os.path.dirname(os.path.dirname(sys.executable)))") + export TBBROOT=${SYCL_BUNDLE_FOLDER}/${TBB_INSTALL_DIR} + EOF + chmod +x set_allvars.sh + cat set_allvars.sh + + - name: Report compiler version + run: | + source set_allvars.sh + clang++ --version + + - name: Run sycl-ls + run: | + source set_allvars.sh + sycl-ls + + - name: Build dpnp + 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 + + - name: Smoke test + run: | + source set_allvars.sh + python -m dpctl -f + python -c "import dpnp; print(dpnp.__version__)" + + - name: Run dpnp/tests + env: + SYCL_CACHE_PERSISTENT: 1 + SKIP_TENSOR_TESTS: 0 + run: | + source set_allvars.sh + python -m pytest -ra dpnp/tests From 56dd2f7470f714a055d531887580de5878a5d2de Mon Sep 17 00:00:00 2001 From: Anton Volkov Date: Thu, 6 Aug 2026 14:49:14 +0200 Subject: [PATCH 02/18] Force vendored IntelSYCLConfig for open source DPC++ build The open source DPC++ nightly ships an IntelSYCLConfig.cmake that does not define add_sycl_to_target(), which dpnp's CMake relies on. Point IntelSYCL_DIR at dpnp's vendored Modules directory so the module that provides the function is used instead. --- .github/workflows/os-llvm-sycl-build.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/os-llvm-sycl-build.yml b/.github/workflows/os-llvm-sycl-build.yml index be99de9d379..7f08c905521 100644 --- a/.github/workflows/os-llvm-sycl-build.yml +++ b/.github/workflows/os-llvm-sycl-build.yml @@ -139,8 +139,12 @@ jobs: - name: Build dpnp run: | source set_allvars.sh + # The open source DPC++ nightly ships an IntelSYCLConfig.cmake that + # lacks add_sycl_to_target(), so force the vendored module which + # provides it. 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="-DIntelSYCL_DIR=${GITHUB_WORKSPACE}/dpnp/backend/cmake/Modules" || exit 1 - name: Smoke test run: | From 51099406bb1a42a20fc6f74f99c0f2fbd044be3b Mon Sep 17 00:00:00 2001 From: Anton Volkov Date: Thu, 6 Aug 2026 15:03:19 +0200 Subject: [PATCH 03/18] Parse open source clang version in vendored IntelSYCLConfig The vendored IntelSYCLConfig.cmake only recognized the Intel compiler version string ("Intel(R) ... Compiler X.Y.Z"). The open source DPC++ nightly reports "clang version X.Y.Zgit", so parse_compiler_version() returned empty and the module bailed out with an early return() before defining add_sycl_to_target(), leaving dpnp's CMake unable to use it. Add an else branch to parse the "clang version X.Y.Z" string so the module completes and defines add_sycl_to_target() when building with the open source LLVM SYCL compiler. The Intel compiler path is unchanged. --- dpnp/backend/cmake/Modules/IntelSYCLConfig.cmake | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/dpnp/backend/cmake/Modules/IntelSYCLConfig.cmake b/dpnp/backend/cmake/Modules/IntelSYCLConfig.cmake index 7ba269c70c0..d31816871c1 100644 --- a/dpnp/backend/cmake/Modules/IntelSYCLConfig.cmake +++ b/dpnp/backend/cmake/Modules/IntelSYCLConfig.cmake @@ -172,6 +172,18 @@ function(parse_compiler_version compiler_name version_number) # Parse Intel Compiler Version string(REGEX REPLACE "Intel\\(R\\) (.*) Compiler ([0-9]+\\.[0-9]+\\.[0-9]+) (.*)" "\\2" SYCL_VERSION_STRING_MATCH ${INTEL_VERSION_STRING}) + else() + # Open source DPC++/LLVM SYCL compiler reports e.g. + # "clang version 23.0.0git (https://github.com/intel/llvm ...)" + string(REGEX MATCH "clang version ([0-9]+\\.[0-9]+\\.[0-9]+)" + CLANG_VERSION_STRING ${COMPILER_VERSION_STRING}) + if(CLANG_VERSION_STRING) + string(REGEX REPLACE "clang version ([0-9]+\\.[0-9]+\\.[0-9]+)" "\\1" + SYCL_VERSION_STRING_MATCH ${CLANG_VERSION_STRING}) + endif() + endif() + + if(SYCL_VERSION_STRING_MATCH) string(REPLACE "." ";" SYCL_VERSION_LIST ${SYCL_VERSION_STRING_MATCH}) list(GET SYCL_VERSION_LIST 0 VERSION_MAJOR) list(GET SYCL_VERSION_LIST 1 VERSION_MINOR) From 315137355db877bbfd7b3f2a265dbe5fb387b67d Mon Sep 17 00:00:00 2001 From: Anton Volkov Date: Thu, 6 Aug 2026 15:58:30 +0200 Subject: [PATCH 04/18] Set oneDPL_ROOT so pip oneDPL headers are found Configuration succeeded but compilation failed with "'oneapi/dpl/numeric' file not found": find_package(oneDPL) loaded the vendored oneDPLConfig.cmake (via PATHS), which resolves headers relative to the source tree where oneapi/dpl does not exist. The pip onedpl-devel package ships a proper oneDPLConfig.cmake under /lib/cmake/oneDPL that resolves headers to /include. Export oneDPL_ROOT pointing at the Python prefix so that config wins (oneDPL_ROOT has higher search priority than PATHS in CONFIG mode). --- .github/workflows/os-llvm-sycl-build.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/os-llvm-sycl-build.yml b/.github/workflows/os-llvm-sycl-build.yml index 7f08c905521..ffb7bebfafe 100644 --- a/.github/workflows/os-llvm-sycl-build.yml +++ b/.github/workflows/os-llvm-sycl-build.yml @@ -119,8 +119,10 @@ jobs: export LD_LIBRARY_PATH=${SYCL_BUNDLE_FOLDER}/${TBB_INSTALL_DIR}/lib/intel64/gcc4.8:${LD_LIBRARY_PATH} export OCL_ICD_VENDORS= export OCL_ICD_FILENAMES=libintelocl.so - # Help CMake find MKL/oneDPL/TBB shipped in the Python environment - export MKLROOT=$(python -c "import sys, os; print(os.path.dirname(os.path.dirname(sys.executable)))") + # Help CMake find MKL/oneDPL/TBB shipped in the Python environment. + PYTHON_PREFIX=$(python -c "import sys, os; print(os.path.dirname(os.path.dirname(sys.executable)))") + export MKLROOT=${PYTHON_PREFIX} + export oneDPL_ROOT=${PYTHON_PREFIX} export TBBROOT=${SYCL_BUNDLE_FOLDER}/${TBB_INSTALL_DIR} EOF chmod +x set_allvars.sh From 4328ddfac4b55cca4ef831a1ad7e9012ef6b185c Mon Sep 17 00:00:00 2001 From: Anton Volkov Date: Thu, 6 Aug 2026 16:42:33 +0200 Subject: [PATCH 05/18] Add pip include dir to CPATH for oneDPL/MKL headers Setting oneDPL_ROOT only affects the CMake oneDPL target's include dirs, but the dpnp extensions include etc. without linking that target, relying on the compiler's default include path. The Intel oneAPI compiler bundles these headers; the open source DPC++ nightly does not, so compilation failed with "'oneapi/dpl/numeric' file not found". Export CPATH with the pip package's include directory so the oneDPL, MKL and TBB headers are on the default compiler search path. --- .github/workflows/os-llvm-sycl-build.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/os-llvm-sycl-build.yml b/.github/workflows/os-llvm-sycl-build.yml index ffb7bebfafe..020df7bbbf4 100644 --- a/.github/workflows/os-llvm-sycl-build.yml +++ b/.github/workflows/os-llvm-sycl-build.yml @@ -124,6 +124,11 @@ jobs: export MKLROOT=${PYTHON_PREFIX} export oneDPL_ROOT=${PYTHON_PREFIX} export TBBROOT=${SYCL_BUNDLE_FOLDER}/${TBB_INSTALL_DIR} + # The open source DPC++ compiler does not bundle oneDPL/MKL headers. + # dpnp extensions include e.g. without linking the + # oneDPL target, so expose the pip package headers on the default + # compiler include path. + export CPATH=${PYTHON_PREFIX}/include:${CPATH} EOF chmod +x set_allvars.sh cat set_allvars.sh From 0947d07f0e95f99ea9c53877300b9f50b03be586 Mon Sep 17 00:00:00 2001 From: Anton Volkov Date: Fri, 7 Aug 2026 12:20:02 +0200 Subject: [PATCH 06/18] Install dev dpctl from dppy channel in open source SYCL build The final "pip install -e ." failed resolving dpnp's own runtime pin dpctl>=0.23.0dev0, which is published only on the dppy dev channel and not on PyPI (max 0.22.1). Install dpctl from environments/dpctl_pkg.txt (which points at the dppy dev index) instead of PyPI so the pin is satisfied. --- .github/workflows/os-llvm-sycl-build.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/os-llvm-sycl-build.yml b/.github/workflows/os-llvm-sycl-build.yml index 020df7bbbf4..333abcc82b2 100644 --- a/.github/workflows/os-llvm-sycl-build.yml +++ b/.github/workflows/os-llvm-sycl-build.yml @@ -24,6 +24,7 @@ jobs: TBB_URL: https://github.com/uxlfoundation/oneTBB/releases/download/v2023.1.0/ TBB_INSTALL_DIR: oneapi-tbb-2023.1.0 TBB_FN: oneapi-tbb-2023.1.0-lin.tgz + dpctl-pkg-txt: 'environments/dpctl_pkg.txt' steps: - name: Cancel Previous Runs @@ -101,7 +102,8 @@ jobs: - name: Install dpnp dependencies run: | pip install numpy cython setuptools"<80" pytest scikit-build cmake ninja versioneer[toml]==0.29 \ - dpctl mkl-devel-dpcpp onedpl-devel + mkl-devel-dpcpp onedpl-devel + pip install -r ${{ env.dpctl-pkg-txt }} - name: Checkout repo uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 From 1fa42502983483a3b0dce1d3375d0657b6b53151 Mon Sep 17 00:00:00 2001 From: Anton Volkov Date: Fri, 7 Aug 2026 12:35:22 +0200 Subject: [PATCH 07/18] Checkout repo before installing dpnp dependencies The dependencies step now reads environments/dpctl_pkg.txt, which only exists after checkout. Move the checkout step ahead of the dependency install so the requirements file is present. --- .github/workflows/os-llvm-sycl-build.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/os-llvm-sycl-build.yml b/.github/workflows/os-llvm-sycl-build.yml index 333abcc82b2..8944f9c8f58 100644 --- a/.github/workflows/os-llvm-sycl-build.yml +++ b/.github/workflows/os-llvm-sycl-build.yml @@ -99,17 +99,17 @@ jobs: with: python-version: '3.14' + - name: Checkout repo + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + fetch-depth: 0 + - name: Install dpnp dependencies run: | pip install numpy cython setuptools"<80" pytest scikit-build cmake ninja versioneer[toml]==0.29 \ mkl-devel-dpcpp onedpl-devel pip install -r ${{ env.dpctl-pkg-txt }} - - name: Checkout repo - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - fetch-depth: 0 - - name: Create set_allvars.sh run: | cat << 'EOF' > set_allvars.sh From 8b5fb42000c0c974e8dcce9236313cd27c3c11c7 Mon Sep 17 00:00:00 2001 From: Anton Volkov Date: Fri, 7 Aug 2026 13:18:40 +0200 Subject: [PATCH 08/18] Use *_INCLUDE_PATH for pip headers to suppress warnings CPATH adds directories as -I, so headers from the pip packages were treated as non-system and their deprecation warnings were shown, despite dpnp's CMake marking the compiler's SYCL include dir as SYSTEM. Switch to C_INCLUDE_PATH/CPLUS_INCLUDE_PATH, which are treated as -isystem, so the oneDPL/MKL/SYCL headers are found and their warnings stay suppressed. --- .github/workflows/os-llvm-sycl-build.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/os-llvm-sycl-build.yml b/.github/workflows/os-llvm-sycl-build.yml index 8944f9c8f58..cfef444714a 100644 --- a/.github/workflows/os-llvm-sycl-build.yml +++ b/.github/workflows/os-llvm-sycl-build.yml @@ -129,8 +129,11 @@ jobs: # The open source DPC++ compiler does not bundle oneDPL/MKL headers. # dpnp extensions include e.g. without linking the # oneDPL target, so expose the pip package headers on the default - # compiler include path. - export CPATH=${PYTHON_PREFIX}/include:${CPATH} + # compiler include path. Use the *_INCLUDE_PATH vars (treated as + # -isystem) rather than CPATH (-I) so deprecation warnings from these + # headers stay suppressed. + export C_INCLUDE_PATH=${PYTHON_PREFIX}/include:${C_INCLUDE_PATH} + export CPLUS_INCLUDE_PATH=${PYTHON_PREFIX}/include:${CPLUS_INCLUDE_PATH} EOF chmod +x set_allvars.sh cat set_allvars.sh From f7185f24507a7d940718afe8ad3b25fdd91ab2b6 Mon Sep 17 00:00:00 2001 From: Anton Volkov Date: Fri, 7 Aug 2026 14:08:52 +0200 Subject: [PATCH 09/18] Build dpctl from source with the nightly SYCL compiler The dpnp build linked against the open source nightly libsycl, but the pip dpctl (dppy dev channel) is built against Intel's released compiler and its libsycl.so.9 lacks symbols the nightly provides (e.g. sycl::_V1::detail::defaultAsyncHandler), so importing dpnp failed with an undefined symbol error at runtime. Check out IntelPython/dpctl and build it from source with the same nightly compiler (mirroring dpctl's own os-llvm-sycl-build workflow) so dpctl and dpnp share one SYCL runtime. Drop the pip dpctl install. --- .github/workflows/os-llvm-sycl-build.yml | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/.github/workflows/os-llvm-sycl-build.yml b/.github/workflows/os-llvm-sycl-build.yml index cfef444714a..dca92a3ef3a 100644 --- a/.github/workflows/os-llvm-sycl-build.yml +++ b/.github/workflows/os-llvm-sycl-build.yml @@ -24,7 +24,7 @@ jobs: TBB_URL: https://github.com/uxlfoundation/oneTBB/releases/download/v2023.1.0/ TBB_INSTALL_DIR: oneapi-tbb-2023.1.0 TBB_FN: oneapi-tbb-2023.1.0-lin.tgz - dpctl-pkg-txt: 'environments/dpctl_pkg.txt' + dpctl-repo-path: '${{ github.workspace }}/dpctl' steps: - name: Cancel Previous Runs @@ -104,11 +104,17 @@ jobs: with: fetch-depth: 0 + - name: Checkout dpctl repo + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + repository: IntelPython/dpctl + fetch-depth: 0 + path: ${{ env.dpctl-repo-path }} + - name: Install dpnp dependencies run: | pip install numpy cython setuptools"<80" pytest scikit-build cmake ninja versioneer[toml]==0.29 \ mkl-devel-dpcpp onedpl-devel - pip install -r ${{ env.dpctl-pkg-txt }} - name: Create set_allvars.sh run: | @@ -148,6 +154,17 @@ jobs: source set_allvars.sh sycl-ls + - name: Build and install dpctl + run: | + source "${GITHUB_WORKSPACE}/set_allvars.sh" + # dpnp pins dpctl>=0.23.0dev0, which is only published for Intel's + # released compiler and is ABI-incompatible with the open source + # nightly. Build dpctl from source with the same nightly so both + # share one SYCL runtime. + python scripts/build_locally.py --c-compiler=clang --cxx-compiler=clang++ \ + --compiler-root="${SYCL_BUNDLE_FOLDER}/dpcpp_compiler/bin" || exit 1 + working-directory: ${{ env.dpctl-repo-path }} + - name: Build dpnp run: | source set_allvars.sh From ff44339de371b0651aceab1c42f092a7fd6c4d39 Mon Sep 17 00:00:00 2001 From: Anton Volkov Date: Fri, 7 Aug 2026 14:21:49 +0200 Subject: [PATCH 10/18] Install dpctl non-editable so its CMake config is generated Building dpctl editable compiled the extensions but skipped CMake's install step, so dpctl/resources/cmake (where `python -m dpctl --cmakedir` points) had no DpctlConfig.cmake and dpnp's find_package(Dpctl) failed. Install dpctl with a plain "pip install . --no-build-isolation --no-deps" so scikit-build runs the install step and lays out include/ and resources/cmake properly. --no-deps keeps intel-sycl-rt off PyPI so the nightly libsycl on LD_LIBRARY_PATH remains the only SYCL runtime. --- .github/workflows/os-llvm-sycl-build.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/os-llvm-sycl-build.yml b/.github/workflows/os-llvm-sycl-build.yml index dca92a3ef3a..7863f6c56e5 100644 --- a/.github/workflows/os-llvm-sycl-build.yml +++ b/.github/workflows/os-llvm-sycl-build.yml @@ -161,8 +161,13 @@ jobs: # released compiler and is ABI-incompatible with the open source # nightly. Build dpctl from source with the same nightly so both # share one SYCL runtime. - python scripts/build_locally.py --c-compiler=clang --cxx-compiler=clang++ \ - --compiler-root="${SYCL_BUNDLE_FOLDER}/dpcpp_compiler/bin" || exit 1 + # + # Install non-editable so scikit-build runs CMake's install step and + # produces a proper package layout (include/, resources/cmake with the + # config) that dpnp's find_package(Dpctl) needs. --no-deps avoids + # pulling intel-sycl-rt from PyPI, which would reintroduce the + # conflicting released libsycl (the nightly one is on LD_LIBRARY_PATH). + CC=clang CXX=clang++ pip install --no-build-isolation --no-deps . || exit 1 working-directory: ${{ env.dpctl-repo-path }} - name: Build dpnp From 8f6be02383fdbc18eb193cda4de1e423874df3cf Mon Sep 17 00:00:00 2001 From: Anton Volkov Date: Fri, 7 Aug 2026 16:56:29 +0200 Subject: [PATCH 11/18] Build dpnp against oneMath interface in open source SYCL build Pass --onemath so dpnp builds the oneMath interface from source (at the pinned tag, currently the latest v0.9) instead of linking the prebuilt oneMKL SYCL libraries, mirroring the tag-based job in check-onemath.yaml. This compiles the math layer with the same open source nightly compiler. --- .github/workflows/os-llvm-sycl-build.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/os-llvm-sycl-build.yml b/.github/workflows/os-llvm-sycl-build.yml index 7863f6c56e5..fd9ecdf7765 100644 --- a/.github/workflows/os-llvm-sycl-build.yml +++ b/.github/workflows/os-llvm-sycl-build.yml @@ -173,11 +173,16 @@ jobs: - name: Build dpnp run: | source set_allvars.sh + # Build against the oneMath interface (built from source at dpnp's + # pinned tag) rather than the prebuilt oneMKL SYCL libraries, so the + # math layer is compiled with the same open source nightly compiler. + # # The open source DPC++ nightly ships an IntelSYCLConfig.cmake that # lacks add_sycl_to_target(), so force the vendored module which # provides it. python scripts/build_locally.py --c-compiler=clang --cxx-compiler=clang++ \ --compiler-root="${SYCL_BUNDLE_FOLDER}/dpcpp_compiler/bin" \ + --onemath \ --cmake-opts="-DIntelSYCL_DIR=${GITHUB_WORKSPACE}/dpnp/backend/cmake/Modules" || exit 1 - name: Smoke test From 90ff7a28a00275256e5515c218f43ff1d3a28463 Mon Sep 17 00:00:00 2001 From: Anton Volkov Date: Fri, 28 Aug 2026 19:32:38 +0200 Subject: [PATCH 12/18] Fix ODR violation in ufunc dispatch-table populate macros The MACRO_POPULATE_DISPATCH_* macros in populate.hpp defined the helper structs ContigFactory, StridedFactory and TypeMapFactory with the same name in the shared dpnp::extensions::ufunc::impl namespace across every per-ufunc translation unit. Each definition differs (it references that ufunc's own OutputType and *_impl kernel), so this is an ODR violation. The Intel oneAPI compiler inlines the factories' get() methods, so each translation unit uses its own definition. The open source intel/llvm DPC++ compiler instead emits them as weak COMDAT symbols and folds the identically-named instantiations across translation units, so several binary ufuncs get their contig/strided dispatch tables and result-type tables populated from the wrong (folded) translation unit. As a result fmin, fmod, heaviside, logaddexp2 and ldexp silently computed the elementwise maximum, and the integer result-type entries for fmin, fmax, fmod, gcd and lcm were dropped (int64,int64 resolved to no kernel). Give the factories internal, per-ufunc-unique names by pasting the ufunc name into them, so no two translation units share a symbol and there is nothing to fold. --- .../ufunc/elementwise_functions/populate.hpp | 50 ++++++++++--------- 1 file changed, 26 insertions(+), 24 deletions(-) diff --git a/dpnp/backend/extensions/ufunc/elementwise_functions/populate.hpp b/dpnp/backend/extensions/ufunc/elementwise_functions/populate.hpp index 2971c3eb4ac..d8cfb8cf75b 100644 --- a/dpnp/backend/extensions/ufunc/elementwise_functions/populate.hpp +++ b/dpnp/backend/extensions/ufunc/elementwise_functions/populate.hpp @@ -59,7 +59,7 @@ namespace ext_ns = ext::common; } \ \ template \ - struct ContigFactory \ + struct __name__##_ContigFactory \ { \ fnT get() \ { \ @@ -76,7 +76,7 @@ namespace ext_ns = ext::common; }; \ \ template \ - struct TypeMapFactory \ + struct __name__##_TypeMapFactory \ { \ std::enable_if_t::value, int> get() \ { \ @@ -103,7 +103,7 @@ namespace ext_ns = ext::common; } \ \ template \ - struct StridedFactory \ + struct __name__##_StridedFactory \ { \ fnT get() \ { \ @@ -122,12 +122,12 @@ namespace ext_ns = ext::common; void populate_##__name__##_dispatch_vectors(void) \ { \ ext_ns::init_dispatch_vector( \ + __name__##_ContigFactory>( \ __name__##_contig_dispatch_vector); \ ext_ns::init_dispatch_vector( \ + __name__##_StridedFactory>( \ __name__##_strided_dispatch_vector); \ - ext_ns::init_dispatch_vector( \ + ext_ns::init_dispatch_vector( \ __name__##_output_typeid_vector); \ }; @@ -151,7 +151,7 @@ namespace ext_ns = ext::common; } \ \ template \ - struct ContigFactory \ + struct __name__##_ContigFactory \ { \ fnT get() \ { \ @@ -170,7 +170,7 @@ namespace ext_ns = ext::common; }; \ \ template \ - struct TypeMapFactory \ + struct __name__##_TypeMapFactory \ { \ std::enable_if_t>::value, \ std::pair> \ @@ -202,7 +202,7 @@ namespace ext_ns = ext::common; } \ \ template \ - struct StridedFactory \ + struct __name__##_StridedFactory \ { \ fnT get() \ { \ @@ -223,12 +223,13 @@ namespace ext_ns = ext::common; void populate_##__name__##_dispatch_vectors(void) \ { \ ext_ns::init_dispatch_vector( \ + __name__##_ContigFactory>( \ __name__##_contig_dispatch_vector); \ ext_ns::init_dispatch_vector( \ + __name__##_StridedFactory>( \ __name__##_strided_dispatch_vector); \ - ext_ns::init_dispatch_vector, TypeMapFactory>( \ + ext_ns::init_dispatch_vector, \ + __name__##_TypeMapFactory>( \ __name__##_output_typeid_vector); \ }; @@ -256,7 +257,7 @@ namespace ext_ns = ext::common; } \ \ template \ - struct ContigFactory \ + struct __name__##_ContigFactory \ { \ fnT get() \ { \ @@ -275,7 +276,7 @@ namespace ext_ns = ext::common; }; \ \ template \ - struct TypeMapFactory \ + struct __name__##_TypeMapFactory \ { \ std::enable_if_t::value, int> get() \ { \ @@ -305,7 +306,7 @@ namespace ext_ns = ext::common; } \ \ template \ - struct StridedFactory \ + struct __name__##_StridedFactory \ { \ fnT get() \ { \ @@ -325,12 +326,12 @@ namespace ext_ns = ext::common; void populate_##__name__##_dispatch_tables(void) \ { \ ext_ns::init_dispatch_table( \ + __name__##_ContigFactory>( \ __name__##_contig_dispatch_table); \ ext_ns::init_dispatch_table( \ + __name__##_StridedFactory>( \ __name__##_strided_dispatch_table); \ - ext_ns::init_dispatch_table( \ + ext_ns::init_dispatch_table( \ __name__##_output_typeid_table); \ }; @@ -358,7 +359,7 @@ namespace ext_ns = ext::common; } \ \ template \ - struct ContigFactory \ + struct __name__##_ContigFactory \ { \ fnT get() \ { \ @@ -380,7 +381,7 @@ namespace ext_ns = ext::common; }; \ \ template \ - struct TypeMapFactory \ + struct __name__##_TypeMapFactory \ { \ std::enable_if_t>::value, \ std::pair> \ @@ -415,7 +416,7 @@ namespace ext_ns = ext::common; } \ \ template \ - struct StridedFactory \ + struct __name__##_StridedFactory \ { \ fnT get() \ { \ @@ -438,11 +439,12 @@ namespace ext_ns = ext::common; void populate_##__name__##_dispatch_tables(void) \ { \ ext_ns::init_dispatch_table( \ + __name__##_ContigFactory>( \ __name__##_contig_dispatch_table); \ ext_ns::init_dispatch_table( \ + __name__##_StridedFactory>( \ __name__##_strided_dispatch_table); \ - ext_ns::init_dispatch_table, TypeMapFactory>( \ + ext_ns::init_dispatch_table, \ + __name__##_TypeMapFactory>( \ __name__##_output_typeid_table); \ }; From bebe3be7d72bc6c80651ca9d140ccf11e293f34e Mon Sep 17 00:00:00 2001 From: Anton Volkov Date: Sat, 29 Aug 2026 10:55:36 +0200 Subject: [PATCH 13/18] Trim rationale comments in open source SYCL build workflow Shorten the explanatory comments in the dpctl and dpnp build steps; no change to the build commands themselves. --- .github/workflows/os-llvm-sycl-build.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/os-llvm-sycl-build.yml b/.github/workflows/os-llvm-sycl-build.yml index fd9ecdf7765..690dfa5bbf0 100644 --- a/.github/workflows/os-llvm-sycl-build.yml +++ b/.github/workflows/os-llvm-sycl-build.yml @@ -157,9 +157,7 @@ jobs: - name: Build and install dpctl run: | source "${GITHUB_WORKSPACE}/set_allvars.sh" - # dpnp pins dpctl>=0.23.0dev0, which is only published for Intel's - # released compiler and is ABI-incompatible with the open source - # nightly. Build dpctl from source with the same nightly so both + # Build dpctl from source with the same nightly so both # share one SYCL runtime. # # Install non-editable so scikit-build runs CMake's install step and @@ -173,9 +171,8 @@ jobs: - name: Build dpnp run: | source set_allvars.sh - # Build against the oneMath interface (built from source at dpnp's - # pinned tag) rather than the prebuilt oneMKL SYCL libraries, so the - # math layer is compiled with the same open source nightly compiler. + # Build against the oneMath interface, so the math layer is compiled + # with the same open source nightly compiler. # # The open source DPC++ nightly ships an IntelSYCLConfig.cmake that # lacks add_sycl_to_target(), so force the vendored module which From 57de7ffefddf04fe0581464383e6fb1859de727a Mon Sep 17 00:00:00 2001 From: Anton Volkov Date: Sat, 29 Aug 2026 11:23:06 +0200 Subject: [PATCH 14/18] Serialize open source SYCL build with a concurrency group Add a native concurrency group so only one build runs per ref, and drop the redundant styfle/cancel-workflow-action "Cancel Previous Runs" step that it supersedes. --- .github/workflows/os-llvm-sycl-build.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/os-llvm-sycl-build.yml b/.github/workflows/os-llvm-sycl-build.yml index 690dfa5bbf0..e934838452a 100644 --- a/.github/workflows/os-llvm-sycl-build.yml +++ b/.github/workflows/os-llvm-sycl-build.yml @@ -6,6 +6,11 @@ on: permissions: read-all +# Only one build at a time per ref; a newer run supersedes an in-progress one. +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: install-compiler: name: Build with nightly build of DPC++ toolchain @@ -27,11 +32,6 @@ jobs: dpctl-repo-path: '${{ github.workspace }}/dpctl' steps: - - name: Cancel Previous Runs - uses: styfle/cancel-workflow-action@d07a454dad7609a92316b57b23c9ccfd4f59af66 # 0.13.1 - with: - access_token: ${{ github.token }} - - name: Install hwloc run: sudo apt install hwloc From 3561853e8feda4e5164e4c0f86fc9844ecf73fa8 Mon Sep 17 00:00:00 2001 From: Anton Volkov Date: Sat, 29 Aug 2026 11:23:08 +0200 Subject: [PATCH 15/18] Add workflow to auto-bump oclcpuexp/oneTBB build pins Add a weekly (Saturday) workflow that opens a pull request when a newer intel/llvm oclcpuexp driver release or oneTBB release is available, keeping the pins in os-llvm-sycl-build.yml current. The nightly DPC++ compiler is discovered at run time and is not pinned. --- .github/workflows/bump-sycl-deps.yml | 133 +++++++++++++++++++++++++++ 1 file changed, 133 insertions(+) create mode 100644 .github/workflows/bump-sycl-deps.yml diff --git a/.github/workflows/bump-sycl-deps.yml b/.github/workflows/bump-sycl-deps.yml new file mode 100644 index 00000000000..a6e885ac577 --- /dev/null +++ b/.github/workflows/bump-sycl-deps.yml @@ -0,0 +1,133 @@ +name: Bump open source SYCL build deps + +# Keeps the pinned oclcpuexp driver (intel/llvm YYYY-WWNN release) and oneTBB +# release used by os-llvm-sycl-build.yml up to date by opening a pull request +# when a newer upstream release is available. + +on: + # Check weekly on Saturday, and allow manual runs. + schedule: + - cron: "0 6 * * 6" + workflow_dispatch: + +permissions: read-all + +# Only one bump run at a time; a newer run supersedes an in-progress one. +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + bump: + name: Bump oclcpuexp and oneTBB pins + + runs-on: ubuntu-latest + timeout-minutes: 15 + + permissions: + contents: write + pull-requests: write + + env: + WF: .github/workflows/os-llvm-sycl-build.yml + GH_TOKEN: ${{ github.token }} + + steps: + - name: Checkout repo + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + + - name: Find latest intel/llvm driver release tag + id: driver + uses: oprypin/find-latest-tag@6957ac556fa6d349727ecabfcaaf9f8e5ee37124 # v1.1.3 + with: + repository: intel/llvm + releases-only: true + # Driver releases are tagged like "2026-WW28"; ignore nightly-* tags. + regex: '^\d{4}-WW\d+$' + + - name: Find latest oneTBB release tag + id: tbb + uses: oprypin/find-latest-tag@6957ac556fa6d349727ecabfcaaf9f8e5ee37124 # v1.1.3 + with: + repository: uxlfoundation/oneTBB + releases-only: true + regex: '^v\d+\.\d+\.\d+$' + + - name: Resolve asset names and derive values + id: resolve + run: | + set -euo pipefail + DRIVER_TAG='${{ steps.driver.outputs.tag }}' + TBB_TAG='${{ steps.tbb.outputs.tag }}' + + # The oclcpuexp filename embeds its own version and is not derivable + # from the tag, so read it back from the driver release assets. + OCLCPUEXP_FN=$(gh api "repos/intel/llvm/releases/tags/${DRIVER_TAG}" \ + --jq '.assets[].name' \ + | grep -E '^oclcpuexp-.*_rel\.tar\.gz$' | head -1) + if [[ -z "${OCLCPUEXP_FN}" ]]; then + echo "::error::no oclcpuexp asset found in intel/llvm release ${DRIVER_TAG}" + exit 1 + fi + + # oneTBB filenames are derived from the tag (e.g. v2023.1.0). + TBB_VER=${TBB_TAG#v} + + { + echo "driver_tag=${DRIVER_TAG}" + echo "oclcpuexp_fn=${OCLCPUEXP_FN}" + echo "tbb_tag=${TBB_TAG}" + echo "tbb_fn=oneapi-tbb-${TBB_VER}-lin.tgz" + echo "tbb_dir=oneapi-tbb-${TBB_VER}" + } >> "${GITHUB_OUTPUT}" + + - name: Apply pins to workflow file + env: + DRIVER_TAG: ${{ steps.resolve.outputs.driver_tag }} + OCLCPUEXP_FN: ${{ steps.resolve.outputs.oclcpuexp_fn }} + TBB_TAG: ${{ steps.resolve.outputs.tbb_tag }} + TBB_FN: ${{ steps.resolve.outputs.tbb_fn }} + TBB_DIR: ${{ steps.resolve.outputs.tbb_dir }} + run: | + set -euo pipefail + # Surgical, comment-preserving edits: rewrite only the value after each + # key and keep indentation. "|" delimiter so the "/"-heavy URL is safe. + sed -i -E \ + -e "s|^( *DRIVER_PATH: ).*|\1${DRIVER_TAG}|" \ + -e "s|^( *OCLCPUEXP_FN: ).*|\1${OCLCPUEXP_FN}|" \ + -e "s|^( *TBB_URL: ).*|\1https://github.com/uxlfoundation/oneTBB/releases/download/${TBB_TAG}/|" \ + -e "s|^( *TBB_INSTALL_DIR: ).*|\1${TBB_DIR}|" \ + -e "s|^( *TBB_FN: ).*|\1${TBB_FN}|" \ + "${WF}" + echo "---- resulting diff ----" + git diff -- "${WF}" || true + + - name: Create pull request + uses: peter-evans/create-pull-request@22a9089034f40e5a961c8808d113e2c98fb63676 # v7.0.11 + with: + token: ${{ github.token }} + add-paths: ${{ env.WF }} + branch: bot/bump-sycl-build-deps + delete-branch: true + labels: autoupdate + commit-message: | + Bump oclcpuexp/oneTBB pins in os-llvm-sycl-build workflow + + driver: ${{ steps.resolve.outputs.driver_tag }} / ${{ steps.resolve.outputs.oclcpuexp_fn }} + oneTBB: ${{ steps.resolve.outputs.tbb_tag }} + title: "Bump open source SYCL build dependencies" + body: | + Automated bump of the pinned open source SYCL build dependencies in + `os-llvm-sycl-build.yml`. + + | dependency | new value | + | --- | --- | + | intel/llvm driver release | `${{ steps.resolve.outputs.driver_tag }}` | + | oclcpuexp | `${{ steps.resolve.outputs.oclcpuexp_fn }}` | + | oneTBB | `${{ steps.resolve.outputs.tbb_tag }}` | + + The nightly DPC++ compiler is discovered at run time and is not + affected by this change. + + Trigger the **Build with Open Source LLVM SYCL compiler** workflow on + this branch to validate before merging. From 39e2ef01b17c129fe589978cc57194219ae990e5 Mon Sep 17 00:00:00 2001 From: Anton Volkov Date: Sat, 29 Aug 2026 11:50:40 +0200 Subject: [PATCH 16/18] Harden auto-bump workflow and update create-pull-request Bump peter-evans/create-pull-request to v8.1.1 (Node 24) to clear the Node 20 deprecation warning; pass find-latest-tag outputs to the resolve step via env instead of interpolating them into the shell body; and set sort-tags: false explicitly so the YYYY-WWNN driver tag is selected by release date rather than semver. --- .github/workflows/bump-sycl-deps.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/bump-sycl-deps.yml b/.github/workflows/bump-sycl-deps.yml index a6e885ac577..582caf70990 100644 --- a/.github/workflows/bump-sycl-deps.yml +++ b/.github/workflows/bump-sycl-deps.yml @@ -44,6 +44,9 @@ jobs: releases-only: true # Driver releases are tagged like "2026-WW28"; ignore nightly-* tags. regex: '^\d{4}-WW\d+$' + # Pick the most recently published matching release. Must stay false: + # sort-tags: true would semver-sort and mis-parse the YYYY-WWNN tag. + sort-tags: false - name: Find latest oneTBB release tag id: tbb @@ -52,13 +55,16 @@ jobs: repository: uxlfoundation/oneTBB releases-only: true regex: '^v\d+\.\d+\.\d+$' + # Most recently published matching release (see note above). + sort-tags: false - name: Resolve asset names and derive values id: resolve + env: + DRIVER_TAG: ${{ steps.driver.outputs.tag }} + TBB_TAG: ${{ steps.tbb.outputs.tag }} run: | set -euo pipefail - DRIVER_TAG='${{ steps.driver.outputs.tag }}' - TBB_TAG='${{ steps.tbb.outputs.tag }}' # The oclcpuexp filename embeds its own version and is not derivable # from the tag, so read it back from the driver release assets. @@ -103,7 +109,7 @@ jobs: git diff -- "${WF}" || true - name: Create pull request - uses: peter-evans/create-pull-request@22a9089034f40e5a961c8808d113e2c98fb63676 # v7.0.11 + uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1 with: token: ${{ github.token }} add-paths: ${{ env.WF }} From 51e2da0637abe22b26a296b8b70f563d7a10c27b Mon Sep 17 00:00:00 2001 From: Anton Volkov Date: Sat, 29 Aug 2026 11:57:54 +0200 Subject: [PATCH 17/18] Fix stale unset in open source SYCL nightly discovery The pre-loop reset unset DEPLOY_NIGHTLY_TAG_SHA, a variable that is never used; the loop and downstream checks use DEPLOY_LLVM_TAG_SHA. Unset that name instead so stale loop state is actually cleared. --- .github/workflows/os-llvm-sycl-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/os-llvm-sycl-build.yml b/.github/workflows/os-llvm-sycl-build.yml index e934838452a..2ec81b8b448 100644 --- a/.github/workflows/os-llvm-sycl-build.yml +++ b/.github/workflows/os-llvm-sycl-build.yml @@ -53,7 +53,7 @@ jobs: export LLVM_TAGS # initialize unset DEPLOY_NIGHTLY_TAG - unset DEPLOY_NIGHTLY_TAG_SHA + unset DEPLOY_LLVM_TAG_SHA # go through tags and find the most recent one where nighly build binary is available while IFS= read -r NEXT_LLVM_TAG; do From ba10d88e3c2677787a937925cf315d5536dc5950 Mon Sep 17 00:00:00 2001 From: Anton Volkov Date: Sat, 29 Aug 2026 12:09:05 +0200 Subject: [PATCH 18/18] Harden remaining ufunc/vm dispatch factories against ODR folding Give the ContigFactory/TypeMapFactory helpers unique per-op names in the vm populate macros and in the hand-written vm/erf_funcs, ufunc/erf_funcs and ufunc/float_power sources. Previously these shared one mangled name across many translation units in a single namespace, so their weak factory instantiations could be folded together by the open source LLVM SYCL compiler (the same ODR violation fixed in the ufunc populate.hpp macros). This matches the unique-naming convention lapack/blas/statistics already follow. --- .../ufunc/elementwise_functions/erf_funcs.cpp | 4 +-- .../elementwise_functions/float_power.cpp | 5 ++-- dpnp/backend/extensions/vm/common.hpp | 28 +++++++++++-------- dpnp/backend/extensions/vm/erf_funcs.cpp | 4 +-- 4 files changed, 23 insertions(+), 18 deletions(-) diff --git a/dpnp/backend/extensions/ufunc/elementwise_functions/erf_funcs.cpp b/dpnp/backend/extensions/ufunc/elementwise_functions/erf_funcs.cpp index de28af11c2b..cc54cf373aa 100644 --- a/dpnp/backend/extensions/ufunc/elementwise_functions/erf_funcs.cpp +++ b/dpnp/backend/extensions/ufunc/elementwise_functions/erf_funcs.cpp @@ -87,7 +87,7 @@ struct OutputType static int output_typeid_vector[td_ns::num_types]; template -struct TypeMapFactory +struct ErfTypeMapFactory { std::enable_if_t::value, int> get() { @@ -223,7 +223,7 @@ MACRO_DEFINE_IMPL(erfcinv, Erfcinv); void init_erf_funcs(py::module_ m) { using impl::output_typeid_vector; - init_dispatch_vector(output_typeid_vector); + init_dispatch_vector(output_typeid_vector); auto erf_result_type_pyapi = [&](const py::dtype &dtype) { return py_int::py_unary_ufunc_result_type(dtype, output_typeid_vector); diff --git a/dpnp/backend/extensions/ufunc/elementwise_functions/float_power.cpp b/dpnp/backend/extensions/ufunc/elementwise_functions/float_power.cpp index 452bd1a71d4..8967069e73d 100644 --- a/dpnp/backend/extensions/ufunc/elementwise_functions/float_power.cpp +++ b/dpnp/backend/extensions/ufunc/elementwise_functions/float_power.cpp @@ -85,7 +85,7 @@ struct OutputType static int float_power_output_typeid_table[td_ns::num_types][td_ns::num_types]; template -struct TypeMapFactory +struct FloatPowerTypeMapFactory { std::enable_if_t::value, int> get() { @@ -96,7 +96,8 @@ struct TypeMapFactory static void populate_float_power_dispatch_tables(void) { - init_dispatch_table(float_power_output_typeid_table); + init_dispatch_table( + float_power_output_typeid_table); } } // namespace impl diff --git a/dpnp/backend/extensions/vm/common.hpp b/dpnp/backend/extensions/vm/common.hpp index 4e19b5e1257..f2a46477d78 100644 --- a/dpnp/backend/extensions/vm/common.hpp +++ b/dpnp/backend/extensions/vm/common.hpp @@ -365,7 +365,7 @@ bool need_to_call_binary_ufunc(sycl::queue &exec_q, */ #define MACRO_POPULATE_DISPATCH_VECTORS(__name__) \ template \ - struct ContigFactory \ + struct __name__##_ContigFactory \ { \ fnT get() \ { \ @@ -380,7 +380,7 @@ bool need_to_call_binary_ufunc(sycl::queue &exec_q, }; \ \ template \ - struct TypeMapFactory \ + struct __name__##_TypeMapFactory \ { \ std::enable_if_t::value, int> get() \ { \ @@ -391,10 +391,11 @@ bool need_to_call_binary_ufunc(sycl::queue &exec_q, \ static void populate_dispatch_vectors(void) \ { \ - ext_ns::init_dispatch_vector( \ + ext_ns::init_dispatch_vector( \ output_typeid_vector); \ ext_ns::init_dispatch_vector(contig_dispatch_vector); \ + __name__##_ContigFactory>( \ + contig_dispatch_vector); \ }; /** @@ -404,7 +405,7 @@ bool need_to_call_binary_ufunc(sycl::queue &exec_q, */ #define MACRO_POPULATE_DISPATCH_2OUTS_VECTORS(__name__) \ template \ - struct ContigFactory \ + struct __name__##_ContigFactory \ { \ fnT get() \ { \ @@ -423,7 +424,7 @@ bool need_to_call_binary_ufunc(sycl::queue &exec_q, }; \ \ template \ - struct TypeMapFactory \ + struct __name__##_TypeMapFactory \ { \ std::enable_if_t>::value, \ std::pair> \ @@ -438,10 +439,12 @@ bool need_to_call_binary_ufunc(sycl::queue &exec_q, \ static void populate_dispatch_vectors(void) \ { \ - ext_ns::init_dispatch_vector, TypeMapFactory>( \ + ext_ns::init_dispatch_vector, \ + __name__##_TypeMapFactory>( \ output_typeid_vector); \ ext_ns::init_dispatch_vector(contig_dispatch_vector); \ + __name__##_ContigFactory>( \ + contig_dispatch_vector); \ }; /** @@ -451,7 +454,7 @@ bool need_to_call_binary_ufunc(sycl::queue &exec_q, */ #define MACRO_POPULATE_DISPATCH_TABLES(__name__) \ template \ - struct ContigFactory \ + struct __name__##_ContigFactory \ { \ fnT get() \ { \ @@ -467,7 +470,7 @@ bool need_to_call_binary_ufunc(sycl::queue &exec_q, }; \ \ template \ - struct TypeMapFactory \ + struct __name__##_TypeMapFactory \ { \ std::enable_if_t::value, int> get() \ { \ @@ -478,9 +481,10 @@ bool need_to_call_binary_ufunc(sycl::queue &exec_q, \ static void populate_dispatch_tables(void) \ { \ - ext_ns::init_dispatch_table( \ + ext_ns::init_dispatch_table( \ output_typeid_vector); \ ext_ns::init_dispatch_table(contig_dispatch_vector); \ + __name__##_ContigFactory>( \ + contig_dispatch_vector); \ }; } // namespace dpnp::extensions::vm::py_internal diff --git a/dpnp/backend/extensions/vm/erf_funcs.cpp b/dpnp/backend/extensions/vm/erf_funcs.cpp index 7ca642fe2fc..b43b7a19945 100644 --- a/dpnp/backend/extensions/vm/erf_funcs.cpp +++ b/dpnp/backend/extensions/vm/erf_funcs.cpp @@ -84,7 +84,7 @@ struct OutputType static int output_typeid_vector[td_ns::num_types]; template -struct TypeMapFactory +struct ErfTypeMapFactory { std::enable_if_t::value, int> get() { @@ -169,7 +169,7 @@ void init_erf_funcs(py::module_ m) using arrayT = dpnp::tensor::usm_ndarray; using impl::output_typeid_vector; - init_dispatch_vector(output_typeid_vector); + init_dispatch_vector(output_typeid_vector); auto erf_need_to_call_pyapi = [&](sycl::queue &exec_q, const arrayT &src, const arrayT &dst) {