From 8074e603a6a2b9f51b5edc847ac91d946e009971 Mon Sep 17 00:00:00 2001 From: Ludovic Henry Date: Tue, 13 Oct 2026 00:59:22 +0000 Subject: [PATCH 1/4] intel-pti: Add version 1.1.0 --- .github/workflows/build-intel-pti.yml | 134 ++++++++++++++++++++++++++ docs/packages/intel-pti.yaml | 5 + 2 files changed, 139 insertions(+) create mode 100644 .github/workflows/build-intel-pti.yml create mode 100644 docs/packages/intel-pti.yaml diff --git a/.github/workflows/build-intel-pti.yml b/.github/workflows/build-intel-pti.yml new file mode 100644 index 000000000000..b2db9d2398cf --- /dev/null +++ b/.github/workflows/build-intel-pti.yml @@ -0,0 +1,134 @@ +# SPDX-FileCopyrightText: 2026 The RISE Project +# SPDX-License-Identifier: MIT +--- +# PyPI's intel-pti wheel is Intel's x86_64 build of the MIT PTI SDK (intel/pti-gpu sdk/, no +# Python code, libraries installed under .data/data/); this builds the same tag with +# the sdk's own scikit-build-core pyproject, using its linux-gxx-release compiler instead of icpx. +# Based on: https://github.com/intel/pti-gpu/blob/master/.github/workflows/sdk_build_and_test.yml +name: Build intel-pti wheels (riscv64) + +on: + workflow_dispatch: + inputs: + version: + description: 'Version glob to (re)build; empty builds every version of docs/packages/intel-pti.yaml not released yet' + required: false + default: '' + pull_request: + branches: [main] + paths: + - '.github/workflows/build-intel-pti.yml' + - 'docs/packages/intel-pti.yaml' + push: + branches: [main] + paths: + - '.github/workflows/build-intel-pti.yml' + - 'docs/packages/intel-pti.yaml' + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + +permissions: + contents: read # to fetch code (actions/checkout) + +env: + MANYLINUX_RISCV64_IMAGE: quay.io/pypa/manylinux_2_39_riscv64 + +jobs: + setup: + uses: $/.github/workflows/_setup.yml + with: + package: intel-pti + version: ${{ inputs.version }} + + build_wheels: + needs: [setup] + if: needs.setup.outputs.versions != '[]' + strategy: + fail-fast: false + matrix: + version: ${{ fromJSON(needs.setup.outputs.versions) }} + name: Build intel-pti ${{ matrix.version }} py3-none-manylinux_riscv64 + runs-on: ubuntu-24.04-riscv + timeout-minutes: 120 + + env: + PTI_VERSION: ${{ matrix.version }} + + steps: + - name: Checkout pti-gpu pti-${{ env.PTI_VERSION }} + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + repository: intel/pti-gpu + ref: pti-${{ env.PTI_VERSION }} + persist-credentials: false + + - name: Pull manylinux_riscv64 image + run: docker pull "${MANYLINUX_RISCV64_IMAGE}" + + - name: Write GCC toolchain file + run: | + cat > gcc-toolchain.cmake <<'EOF' + set(CMAKE_C_COMPILER gcc) + set(CMAKE_CXX_COMPILER g++) + set(CMAKE_INSTALL_LIBDIR "${SKBUILD_DATA_DIR}/lib" CACHE PATH "") + set(CMAKE_INSTALL_INCLUDEDIR "${SKBUILD_DATA_DIR}/include" CACHE PATH "") + set(CMAKE_INSTALL_BINDIR "${SKBUILD_DATA_DIR}/bin" CACHE PATH "") + set(CMAKE_INSTALL_DOCDIR "${SKBUILD_DATA_DIR}/share" CACHE PATH "") + set(CMAKE_INSTALL_RPATH "$ORIGIN" CACHE STRING "") + EOF + + # libze_loader.so.1 is left to the environment, as in Intel's x86_64 wheel. + # Only the unit/libload tests run: every other label needs an Intel GPU. + - name: Build, test and repair the wheel + run: | + docker run --rm -v "$(pwd):/work" -w /work -e PTI_VERSION \ + -e PTI_RELEASE_WHL=1 \ + -e SKBUILD_WHEEL_LICENSE_FILES="LICENSE;third-party-programs.txt" \ + -e PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/ \ + "${MANYLINUX_RISCV64_IMAGE}" bash -c ' + set -euxo pipefail + pybin=/opt/python/cp312-cp312/bin + git config --global --add safe.directory /work + cp LICENSE third-party-programs.txt sdk/ + "$pybin/pip" wheel ./sdk --no-deps -w dist-raw -C build-dir=build -C cmake.define.CMAKE_TOOLCHAIN_FILE=/work/gcc-toolchain.cmake + ctest --test-dir build --output-on-failure -L "unit|libload" -LE "performance|quarantine" + auditwheel repair --exclude libze_loader.so.1 -w dist dist-raw/*.whl + "$pybin/pip" install dist/*.whl + "$pybin/python3" - < gcc-toolchain.cmake <<'EOF' set(CMAKE_C_COMPILER gcc) set(CMAKE_CXX_COMPILER g++) + set(CMAKE_TRY_COMPILE_CONFIGURATION Release) set(CMAKE_INSTALL_LIBDIR "${SKBUILD_DATA_DIR}/lib" CACHE PATH "") set(CMAKE_INSTALL_INCLUDEDIR "${SKBUILD_DATA_DIR}/include" CACHE PATH "") set(CMAKE_INSTALL_BINDIR "${SKBUILD_DATA_DIR}/bin" CACHE PATH "") From ac80acb2d6e9fa9599723df04683747792837d5f Mon Sep 17 00:00:00 2001 From: Ludovic Henry Date: Thu, 22 Oct 2026 10:37:11 +0000 Subject: [PATCH 3/4] intel-pti: give scikit-build-core an absolute build dir pip runs the build backend from ./sdk, so build-dir=build landed in sdk/build and the ctest step that follows found no /work/build. --- .github/workflows/build-intel-pti.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-intel-pti.yml b/.github/workflows/build-intel-pti.yml index ab14d4732f09..4ef58147880d 100644 --- a/.github/workflows/build-intel-pti.yml +++ b/.github/workflows/build-intel-pti.yml @@ -95,7 +95,7 @@ jobs: pybin=/opt/python/cp312-cp312/bin git config --global --add safe.directory /work cp LICENSE third-party-programs.txt sdk/ - "$pybin/pip" wheel ./sdk --no-deps -w dist-raw -C build-dir=build -C cmake.define.CMAKE_TOOLCHAIN_FILE=/work/gcc-toolchain.cmake + "$pybin/pip" wheel ./sdk --no-deps -w dist-raw -C build-dir=/work/build -C cmake.define.CMAKE_TOOLCHAIN_FILE=/work/gcc-toolchain.cmake ctest --test-dir build --output-on-failure -L "unit|libload" -LE "performance|quarantine" auditwheel repair --exclude libze_loader.so.1 -w dist dist-raw/*.whl "$pybin/pip" install dist/*.whl From 7590b2e2ab7ab67efd866551e6d3372ac3f0e1e6 Mon Sep 17 00:00:00 2001 From: Ludovic Henry Date: Fri, 23 Oct 2026 15:59:31 +0000 Subject: [PATCH 4/4] intel-pti: skip the unit tests that need a Level Zero GPU driver ze_event_manager_tests, ze_events_pools_observer_test and pc_sampling_internal_test are labelled "unit" but call zeInit(ZE_INIT_FLAG_GPU_ONLY) in their fixtures, which returns ZE_RESULT_ERROR_UNINITIALIZED without an Intel GPU, so 73 of 136 tests failed. Exclude hw-metrics as upstream's skip_hw_metrics does, and the two event pool suites by name. --- .github/workflows/build-intel-pti.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-intel-pti.yml b/.github/workflows/build-intel-pti.yml index 4ef58147880d..29c459351c11 100644 --- a/.github/workflows/build-intel-pti.yml +++ b/.github/workflows/build-intel-pti.yml @@ -83,7 +83,8 @@ jobs: EOF # libze_loader.so.1 is left to the environment, as in Intel's x86_64 wheel. - # Only the unit/libload tests run: every other label needs an Intel GPU. + # Only the unit/libload tests run: every other label needs an Intel GPU, as do the + # hw-metrics tests (upstream's skip_hw_metrics) and the zeInit-based event pool suites. - name: Build, test and repair the wheel run: | docker run --rm -v "$(pwd):/work" -w /work -e PTI_VERSION \ @@ -96,7 +97,7 @@ jobs: git config --global --add safe.directory /work cp LICENSE third-party-programs.txt sdk/ "$pybin/pip" wheel ./sdk --no-deps -w dist-raw -C build-dir=/work/build -C cmake.define.CMAKE_TOOLCHAIN_FILE=/work/gcc-toolchain.cmake - ctest --test-dir build --output-on-failure -L "unit|libload" -LE "performance|quarantine" + ctest --test-dir build --output-on-failure -L "unit|libload" -LE "performance|quarantine|hw-metrics" -E "^(ZeEventPool|FlagCombinations/)" auditwheel repair --exclude libze_loader.so.1 -w dist dist-raw/*.whl "$pybin/pip" install dist/*.whl "$pybin/python3" - <