diff --git a/sdk/.clang-format b/.clang-format similarity index 100% rename from sdk/.clang-format rename to .clang-format diff --git a/sdk/.clang-tidy b/.clang-tidy similarity index 100% rename from sdk/.clang-tidy rename to .clang-tidy diff --git a/.github/actions/detectChanges/action.yml b/.github/actions/detectChanges/action.yml deleted file mode 100644 index 6b579406..00000000 --- a/.github/actions/detectChanges/action.yml +++ /dev/null @@ -1,53 +0,0 @@ -name: Detect code changes -description: | - Determines whether a push/PR contains code changes that require building - and testing, or only documentation changes (sdk/docs/) that can be skipped. - - Sets output 'code' to 'true' if build/test should run, 'false' if not. - - Safe defaults — always sets code=true when: - - Triggered by schedule or workflow_dispatch (no base SHA available). - - git diff fails for any reason (e.g. fetch error, missing commit). - -outputs: - code: - description: "'true' if code changes detected, 'false' if docs-only" - value: ${{ steps.check.outputs.code }} - -runs: - using: composite - steps: - - name: Detect code vs docs-only changes - id: check - shell: bash - run: | - # In Docker containers the workspace may be owned by a different user. - git config --global --add safe.directory "$GITHUB_WORKSPACE" - - BASE=${{ github.event.pull_request.base.sha || github.event.before }} - - # schedule/workflow_dispatch have no base SHA — always run tests. - if [ -z "$BASE" ]; then - echo "code=true" >> $GITHUB_OUTPUT - echo "Scheduled/manual run — build and test will run." - exit 0 - fi - - # Ensure the base commit is available locally regardless of PR depth. - git fetch --depth=1 origin "$BASE" - - CHANGED=$(git diff --name-only "$BASE" ${{ github.sha }}) - if [ $? -ne 0 ]; then - # git diff failed — safer to run tests than silently skip. - echo "code=true" >> $GITHUB_OUTPUT - echo "git diff failed — assuming code changes, build and test will run." - exit 0 - fi - - if echo "$CHANGED" | grep -qvE '^sdk/docs/'; then - echo "code=true" >> $GITHUB_OUTPUT - echo "Code changes detected — build and test will run." - else - echo "code=false" >> $GITHUB_OUTPUT - echo "Documentation-only changes detected — skipping build and test." - fi diff --git a/.github/actions/linuxTest/action.yml b/.github/actions/linuxTest/action.yml deleted file mode 100644 index 284443cb..00000000 --- a/.github/actions/linuxTest/action.yml +++ /dev/null @@ -1,47 +0,0 @@ -name: 'Linux tests for PTI' -description: | - Run the tests with a partition that is expected to ALWAYS succeed and - another partition that MAY fail. The latter is designated as Quarantine. -inputs: - wdir: - description: Working directory - required: true - preset: - description: Preset used in the build to be tested. - required: true - skip_hw_metrics: - description: Skip hw-metrics tests - required: false - default: 'false' - -runs: - using: "composite" - steps: - - - name: Tests that MUST succeed. - working-directory: ${{ inputs.wdir }} - shell: bash - run: | - source /opt/intel/oneapi/setvars.sh - - EXCLUDE_PATTERN='performance|quarantine' - if [[ "${{ inputs.skip_hw_metrics }}" == "true" ]]; then - EXCLUDE_PATTERN="${EXCLUDE_PATTERN}|hw-metrics" - fi - - ctest --output-on-failure --preset ${{ inputs.preset }} -LE "$EXCLUDE_PATTERN" - - - name: Quarantined tests # performance and flaky tests - continue-on-error: true - working-directory: ${{ inputs.wdir }} - shell: bash - run: | - source /opt/intel/oneapi/setvars.sh - - if ctest --output-on-failure --preset ${{ inputs.preset }} -L 'performance|quarantine'; then - echo "Test status: 0" - echo "Quarantined tests pass" - else - echo "Test status: 1" - echo "::warning::Quarantined tests failed" - fi diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8f65d90b..0a203010 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,9 +1,8 @@ --- -# This is an experimental workflow exercising unification of the PTI -# and Unitrace build. -# -# Avoid running on every PR until the tests are ported over. +# Build-only check of the aggregate top-level CMake project on a GitHub-hosted +# runner (no GPU, no oneAPI). Components that need oneAPI (icpx), MDAPI, +# GTPin or IGA are skipped. name: ci @@ -13,182 +12,42 @@ concurrency: on: workflow_dispatch: - schedule: - - cron: '0 5 * * *' # Daily 5:00 AM UTC push: branches: [ "master" ] - paths: - - .github/workflows/ci.yml - - VERSION - - '**/CMakeLists.txt' - - '**/*.cmake' pull_request: branches: [ "master" ] - paths: - - .github/workflows/ci.yml - - VERSION - - '**/CMakeLists.txt' - - '**/*.cmake' permissions: contents: read jobs: build-lin: - if: vars.PTI_RUN_TESTS == 1 - name: Build PTI ${{ matrix.os_id }} ${{ matrix.tags }} - runs-on: ${{ fromJSON(matrix.tags) }} - timeout-minutes: 20 + name: Build tools and samples (ubuntu-24.04) + runs-on: ubuntu-24.04 + timeout-minutes: 30 defaults: run: shell: bash - strategy: - matrix: - include: - - container: ${{ vars.PTI_DOCKER_UBUNTU_24_4_ONEAPI_N }} - tags: '["self-hosted", "Linux", "pti", "PVC"]' - os_id: "ubuntu-24.04.server.2026.1" - - container: ${{ vars.PTI_DOCKER_UBUNTU_24_4_CLIENT_ONEAPI_N }} - tags: '["self-hosted", "Linux", "pti", "BMG"]' - os_id: "ubuntu-24.04.client.2026.1" - container: - image: ${{ matrix.container }} - options: --device=/dev/dri --cap-add CAP_PERFMON --shm-size=24G --volume=/dev/dri/by-path:/dev/dri/by-path steps: - - name: Clean - run: | - shopt -s dotglob - rm -rf ./* - - - name: Checkout - uses: actions/checkout@v4 - - - name: GitHub Proxy Usage - uses: ./.github/actions/github-proxy-usage - with: - proxy: ${{ vars.PTI_GIT_PROXY }} - runner-pattern: ${{ vars.PTI_GIT_PROXY_RUNNER_PATTERN }} - - - name: Configure Environment - run: | - echo "CMAKE_BUILD_PARALLEL_LEVEL=$(($(nproc)/2))" >> "$GITHUB_ENV" - - - name: Build - run: | - source /opt/intel/oneapi/setvars.sh --include-intel-llvm - cmake -S . -B build \ - -DCMAKE_CXX_COMPILER=icpx \ - -DCMAKE_C_COMPILER=icx \ - -GNinja -DCMAKE_BUILD_TYPE=Release \ - -DBUILD_TESTING=ON - cmake --build build - - - name: Test - run: | - source /opt/intel/oneapi/setvars.sh --include-intel-llvm - ctest --test-dir build --no-tests=error --output-on-failure \ - -LE "performance|quarantine" \ - -E "test_unitrace" - - - name: Package - run: | - source /opt/intel/oneapi/setvars.sh --include-intel-llvm - cpack -G TGZ --config build/CPackConfig.cmake - - - name: Upload - uses: actions/upload-artifact@v4 - with: - name: pti-gpu-${{ matrix.os_id }} - path: | - pti*.tar.gz* - - build-win: - if: vars.PTI_RUN_TESTS == 1 - name: Build PTI for Windows - runs-on: [self-hosted, Windows, pti, ARC] - timeout-minutes: 20 - env: - LEVEL_ZERO_LOADER_VERSION: 1.32.0 - defaults: - run: - shell: cmd - steps: - - name: Clean - shell: bash - run: | - shopt -s dotglob - rm -rf ./* - - name: Checkout uses: actions/checkout@v4 - - name: Configure Environment + - name: Install dependencies run: | - set /A JOBS=%NUMBER_OF_PROCESSORS%/2 - >>%GITHUB_ENV% echo CMAKE_BUILD_PARALLEL_LEVEL=%JOBS% + sudo apt-get update + sudo apt-get install -y cmake ninja-build libze-dev opencl-headers \ + ocl-icd-opencl-dev libdrm-dev python3 - # Can't dynamically acquire yet - needs to be an agreement between - # `tools/unitrace` and `sdk` - - name: Get Level Zero Loader Version - id: loader-ver + - name: Configure run: | - @echo off - >>%GITHUB_OUTPUT% echo ze_loader_ver=%LEVEL_ZERO_LOADER_VERSION% - - - uses: actions/cache@v4 - id: cache - with: - path: sdk/level-zero-sdk - key: ${{ runner.os }}-ci-Ze-Loader-${{ steps.loader-ver.outputs.ze_loader_ver }} - - - name: Download Dependencies - if: steps.cache.outputs.cache-hit != 'true' - run: | - @echo off - call "C:\Program Files (x86)\Intel\oneAPI\setvars-vcvarsall.bat" - call "C:\Program Files (x86)\Intel\oneAPI\setvars.bat" - rmdir /S /Q sdk\level-zero-sdk - del /s level-zero-win-sdk-%LEVEL_ZERO_LOADER_VERSION%.zip - echo https://github.com/oneapi-src/level-zero/releases/download/v%LEVEL_ZERO_LOADER_VERSION%/level-zero-win-sdk-%LEVEL_ZERO_LOADER_VERSION%.zip - curl.exe -L -O https://github.com/oneapi-src/level-zero/releases/download/v%LEVEL_ZERO_LOADER_VERSION%/level-zero-win-sdk-%LEVEL_ZERO_LOADER_VERSION%.zip - 7z x level-zero-win-sdk-%LEVEL_ZERO_LOADER_VERSION%.zip -osdk\level-zero-sdk - >>%GITHUB_STEP_SUMMARY% echo **Successfully Downloaded Level Zero Loader Version:** %LEVEL_ZERO_LOADER_VERSION% + # instcount and memaccess need GTPin. MDAPI is only needed at run + # time (its headers are downloaded). icpx and IGA samples are + # skipped automatically when the compiler or library is not found. + cmake -S . -B build -GNinja -DCMAKE_BUILD_TYPE=Release \ + "-DPTI_GPU_SKIP=instcount;memaccess" - name: Build - run: | - @echo off - call "C:\Program Files (x86)\Intel\oneAPI\setvars-vcvarsall.bat" - call "C:\Program Files (x86)\Intel\oneAPI\setvars.bat" - cmake -S . -B build ^ - -DCMAKE_CXX_COMPILER=icx ^ - -DCMAKE_C_COMPILER=icx ^ - -GNinja -DCMAKE_BUILD_TYPE=Release ^ - -DBUILD_TESTING=ON ^ - -DLevelZero_ROOT=${{ github.workspace }}/sdk/level-zero-sdk ^ - -DFETCHCONTENT_BASE_DIR=${{ runner.temp }}/_deps ^ - -DCMAKE_OBJECT_PATH_MAX=300 - cmake --build build - - - name: Test - run: | - @echo off - call "C:\Program Files (x86)\Intel\oneAPI\setvars-vcvarsall.bat" - call "C:\Program Files (x86)\Intel\oneAPI\setvars.bat" - REM TODO(PTI-88): OverheadRecordsCountsAllOnesViewRecords fails on Windows. Investigation needed. Bug filed. - ctest --test-dir build --no-tests=error --output-on-failure ^ - -LE "performance|quarantine" ^ - -E "MainFixtureTest.OverheadRecordsCountsAllOnesViewRecords|test_unitrace" - - - name: Package - run: | - @echo off - call "C:\Program Files (x86)\Intel\oneAPI\setvars-vcvarsall.bat" - call "C:\Program Files (x86)\Intel\oneAPI\setvars.bat" - cpack -G ZIP --config build/CPackConfig.cmake + run: cmake --build build - - name: Upload - uses: actions/upload-artifact@v4 - with: - name: pti-gpu-windows - path: | - pti*.zip* + - name: Install + run: cmake --install build --prefix "${{ runner.temp }}/pti-install" diff --git a/.github/workflows/deploy_docs.yml b/.github/workflows/deploy_docs.yml deleted file mode 100644 index 6cd2721a..00000000 --- a/.github/workflows/deploy_docs.yml +++ /dev/null @@ -1,109 +0,0 @@ -name: Deploy Documentation to GitHub Pages - -on: - push: - tags: - - 'pti-*' # Build and deploy on version tags (for production) - pull_request: - branches: - - master - paths: - - 'sdk/docs/**' - - 'sdk/include/**' - - '.github/workflows/deploy_docs.yml' - workflow_dispatch: - -permissions: - contents: read - pages: write - id-token: write - -concurrency: - group: "pages-${{ github.repository }}" - cancel-in-progress: false - -defaults: - run: - shell: bash - -jobs: - build: - name: Build Documentation - runs-on: ${{ contains(github.repository, 'pti-gpu') && 'ubuntu-latest' || vars.DIND_ARC_RUNNER_GITHUB }} - container: ${{ contains(github.repository, 'pti-gpu') && 'ubuntu:24.04' || vars.PTI_BARE_UBUNTU_24_04 }} - - - steps: - - name: Install system dependencies - run: | - apt-get update && apt-get install -y \ - lsb-release \ - doxygen \ - graphviz \ - cmake \ - make \ - ninja-build \ - g++ \ - git - - - name: Clean - run: | - shopt -s dotglob - rm -rf ./* - - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Python Environment Setup - uses: astral-sh/setup-uv@v6 - with: - python-version: '3.11' - activate-environment: true - cache-local-path: ${{ github.workspace }}/.cache/uv - - - name: Install Python dependencies - run: | - uv pip install --upgrade pip - uv pip install -r sdk/docs/requirements.txt - - - name: Build documentation with CMake - working-directory: sdk - run: | - cmake -B build -DCMAKE_BUILD_TYPE=Release \ - -DBUILD_TESTING=OFF \ - -DPTI_BUILD_TESTING=OFF \ - -DPTI_BUILD_SAMPLES=OFF - cmake --build build --target docs - - - name: Add .nojekyll file - run: | - # Prevent Jekyll processing on GitHub Pages - touch sdk/build/docs/sphinx/build/html/.nojekyll - - - name: Upload artifact - uses: actions/upload-pages-artifact@v3 - with: - path: sdk/build/docs/sphinx/build/html - - deploy: - name: Deploy to GitHub Pages - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} - - runs-on: ${{ contains(github.repository, 'pti-gpu') && 'ubuntu-latest' || vars.DIND_ARC_RUNNER_GITHUB }} - needs: build - - if: (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/pti-')) || github.event_name == 'workflow_dispatch' - - steps: - - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@v4 - - - name: Deployment Summary - run: | - echo "Documentation deployed successfully" - echo "Repository: ${{ github.repository }}" - echo "Tag: ${{ github.ref_name }}" - echo "Deployment URL: ${{ steps.deployment.outputs.page_url }}" diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml deleted file mode 100644 index 5a897afc..00000000 --- a/.github/workflows/lint.yml +++ /dev/null @@ -1,65 +0,0 @@ ---- - -name: Linter Checks - -on: - push: - branches: [ "master" ] - paths: - - sdk/** - pull_request: - branches: [ "master" ] - paths: - - sdk/** - -defaults: - run: - shell: bash - -permissions: - contents: read - -jobs: - run-format-check: - - container: - image: ${{ vars.PTI_DOCKER_IMAGE }} - - if: vars.PTI_RUN_TESTS == 1 - - runs-on: [self-hosted, Linux, pti] - - steps: - - name: Clean - run: | - rm -rf ./* - rm -rf ./.venv - rm -rf ./.cache - - - name: Checkout - uses: actions/checkout@v4 - - - name: GitHub Proxy Usage - uses: ./.github/actions/github-proxy-usage - with: - proxy: ${{ vars.PTI_GIT_PROXY }} - runner-pattern: ${{ vars.PTI_GIT_PROXY_RUNNER_PATTERN }} - - - name: Python Environment Setup - uses: astral-sh/setup-uv@v6 - with: - python-version: '3.11' - activate-environment: true - cache-local-path: ${{ github.workspace }}/.cache/uv - - - name: Install Dependencies - run: | - uv pip install "clang-format>=18,<19" - uv pip install ruff==0.15.15 - - - name: Check SDK Format - working-directory: sdk - run: | - # Expedited configure - cmake -S . -B build -DPTI_BUILD_TESTING=OFF -DPTI_BUILD_SAMPLES=OFF -DPTI_INSTALL=OFF - cmake --build build --target format-chk diff --git a/.github/workflows/nightly_build_and_test.yml b/.github/workflows/nightly_build_and_test.yml deleted file mode 100644 index 4862d095..00000000 --- a/.github/workflows/nightly_build_and_test.yml +++ /dev/null @@ -1,266 +0,0 @@ -name: nightly-build-and-test - -on: - push: - branches: [ "master" ] - paths: - - .github/workflows/nightly_build_and_test.yml - - .github/actions/linuxTest/action.yml - pull_request: - branches: [ "master" ] - paths: - - .github/workflows/nightly_build_and_test.yml - - .github/actions/linuxTest/action.yml - workflow_dispatch: - schedule: - - cron: '30 5 * * *' # Daily 5:30 AM UTC / 12:30 AM EST - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -defaults: - run: - shell: bash - -permissions: - contents: read - -jobs: - sdk-build-and-test: - name: BldTest PTI - - timeout-minutes: 30 - - runs-on: ${{ fromJSON(matrix.tags) }} - - strategy: - fail-fast: false - max-parallel: 3 - matrix: - include: - - container: ${{ vars.PTI_DOCKER_UBUNTU_24_4_ONEAPI_NMINUS1 }} - uploadname: ${{ vars.PTI_PKG_UBUNTU_24_4_ONEAPI_NMINUS1 }} - preset: linux-icpx-release - tags: '["self-hosted", "Linux", "pti", "server", "PVC"]' - - container: ${{ vars.PTI_DOCKER_ROCKY_8_ONEAPI_NMINUS1 }} - uploadname: ${{ vars.PTI_PKG_ROCKY_8_ONEAPI_NMINUS1 }} - preset: linux-icpx-release - tags: '["self-hosted", "Linux", "pti", "server", "PVC"]' - - container: ${{ vars.PTI_DOCKER_UBUNTU_26_4_CLIENT_ONEAPI_N }} - uploadname: ${{ vars.PTI_PKG_UBUNTU_26_4_CLIENT_ONEAPI_N }} - preset: linux-icpx-release - tags: '["self-hosted", "Linux", "pti", "client", "BMG"]' - # - # This is the n-1 container for BMG - # - - container: ${{ vars.PTI_DOCKER_UBUNTU_25_10_ONEAPI_N }} - uploadname: ${{ vars.PTI_PKG_UBUNTU_25_10_ONEAPI_N }} - preset: linux-icpx-release - tags: '["self-hosted", "Linux", "pti", "client", "BMG"]' - - container: ${{ vars.PTI_DOCKER_ROCKY_8_ONEAPI_NMINUS1 }} - uploadname: ${{ vars.PTI_PKG_ROCKY_8_GXX_NMINUS1 }} - preset: linux-gxx-release - tags: '["self-hosted", "Linux", "pti", "server", "PVC"]' - - container: ${{ vars.PTI_DOCKER_UBUNTU_24_4_ONEAPI_N }} - uploadname: ${{ vars.PTI_PKG_UBUNTU_24_4_ONEAPI_N }} - preset: linux-icpx-release - tags: '["self-hosted", "Linux", "pti", "server", "PVC"]' - - container: ${{ vars.PTI_DOCKER_UBUNTU_24_4_CLIENT_ONEAPI_N }} - uploadname: ${{ vars.PTI_PKG_UBUNTU_24_4_CLIENT_ONEAPI_N }} - preset: linux-icpx-release - tags: '["self-hosted", "Linux", "pti", "client", "BMG"]' - - container: ${{ vars.PTI_DOCKER_ROCKY_8_ONEAPI_N }} - uploadname: ${{ vars.PTI_PKG_ROCKY_8_ONEAPI_N }} - preset: linux-icpx-release - tags: '["self-hosted", "Linux", "pti", "server", "PVC"]' - - container: ${{ vars.PTI_DOCKER_ROCKY_8_ONEAPI_N }} - uploadname: ${{ vars.PTI_PKG_ROCKY_8_GXX_N }} - preset: linux-gxx-release - tags: '["self-hosted", "Linux", "pti", "server", "PVC"]' - - container: - image: ${{ matrix.container }} - options: --device=/dev/dri --cap-add CAP_PERFMON ${{ vars.PTI_DOCKER_PROXIES }} --volume=/dev/dri/by-path:/dev/dri/by-path - - if: vars.PTI_RUN_TESTS == 1 - - steps: - - name: Clean-up - run: | - rm -rf * - echo uploadname ${{ matrix.uploadname }} - echo container ${{ matrix.container }} - - - name: Checkout - uses: actions/checkout@v4 - - - name: Configure Git to use GitHub PAT - run: | - git config --global url."https://user:${{ secrets.pat_pti_tools }}@github.com".insteadOf "https://github.com" - - name: GitHub Proxy Usage - uses: ./.github/actions/github-proxy-usage - with: - proxy: ${{ vars.PTI_GIT_PROXY }} - runner-pattern: ${{ vars.PTI_GIT_PROXY_RUNNER_PATTERN }} - - # Cache only the FetchContent sources and sub-builds, not -build: the - # top-level .ninja_log is not cached, so Ninja rebuilds those objects anyway. - - name: Cache third-party dependency sources - uses: actions/cache@v4 - with: - path: | - sdk/build-*/_deps/*-src - sdk/build-*/_deps/*-subbuild - key: ${{ runner.os }}-sdk-deps-${{ matrix.uploadname }}-${{ hashFiles('sdk/cmake/dependency_pins.cmake') }} - - - name: Build - working-directory: sdk - run: | - source /opt/intel/oneapi/setvars.sh - cmake --preset ${{ matrix.preset }} - cmake --build --preset ${{ matrix.preset }} -j $(($(nproc)/2)) - - - name: Test action - uses: ./.github/actions/linuxTest - with: - wdir: sdk - preset: ${{ matrix.preset }} - - - name: Build AddressSanitizer - working-directory: sdk - run: | - source /opt/intel/oneapi/setvars.sh - cmake --preset linux-asan - cmake --build --preset linux-asan --parallel $(($(nproc)/2)) - - - name: Build ThreadSanitizer - working-directory: sdk - run: | - source /opt/intel/oneapi/setvars.sh - cmake --preset linux-tsan - cmake --build --preset linux-tsan --parallel $(($(nproc)/2)) - - - name: Build libFuzzer - working-directory: sdk - run: | - # To ensure it still builds, run build for fuzz targets until we have - # proper fuzz testing infrastructure in place. - source /opt/intel/oneapi/setvars.sh - cmake --preset linux-fuzz - cmake --build --preset linux-fuzz --parallel $(($(nproc)/2)) - - - name: Test AddressSanitizer - if: ${{ !contains(fromJSON(matrix.tags), 'BMG') }} - working-directory: sdk - run: | - source /opt/intel/oneapi/setvars.sh - ctest --preset linux-asan --output-on-failure -L samples - - - name: Test ThreadSanitizer - working-directory: sdk - run: | - source /opt/intel/oneapi/setvars.sh - ctest --preset linux-tsan --output-on-failure -L samples - - - name: Package SDK - working-directory: sdk - run: | - source /opt/intel/oneapi/setvars.sh - cpack -G TGZ --config build-${{ matrix.preset }}/CPackConfig.cmake - - - name: Upload SDK - uses: actions/upload-artifact@v4 - with: - name: "PTI-SDK-PKG-${{ matrix.preset }}-${{ matrix.uploadname }}" - path: | - sdk/pti*.tar.gz - sdk/pti*.tar.gz* - - pti-tools-build-and-test: - if: vars.PTI_RUN_TESTS == 1 - name: PTI Tools - - timeout-minutes: 30 - - runs-on: [Linux, pti, pvc] - - continue-on-error: true - - strategy: - max-parallel: 2 - matrix: - include: - - container: ${{ vars.PTI_DOCKER_UBUNTU_24_4_ONEAPI_N }} - - container: - image: ${{ matrix.container }} - options: --device=/dev/dri --cap-add CAP_PERFMON ${{ vars.PTI_DOCKER_PROXIES }} - - steps: - - name: Clean-up - run: rm -rf * - - - name: Checkout - uses: actions/checkout@v4 - - - name: GitHub Proxy Usage - uses: ./.github/actions/github-proxy-usage - with: - proxy: ${{ vars.PTI_GIT_PROXY }} - runner-pattern: ${{ vars.PTI_GIT_PROXY_RUNNER_PATTERN }} - - - name: Build-unitrace - working-directory: tools/unitrace - run: | - source /opt/intel/oneapi/setvars.sh - mkdir build - cd build - cmake -DBUILD_WITH_MPI=0 -GNinja .. - ninja - - - name: Test-unitrace - working-directory: tools/unitrace/test - run: | - source /opt/intel/oneapi/setvars.sh - python ./test_unitrace.py - - - name: Build-and-test-onetrace - run: | - source /opt/intel/oneapi/setvars.sh - python ./tests/run.py -s onetrace - - - name: Build-and-test-oneprof - run: | - source /opt/intel/oneapi/setvars.sh - python ./tests/run.py -s oneprof - - - name: Build-and-test-sysmon - run: | - source /opt/intel/oneapi/setvars.sh - python ./tests/run.py -s sysmon - - - name: Build-and-test-cl_gpu_metrics - run: | - source /opt/intel/oneapi/setvars.sh - python ./tests/run.py -s cl_gpu_metrics - - - name: Build-and-test-cl_debug_info - run: | - source /opt/intel/oneapi/setvars.sh - python ./tests/run.py -s cl_debug_info - - - name: Build-and-test-instcount - if: false - run: | - source /opt/intel/oneapi/setvars.sh - python ./tests/run.py -s instcount - - - name: Build-and-test-ze_debug_info - # - # It fails for all containers after oneAPI-2025.2 - # - if: false - run: | - source /opt/intel/oneapi/setvars.sh - python3 ./tests/run.py -s ze_debug_info diff --git a/.github/workflows/pti-tools_build_and_test.yml b/.github/workflows/pti-tools_build_and_test.yml index 3d60741c..0d68f2f0 100644 --- a/.github/workflows/pti-tools_build_and_test.yml +++ b/.github/workflows/pti-tools_build_and_test.yml @@ -5,12 +5,10 @@ on: push: branches: [ "master" ] paths-ignore: - - sdk/** - .github/** pull_request: branches: [ "master" ] paths-ignore: - - sdk/** - .github/** concurrency: @@ -41,9 +39,6 @@ jobs: - container: ${{ vars.PTI_DOCKER_UBUNTU_24_4_ONEAPI_N }} tags: '["self-hosted", "Linux", "pti", "PVC"]' os_id: "ubuntu-24.04.2026.1" - - container: ${{ vars.PTI_DOCKER_UBUNTU_24_4_CLIENT_ONEAPI_N }} - tags: '["self-hosted", "Linux", "pti", "BMG"]' - os_id: "ubuntu-24.04.2026.1" container: image: ${{ matrix.container }} @@ -62,66 +57,6 @@ jobs: proxy: ${{ vars.PTI_GIT_PROXY }} runner-pattern: ${{ vars.PTI_GIT_PROXY_RUNNER_PATTERN }} - - name: Build-unitrace - working-directory: tools/unitrace - run: | - source /opt/intel/oneapi/setvars.sh - mkdir build - cd build - cmake -GNinja .. - ninja - - - name: Unitrace-install-test - working-directory: tools/unitrace - run: | - source /opt/intel/oneapi/setvars.sh - cmake --install build --prefix install_dir - - - name: Build-l0-only-unitrace - working-directory: tools/unitrace - run: | - source /opt/intel/oneapi/setvars.sh - mkdir l0_only_build - cd l0_only_build - cmake -DBUILD_WITH_ITT=0 -DBUILD_WITH_MPI=0 -DBUILD_WITH_XPTI=0 -DBUILD_WITH_OPENCL=0 -GNinja .. - ninja - - - name: Unitrace-cpp-test - working-directory: tools/unitrace/test - run: | - source /opt/intel/oneapi/setvars.sh - # The Python fuzz targets need atheris and the scripts' packages; without - # them they are skipped. - python -m venv fuzz_venv - source fuzz_venv/bin/activate - python -m pip install atheris -r ../requirements.txt - python ./test_unitrace.py --test-group cpp-test - - - name: Unitrace-trace-format - working-directory: tools/unitrace/test - run: | - source /opt/intel/oneapi/setvars.sh - # Perfetto's traceconv launcher downloads its binary via curl. - command -v curl >/dev/null || (apt-get update && apt-get install -y curl) - python -m venv venv - source venv/bin/activate - python -m pip install -r requirements.txt - python ./trace_format_test.py - - - name: Python Environment Setup - uses: actions/setup-python@v5 - with: - python-version: '3.x' - - - name: Unitrace-python-test - working-directory: tools/unitrace/test - run: | - python -m venv venv - source venv/bin/activate - python -m pip install --upgrade setuptools wheel - python -m pip install --no-cache-dir torch torchvision torchaudio --index-url https://download.pytorch.org/whl/xpu - python ./test_unitrace.py --test-group python-test - - name: Build-and-test-sysmon if: contains(fromJSON(matrix.tags), 'PVC') run: | @@ -135,15 +70,13 @@ jobs: python ./tests/run.py -s cl_gpu_metrics - name: Build-and-test-instcount - if: false - #if: contains(fromJSON(matrix.tags), 'PVC') + if: contains(fromJSON(matrix.tags), 'PVC') run: | source /opt/intel/oneapi/setvars.sh python ./tests/run.py -s instcount - name: Build-and-test-ze_debug_info - if: false - #if: contains(fromJSON(matrix.tags), 'PVC') + if: contains(fromJSON(matrix.tags), 'PVC') run: | source /opt/intel/oneapi/setvars.sh python ./tests/run.py -s ze_debug_info @@ -153,113 +86,3 @@ jobs: run: | source /opt/intel/oneapi/setvars.sh python ./tests/run.py -s cl_debug_info - - pti-tools-build-and-test-windows: - - name: Test unitrace on Windows - - timeout-minutes: 20 - - if: vars.PTI_RUN_TESTS == 1 - - runs-on: [self-hosted, Windows, pti, ARC] - - defaults: - run: - shell: cmd - - steps: - - name: Clean-up - run: | - del /S /Q /F * - - - name: Checkout - uses: actions/checkout@v4 - - - name: Build-unitrace - working-directory: tools/unitrace - run: | - @echo off - call "C:\Program Files (x86)\Intel\oneAPI\setvars.bat" - mkdir build - cd build - cmake -GNinja .. - ninja - - - name: Unitrace-install-test - working-directory: tools/unitrace - run: | - @echo off - call "C:\Program Files (x86)\Intel\oneAPI\setvars.bat" - cmake --install build --prefix install_dir - - - name: Test-unitrace - working-directory: tools/unitrace/test - env: - SYCL_UR_USE_LEVEL_ZERO_V2: 0 - run: | - @echo off - call "C:\Program Files (x86)\Intel\oneAPI\setvars.bat" - rem The workspace path is long; keep unitrace output under MAX_PATH - python ./test_unitrace.py --output-dir "%RUNNER_TEMP%\ut" - - - name: Unitrace-trace-format - working-directory: tools/unitrace/test - env: - SYCL_UR_USE_LEVEL_ZERO_V2: 0 - run: | - @echo off - call "C:\Program Files (x86)\Intel\oneAPI\setvars.bat" - python -m venv venv - call venv\Scripts\activate.bat - python -m pip install -r requirements.txt - python ./trace_format_test.py - - - name: Print output files on failure - if: failure() - run: | - @echo off - setlocal enabledelayedexpansion - - set "ROOT=%RUNNER_TEMP%\ut\cpp_test\logs" - - if not exist "%ROOT%" ( - echo [WARN] Logs folder not found: "%ROOT%" - goto :eof - ) - - echo. - echo ===== Enumerating test logs under "%ROOT%" ===== - - rem One log file per test scenario - for %%F in ("%ROOT%\*.log") do ( - echo. - echo ---------- [Test: %%~nF] ---------- - echo [INFO] Found: "%%~fF" - type "%%~fF" - ) - - echo. - echo ===== Done printing test logs ===== - - rem Print output files from results directory - set "RESULTS=%RUNNER_TEMP%\ut\cpp_test\results" - - if not exist "%RESULTS%" ( - echo [WARN] Results folder not found: "%RESULTS%" - goto :eof - ) - - echo. - echo ===== Enumerating output files under "%RESULTS%" ===== - - rem One results\ folder per test - for /R "%RESULTS%" %%F in (*.txt) do ( - echo. - echo ---------- [Output File: %%~nxF] ---------- - echo [INFO] Found: "%%~fF" - type "%%~fF" - ) - - echo. - echo ===== Done printing output files ===== diff --git a/.github/workflows/sdk_build_and_test.yml b/.github/workflows/sdk_build_and_test.yml deleted file mode 100644 index ba9ed7f3..00000000 --- a/.github/workflows/sdk_build_and_test.yml +++ /dev/null @@ -1,251 +0,0 @@ -name: sdk-build-and-test - -on: - push: - paths: - - .github/workflows/sdk_build_and_test.yml - - .github/actions/linuxTest/action.yml - - .github/actions/detectChanges/action.yml - - sdk/** - branches: - - master - - release/** - pull_request: - branches: - - master - - release/** - paths: - - sdk/** - - .github/workflows/** - - .github/actions/** - workflow_dispatch: - schedule: - # Daily 4:00 AM UTC - staggered vs nightly_build_and_test (5:30 UTC) so the - # two heavy scheduled runs do not compete for the same runners (PTI-511) - - cron: '0 4 * * *' - -concurrency: - group: sdk-build-${{ github.event.pull_request.number || github.run_id }} - cancel-in-progress: ${{ github.event_name == 'pull_request' }} - -permissions: - contents: read - -jobs: - sdk-build-and-test: - name: Test PTI ${{ matrix.os_id }} ${{ matrix.tags }} - - timeout-minutes: 45 - - runs-on: ${{ fromJSON(matrix.tags) }} - defaults: - run: - shell: bash - - strategy: - matrix: - include: - - - container: ${{ vars.PTI_DOCKER_UBUNTU_24_4_CLIENT_ONEAPI_N }} - os_id: ${{vars.PTI_PKG_UBUNTU_24_4_CLIENT_ONEAPI_N }} - preset: linux-icpx-release - tags: '["self-hosted", "Linux", "pti", "client", "BMG"]' - - container: ${{ vars.PTI_DOCKER_UBUNTU_24_4_ONEAPI_N }} - os_id: ${{vars.PTI_PKG_UBUNTU_24_4_ONEAPI_N}} - preset: linux-icpx-release - tags: '["self-hosted", "Linux", "pti", "server", "PVC"]' - - container: - image: ${{ matrix.container }} - options: --device=/dev/dri --cap-add CAP_PERFMON --shm-size=24G --volume=/dev/dri/by-path:/dev/dri/by-path - credentials: - username: ${{ vars.PTI_DOCKER_USER }} - password: ${{ secrets.PTI_DOCKER_PWD }} - - if: vars.PTI_RUN_LINUX_TESTS == 1 - - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - clean: true - - - name: Detect code changes - id: check - uses: ./.github/actions/detectChanges - - - name: Configure Git to use GitHub PAT - run: | - git config --global url."https://user:${{ secrets.pat_pti_tools }}@github.com".insteadOf "https://github.com" - - name: GitHub Proxy Usage - uses: ./.github/actions/github-proxy-usage - with: - proxy: ${{ vars.PTI_GIT_PROXY }} - runner-pattern: ${{ vars.PTI_GIT_PROXY_RUNNER_PATTERN }} - - # Cache only the FetchContent sources and sub-builds, not -build: the - # top-level .ninja_log is not cached, so Ninja rebuilds those objects anyway. - - name: Cache third-party dependency sources - if: steps.check.outputs.code == 'true' - uses: actions/cache@v4 - with: - path: | - sdk/build-*/_deps/*-src - sdk/build-*/_deps/*-subbuild - key: ${{ runner.os }}-sdk-deps-${{ join(fromJSON(matrix.tags), '-') }}-${{ hashFiles('sdk/cmake/dependency_pins.cmake') }} - - - name: Build - if: steps.check.outputs.code == 'true' - working-directory: sdk - run: | - source /opt/intel/oneapi/setvars.sh - cmake --preset ${{ matrix.preset }} - cmake --build --preset ${{ matrix.preset }} -j $(($(nproc)/2)) - - - name: Test action - if: steps.check.outputs.code == 'true' - uses: ./.github/actions/linuxTest - with: - wdir: sdk - preset: ${{ matrix.preset }} - - - name: Build AddressSanitizer - if: steps.check.outputs.code == 'true' && contains(fromJSON(matrix.tags), 'server') - working-directory: sdk - run: | - source /opt/intel/oneapi/setvars.sh - cmake --preset linux-asan - cmake --build --preset linux-asan --parallel $(($(nproc)/2)) - - - name: Build ThreadSanitizer - if: steps.check.outputs.code == 'true' && contains(fromJSON(matrix.tags), 'server') - working-directory: sdk - run: | - source /opt/intel/oneapi/setvars.sh - cmake --preset linux-tsan - cmake --build --preset linux-tsan --parallel $(($(nproc)/2)) - - - name: Build libFuzzer - if: steps.check.outputs.code == 'true' && contains(fromJSON(matrix.tags), 'server') - working-directory: sdk - run: | - # To ensure it still builds, run build for fuzz targets until we have - # proper fuzz testing infrastructure in place. - source /opt/intel/oneapi/setvars.sh - cmake --preset linux-fuzz - cmake --build --preset linux-fuzz --parallel $(($(nproc)/2)) - - # - # Rocky8 has a problem with this test. - # - - name: Test AddressSanitizer - if: steps.check.outputs.code == 'true' && contains(fromJSON(matrix.tags), 'server') - working-directory: sdk - run: | - source /opt/intel/oneapi/setvars.sh - - # - # Must skip Rocky8 with more than one GPU because of - # an unexpected failure as documented in PTI-74 - # - if [ $(sycl-ls|grep 'ext_oneapi_level_zero:gpu:' -c) -gt 1 ] &&\ - [[ $(cat /etc/redhat-release) =~ Rocky.*8 ]]; then - exit 0 - fi - ctest --preset linux-asan --output-on-failure -L samples - - - name: Test ThreadSanitizer - if: steps.check.outputs.code == 'true' && contains(fromJSON(matrix.tags), 'server') - working-directory: sdk - run: | - source /opt/intel/oneapi/setvars.sh - ctest --preset linux-tsan --output-on-failure -L samples - - - win-lib-build-and-test: - name: Test pti-lib on Windows - runs-on: ${{ fromJSON(matrix.tags) }} - - timeout-minutes: 30 - - defaults: - run: - shell: cmd - working-directory: sdk - - strategy: - matrix: - include: - - preset: windows-ci-release - build-dir: wbr - tags: '["self-hosted", "Windows", "pti", "client", "BMG"]' - - if: vars.PTI_RUN_TESTS == 1 - - steps: - - name: Clean - shell: bash - working-directory: ${{ github.workspace }} - run: | - shopt -s dotglob - rm -rf ./* - - - name: Checkout - uses: actions/checkout@v4 - - - name: Configure Environment - run: | - set /A JOBS=%NUMBER_OF_PROCESSORS%/2 - >>%GITHUB_ENV% echo CMAKE_BUILD_PARALLEL_LEVEL=%JOBS% - >>%GITHUB_ENV% echo PTI_FETCH_DEPS_DIR=%RUNNER_TEMP%/_deps - - - name: Detect code changes - id: check - uses: ./.github/actions/detectChanges - - # runner.name is in the key because *-subbuild/CMakeCache.txt records the - # absolute RUNNER_TEMP path, which differs between runners. - # CMake will fail if the path changes. - # Whereas, Linux jobs run in containers and see the same path. - - name: Cache third-party dependency sources - if: steps.check.outputs.code == 'true' - uses: actions/cache@v4 - with: - path: | - ${{ env.PTI_FETCH_DEPS_DIR }}/*-src - ${{ env.PTI_FETCH_DEPS_DIR }}/*-subbuild - key: ${{ runner.os }}-${{ runner.name }}-sdk-deps-${{ hashFiles('sdk/cmake/dependency_pins.cmake') }} - - - name: Build - if: steps.check.outputs.code == 'true' - run: | - @echo off - call "C:\Program Files (x86)\Intel\oneAPI\setvars-vcvarsall.bat" - call "C:\Program Files (x86)\Intel\oneAPI\setvars.bat" - cmake --preset ${{ matrix.preset }} ^ - -DFETCHCONTENT_BASE_DIR=%PTI_FETCH_DEPS_DIR% - cmake --build --preset ${{ matrix.preset }} - - - name: Test - if: steps.check.outputs.code == 'true' - run: | - @echo off - call "C:\Program Files (x86)\Intel\oneAPI\setvars-vcvarsall.bat" - call "C:\Program Files (x86)\Intel\oneAPI\setvars.bat" - REM TODO(PTI-88): OverheadRecordsCountsAllOnesViewRecords fails on Windows. Investigation needed. Bug filed. - ctest --output-on-failure --preset ${{ matrix.preset }} -LE "performance|quarantine" ^ - -E "MainFixtureTest.OverheadRecordsCountsAllOnesViewRecords" - - - name: Quarantined tests # performance and flaky tests - if: steps.check.outputs.code == 'true' - continue-on-error: true - run: | - @echo off - call "C:\Program Files (x86)\Intel\oneAPI\setvars-vcvarsall.bat" - call "C:\Program Files (x86)\Intel\oneAPI\setvars.bat" - ctest --output-on-failure --preset ${{ matrix.preset }} -L "performance|quarantine" - if %ERRORLEVEL% NEQ 0 ( - echo ::warning::Quarantined tests step failed. - ) - exit /b 0 ::always exit 0 to keep the green check mark going - diff --git a/.github/workflows/sdk_compat_check.yml b/.github/workflows/sdk_compat_check.yml deleted file mode 100644 index 3a9f9dfb..00000000 --- a/.github/workflows/sdk_compat_check.yml +++ /dev/null @@ -1,374 +0,0 @@ -name: sdk-compat-check - -# -# Checks that the PTI SDK has not broken compatibility with the last released -# version on the same major line, in two ways: -# -# API baseline-era consumer source must still compile against today's headers -# ABI libabigail's abidiff on libpti_view.so, built from both revisions -# -# Gating follows semver, comparing sdk/VERSION against the baseline tag: -# -# PATCH x.y.Z nothing may change, not even additions -# MINOR x.Y.0 new exported symbols allowed, nothing else may change -# -# There is no MAJOR case: the baseline is only ever searched for on the current -# major line, so right after a major bump no baseline exists and the whole job -# is skipped until that major's first release is tagged. That leaves the major -# development cycle unchecked, which is deliberate (2.x may break 1.x) but also -# means an unintended break during it will not be caught. -# - -on: - pull_request: - branches: - - master - - release/** - paths: - - sdk/include/** - - sdk/src/** - - sdk/VERSION - - sdk/CMakePresets.json - - sdk/CMakeLists.txt - - .github/workflows/sdk_compat_check.yml - push: - branches: - - master - - release/** - paths: - - sdk/include/** - - sdk/src/** - - sdk/VERSION - - .github/workflows/sdk_compat_check.yml - workflow_dispatch: - inputs: - baseline: - description: 'Tag to compare against (default: newest release below sdk/VERSION)' - required: false - schedule: - - cron: '0 6 * * *' # Daily 6:00 AM UTC, after the nightly build - -defaults: - run: - shell: bash - -permissions: - contents: read - -jobs: - compat-check: - name: API/ABI compatibility - - timeout-minutes: 40 - - #TODO: may use a different machine - runs-on: [self-hosted, Linux, pti, server] - - # No GPU is used: this job only compiles the library and inspects the ELF. - container: - image: ${{ vars.PTI_DOCKER_UBUNTU_24_4_ONEAPI_N }} - credentials: - username: ${{ vars.PTI_DOCKER_USER }} - password: ${{ secrets.PTI_DOCKER_PWD }} - - if: vars.PTI_RUN_LINUX_TESTS == 1 - - env: - # ABI: library only, gcc, DWARF for abidiff. API: samples, so icpx. - PRESET: linux-abi - API_PRESET: linux-oneAPI-release - - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - # Tags are required to resolve and build the baseline release. - fetch-depth: 0 - clean: true - - - name: GitHub Proxy Usage - uses: ./.github/actions/github-proxy-usage - with: - proxy: ${{ vars.PTI_GIT_PROXY }} - runner-pattern: ${{ vars.PTI_GIT_PROXY_RUNNER_PATTERN }} - - - name: Resolve paths - run: | - { - echo "BASE_SRC=${RUNNER_TEMP}/pti-compat-baseline" - echo "CUR_INSTALL=${RUNNER_TEMP}/pti-install-current" - echo "BASE_INSTALL=${RUNNER_TEMP}/pti-install-baseline" - } >> "$GITHUB_ENV" - - - name: Install libabigail - run: | - if command -v abidiff; then - abidiff --version - exit 0 - fi - apt-get update -qq - if ! apt-get install -y --no-install-recommends abigail-tools; then - echo "::error::abigail-tools install failed" - exit 1 - fi - abidiff --version - - - name: Resolve baseline release and release type - id: baseline - run: | - git config --global --add safe.directory "$GITHUB_WORKSPACE" - - VERSION=$(tr -d '[:space:]' < sdk/VERSION) - MAJOR=${VERSION%%.*} # 1.2.0 -> 1 - REST=${VERSION#*.} # 1.2.0 -> 2.0 - MINOR=${REST%%.*} # 2.0 -> 2 - - # Release candidates and alphas are not the compatibility contract. - FINAL_RELEASE='^pti-[0-9]+\.[0-9]+\.[0-9]+$' - - TAG='${{ inputs.baseline }}' - if [ -n "$TAG" ]; then - git rev-parse -q --verify "refs/tags/${TAG}" >/dev/null \ - || { echo "::error::no such tag: ${TAG}"; exit 1; } - else - # Newest release below VERSION, so release/1.1.x compares against - # 1.1.0 and not a later 1.2.0. Empty TAG falls through to the skip. - CANDIDATES=$(git tag -l "pti-${MAJOR}.*" | grep -E "$FINAL_RELEASE" | sed 's/^pti-//') - BASE=$(printf '%s\n' $CANDIDATES "$VERSION" | sort -V -u \ - | awk -v v="$VERSION" '$0==v{exit} {last=$0} END{print last}') - [ -z "$BASE" ] || TAG="pti-${BASE}" - fi - - if [ -z "$TAG" ]; then - echo "No pti-${MAJOR}.y.z release tagged yet; nothing to compare against." - echo "skip=true" >> "$GITHUB_OUTPUT" - # Without this the run is a bare green check, indistinguishable from - # a check that actually ran. - { - echo "### API/ABI compatibility" - echo "" - echo ":warning: **Skipped.** No \`pti-${MAJOR}.y.z\` release is tagged yet, so there is" - echo "no baseline for \`${VERSION}\`. API and ABI are unchecked until that release exists." - } >> "$GITHUB_STEP_SUMMARY" - exit 0 - fi - - BASE_VERSION=${TAG#pti-} # pti-1.0.1 -> 1.0.1 - BASE_MINOR=${BASE_VERSION#*.} - BASE_MINOR=${BASE_MINOR%%.*} # 1.0.1 -> 0 - - if [ "$MINOR" != "$BASE_MINOR" ]; then - TYPE=MINOR - else - TYPE=PATCH - fi - - echo "skip=false" >> "$GITHUB_OUTPUT" - echo "tag=${TAG}" >> "$GITHUB_OUTPUT" - echo "base_version=${BASE_VERSION}" >> "$GITHUB_OUTPUT" - echo "version=${VERSION}" >> "$GITHUB_OUTPUT" - echo "type=${TYPE}" >> "$GITHUB_OUTPUT" - - { - echo "### API/ABI compatibility" - echo "" - echo "| | |" - echo "|---|---|" - echo "| current version | \`${VERSION}\` |" - echo "| baseline | \`${TAG}\` |" - echo "| release type | **${TYPE}** |" - } >> "$GITHUB_STEP_SUMMARY" - - - name: Build and install current tree - if: steps.baseline.outputs.skip == 'false' - working-directory: sdk - run: | - cmake --preset "$PRESET" - cmake --build --preset "$PRESET" -j "$(($(nproc)/2))" - cmake --install "build-${PRESET}" --prefix "$CUR_INSTALL" - - - name: Build and install baseline ${{ steps.baseline.outputs.tag }} - if: steps.baseline.outputs.skip == 'false' - run: | - TAG='${{ steps.baseline.outputs.tag }}' - - git config --global --add safe.directory "$GITHUB_WORKSPACE" - git config --global --add safe.directory "$BASE_SRC" - - rm -rf "$BASE_SRC" - git worktree prune - git worktree add --detach "$BASE_SRC" "$TAG" - - # The preset postdates the tag. Copying it in keeps both sides on - # identical flags, so abidiff cannot report toolchain differences. - cp sdk/CMakePresets.json "${BASE_SRC}/sdk/CMakePresets.json" - - cmake -S "${BASE_SRC}/sdk" --preset "$PRESET" - cmake --build "${BASE_SRC}/sdk/build-${PRESET}" -j "$(($(nproc)/2))" - cmake --install "${BASE_SRC}/sdk/build-${PRESET}" --prefix "$BASE_INSTALL" - - # Source-level check: the baseline's samples are the consumer code we have, - # and they must still build against today's headers. abidiff cannot cover - # this: a deleted macro, for one, leaves the library byte-identical. - - name: Check API compatibility and report results - if: steps.baseline.outputs.skip == 'false' - run: | - # A failing build is this step's signal, not an error to abort on. - set +e - - BASE="${BASE_SRC}/sdk" - BASE_VER='${{ steps.baseline.outputs.base_version }}' - BUILD="${GITHUB_WORKSPACE}/sdk/build-${API_PRESET}" - JOBS="$(($(nproc)/2))" - - source /opt/intel/oneapi/setvars.sh >/dev/null - command -v icpx >/dev/null || { echo "::error::icpx not on PATH after setvars.sh"; exit 1; } - - # Overlaid, not replaced: samples added since the baseline are named in - # today's CMakeLists. - cp -r "${BASE}/samples/." "${GITHUB_WORKSPACE}/sdk/samples/" - - # Samples added after the baseline that compile sources of an overlaid - # sample, so the overlay pairs their current code with baseline code. - # pc_sampling_profiler builds ../pc_sampling/pc_sampling_client.cc, whose - # API changed after 1.2.0. Remove it once pti-1.3.0 is the baseline. - COMPAT_EXCLUDED_SAMPLES="pc_sampling_profiler" - for name in $COMPAT_EXCLUDED_SAMPLES; do - if [ -e "${BASE}/samples/${name}" ]; then - echo "::warning::${name} is in ${BASE_VER} and is checked; remove it from COMPAT_EXCLUDED_SAMPLES" - continue - fi - echo "excluded ${name}: added after ${BASE_VER}" - echo "return()" > "${GITHUB_WORKSPACE}/sdk/samples/${name}/CMakeLists.txt" - echo "- excluded \`${name}\` (added after \`${BASE_VER}\`)" >> "$GITHUB_STEP_SUMMARY" - done - - # Current tests may depend on sample APIs added after the baseline. - cmake -S "${GITHUB_WORKSPACE}/sdk" --preset "$API_PRESET" -DPTI_BUILD_TESTING=OFF 2>&1 | tee configure.log - [ "${PIPESTATUS[0]}" -eq 0 ] || { echo "::error::configuring with the ${BASE_VER} samples failed"; exit 1; } - - # A sample returns early when a compiler or dependency check fails, which - # would leave the build green having compiled no consumer at all. - if grep -A2 "CMake Warning" configure.log | grep -E "requires|only supported"; then - echo "::error::a sample skipped itself; the samples above were not checked" - exit 1 - fi - - if cmake --build "$BUILD" -j "$JOBS"; then - echo "PASS: the ${BASE_VER} samples build against today's headers." - echo "consumers built:" - ls "${BUILD}/bin" - echo ":white_check_mark: API compatible with \`${BASE_VER}\`." >> "$GITHUB_STEP_SUMMARY" - exit 0 - fi - - echo "::error::API break: the ${BASE_VER} samples no longer build against today's headers" - { - echo "" - echo ":x: **API break.** Source written against \`${BASE_VER}\` no longer builds" - echo "against the current headers. Renaming or removing anything in a public" - echo "header breaks every consumer's build. The compiler errors are in the" - echo "step log." - } >> "$GITHUB_STEP_SUMMARY" - - exit 1 - - - name: Compare ABI and report results - if: steps.baseline.outputs.skip == 'false' - run: | - # abidiff's non-zero exit is this step's result, not an error to abort on. - set +e - - TYPE='${{ steps.baseline.outputs.type }}' - - # Excluded: their exported set varies by compiler, not by PTI's sources. - # __itt_* vendored ittnotify, versioned upstream by Intel - # _Z* C++ template instantiations escaping -fvisibility=hidden - cat > suppressions.ini <<'EOF' - [suppress_function] - symbol_name_regexp = ^(__itt_|_Z) - [suppress_variable] - symbol_name_regexp = ^(__itt_|_Z) - EOF - - ARGS=(--suppressions suppressions.ini) - if [ "$TYPE" = MINOR ]; then - ARGS+=(--no-added-syms) - fi - - # What PTI ships is whatever it installs, so both sides are listed rather - # than named here. The unversioned symlink is the stable name. - shipped() { # - find "$1/lib" -maxdepth 1 -name '*.so' -printf '%f\n' | sort - } - - ADDED=$(comm -13 <(shipped "$BASE_INSTALL") <(shipped "$CUR_INSTALL")) - REMOVED=$(comm -23 <(shipped "$BASE_INSTALL") <(shipped "$CUR_INSTALL")) - KEPT=$(comm -12 <(shipped "$BASE_INSTALL") <(shipped "$CUR_INSTALL")) - - [ -n "$KEPT$REMOVED" ] || { echo "::error::no installed libraries found to compare"; exit 1; } - - rc=0 - - if [ -n "$REMOVED" ]; then - echo "::error::libraries no longer shipped: $(echo $REMOVED)" - rc=1 - fi - - if [ -n "$ADDED" ]; then - if [ "$TYPE" = PATCH ]; then - echo "::error::libraries added in a PATCH: $(echo $ADDED). Bump the minor in sdk/VERSION." - rc=1 - else - echo "New library this ${TYPE}: $(echo $ADDED)" - fi - fi - - for lib in $KEPT; do - echo "abidiff ${ARGS[*]} $lib" - abidiff "${ARGS[@]}" "${BASE_INSTALL}/lib/${lib}" "${CUR_INSTALL}/lib/${lib}" | tee "abidiff-${lib}.log" - RC=${PIPESTATUS[0]} - echo "${lib}: abidiff exit status $RC" - - # Bit field: 1 ERROR, 2 USAGE, 4 ABI_CHANGE, 8 INCOMPATIBLE_CHANGE. - if [ $((RC & 3)) -ne 0 ]; then - echo "::error::abidiff could not complete on ${lib} (exit $RC)" - rc=1 - continue - fi - - if [ "$RC" -eq 0 ]; then - echo ":white_check_mark: \`${lib}\`: no incompatible ABI change." >> "$GITHUB_STEP_SUMMARY" - continue - fi - - rc=1 - { - echo "" - echo ":x: **\`${lib}\`: changes that are not allowed in a ${TYPE} release.**" - echo "" - echo '```' - head -50 "abidiff-${lib}.log" - echo '```' - } >> "$GITHUB_STEP_SUMMARY" - done - - if [ "$rc" -eq 0 ]; then - echo "PASS: ABI is compatible as a ${TYPE} release." - exit 0 - fi - - if [ "$TYPE" = PATCH ]; then - echo "::error::A PATCH allows no ABI change. To add API, bump the minor in sdk/VERSION; to change existing API, bump the major." - else - echo "::error::A MINOR may add exported symbols but not change or remove them. Added symbols were already ignored, so the changes above alter the existing surface. Make it additive (see sdk/samples/view_record_versioned/main.cc) or plan a MAJOR." - fi - - exit 1 - - - name: Remove baseline worktree - if: always() - run: | - git worktree remove --force "$BASE_SRC" 2>/dev/null || true - rm -rf "$BASE_SRC" - git worktree prune 2>/dev/null || true diff --git a/.github/workflows/sdk_opensource_dpcpp.yml b/.github/workflows/sdk_opensource_dpcpp.yml deleted file mode 100644 index ab3eba33..00000000 --- a/.github/workflows/sdk_opensource_dpcpp.yml +++ /dev/null @@ -1,176 +0,0 @@ -name: sdk-opensource-dpcpp-build-and-test - -# -# Build and test the SDK with the open-source DPC++ compiler (github.com/intel/llvm, -# branch sycl-rel-7_0) instead of oneAPI. -# - -on: - push: - branches: [ "master" ] - paths: - - .github/workflows/sdk_opensource_dpcpp.yml - pull_request: - branches: [ "master" ] - paths: - - .github/workflows/sdk_opensource_dpcpp.yml - workflow_dispatch: - schedule: - # Daily 8:00 AM UTC / 12:00 AM PST. - - cron: '0 8 * * *' - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -defaults: - run: - shell: bash - -permissions: - contents: read - -jobs: - # Separate job because the container used in 'build-and-test' cannot reach ghcr. - get-toolchain: - name: Extract ${{ matrix.toolchain }} - - timeout-minutes: 10 - - runs-on: [self-hosted, Linux, pti, server] - - strategy: - matrix: - include: - - toolchain: dpcpp-7.0 - # TODO: move to a repo variable, like the other container images. - # e.g. vars.PTI_DOCKER_DPCPP_REL_7_0 - image: ghcr.io/intel/llvm/sycl_prebuilt_tests:sycl-rel-7_0 - - container: - image: ${{ matrix.image }} - options: --user root ${{ vars.PTI_DOCKER_PROXIES }} - credentials: - username: ${{ secrets.PTI_GHCR_USER }} - password: ${{ secrets.PTI_GHCR_PWD }} - - if: vars.PTI_RUN_OPENSOURCE_TESTS == 1 - - steps: - - name: Decompress toolchain - run: | - # Decompressed here, the later container has tar but no zstd. - zstd -d -f /sycl-prebuilt/toolchain.tar.zst -o "$GITHUB_WORKSPACE/toolchain.tar" - ls -lh "$GITHUB_WORKSPACE/toolchain.tar" - - - name: Upload toolchain - uses: actions/upload-artifact@v4 - with: - name: toolchain-${{ matrix.toolchain }} - path: toolchain.tar - retention-days: 1 - # Fast deflate: the tar is ~1 GB of binaries and compresses ~3x. - compression-level: 1 - - build-and-test: - name: Test PTI ${{ matrix.label }} - - needs: get-toolchain - - timeout-minutes: 30 - - runs-on: ${{ fromJSON(matrix.tags) }} - - strategy: - # One failing configuration must not cancel the others; the run still fails. - fail-fast: false - matrix: - include: - - label: ubuntu-24.04-client BMG dpcpp-7.0 - toolchain: dpcpp-7.0 - container: ${{ vars.PTI_DOCKER_UBUNTU_24_4_CLIENT_ONEAPI_N }} - preset: linux-dpclang-release - tags: '["self-hosted", "Linux", "pti", "client", "BMG"]' - - container: - image: ${{ matrix.container }} - options: --device=/dev/dri --cap-add CAP_PERFMON --shm-size=24G ${{ vars.PTI_DOCKER_PROXIES }} --volume=/dev/dri/by-path:/dev/dri/by-path - credentials: - username: ${{ vars.PTI_DOCKER_USER }} - password: ${{ secrets.PTI_DOCKER_PWD }} - - if: vars.PTI_RUN_OPENSOURCE_TESTS == 1 - - env: - # The tarball has bin/, include/ and lib/ at its top level. - TC: ${{ github.workspace }}/dpcpp-toolchain - - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - clean: true - - - name: Download toolchain - uses: actions/download-artifact@v4 - with: - name: toolchain-${{ matrix.toolchain }} - - - name: Unpack toolchain - run: | - mkdir -p "$TC" - tar -xf toolchain.tar -C "$TC" - rm -f toolchain.tar - echo "$TC/bin" >> "$GITHUB_PATH" - echo "LD_LIBRARY_PATH=${TC}/lib${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}" >> "$GITHUB_ENV" - echo "LIBRARY_PATH=${TC}/lib${LIBRARY_PATH:+:${LIBRARY_PATH}}" >> "$GITHUB_ENV" - echo "CPLUS_INCLUDE_PATH=${TC}/include${CPLUS_INCLUDE_PATH:+:${CPLUS_INCLUDE_PATH}}" >> "$GITHUB_ENV" - echo "CMAKE_PREFIX_PATH=${TC}${CMAKE_PREFIX_PATH:+:${CMAKE_PREFIX_PATH}}" >> "$GITHUB_ENV" - - - name: Verify toolchain and GPU - run: | - echo "dpclang++ resolves to: $(which dpclang++)" - case "$(which dpclang++)" in - "$TC"/bin/dpclang++) ;; - *) echo "::error::dpclang++ is not the open-source toolchain"; exit 1 ;; - esac - - dpclang++ --version - - if ! sycl-ls | grep -q 'gpu'; then - echo "::error::no SYCL GPU device found" - SYCL_UR_TRACE=1 sycl-ls --verbose || true - exit 1 - fi - sycl-ls - - - name: Build - id: build - working-directory: sdk - run: | - # Note: "Could NOT find unified-runtime" is expected and fails soft: - # Findunified-runtime.cmake does not search include/unified-runtime/, - # so UR-specific tests are silently skipped. - cmake --preset ${{ matrix.preset }} - cmake --build --preset ${{ matrix.preset }} -j $(($(nproc)/2)) - - - name: Testing - working-directory: sdk - run: | - # onemkl_gemm_exe and omp_vec_add report Not Run: their samples skip - # themselves at configure time without oneMKL / icx, but the tests are - # still registered. - ctest --output-on-failure --preset ${{ matrix.preset }} \ - -LE "performance|quarantine" \ - -E "run-onemkl_gemm_exe|run-omp_vec_add" - - - name: Quarantined tests # performance and flaky tests - if: ${{ !cancelled() && steps.build.outcome == 'success' }} - continue-on-error: true - working-directory: sdk - run: | - if ctest --output-on-failure --preset ${{ matrix.preset }} -L 'performance|quarantine'; then - echo "Quarantined tests pass" - else - echo "::warning::Quarantined tests failed" - fi diff --git a/.gitignore b/.gitignore index 1e80cc7f..99b0ae1d 100644 --- a/.gitignore +++ b/.gitignore @@ -12,5 +12,3 @@ CMakeUserPresets.json error_diff.txt *.swp -# fuzz harness build (tools/unitrace/test/fuzz/README.md) -build-fuzz/ diff --git a/CMakeLists.txt b/CMakeLists.txt index be0602f0..adf16908 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,6 +3,22 @@ # # SPDX-License-Identifier: MIT # ============================================================= +# +# Aggregate build of the PTI-GPU tools and samples. +# +# Every tool and sample is a standalone CMake project (see build_utils/), so +# each one is built here as an ExternalProject in its own binary directory: +# ${CMAKE_BINARY_DIR}/tools/ +# ${CMAKE_BINARY_DIR}/samples/ +# The per-folder builds used by tests/run.py keep working unchanged. +# +# Options: +# PTI_GPU_BUILD_TOOLS Build the tools (default ON) +# PTI_GPU_BUILD_SAMPLES Build the samples (default ON) +# PTI_GPU_TOOLS List of tools to build (default: all) +# PTI_GPU_SAMPLES List of samples to build (default: all) +# PTI_GPU_SKIP List of tools/samples to skip, e.g. "instcount;memaccess" +# BUILD_TESTING Add the "legacy" ctest that runs tests/run.py cmake_minimum_required(VERSION 3.22) include(cmake/helpers.cmake) @@ -12,52 +28,174 @@ SetPtiGpuVersion() project( pti-gpu VERSION ${PTI_GPU_VERSION} - DESCRIPTION "Intel Profiling Tools" - HOMEPAGE_URL "https://github.com/intel/pti-gpu" + DESCRIPTION "Profiling and tracing tools and samples for Intel(R) GPUs" + HOMEPAGE_URL "https://github.com/vladimir-tsymbal/pti-gpu" LANGUAGES C CXX) -if(PROJECT_IS_TOP_LEVEL) - set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin CACHE STRING "") - set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib CACHE STRING "") - if(NOT APPLE) - list(APPEND CMAKE_BUILD_RPATH $ORIGIN) - endif() - GetCurrentGitRev(PTI_GPU_COMMIT_HASH) +if(NOT CMAKE_SYSTEM_NAME STREQUAL "Linux") + # The build_utils Windows paths are kept, but this fork develops and + # tests on Linux only. + message(WARNING "Only Linux is tested in this fork; ${CMAKE_SYSTEM_NAME} builds may not work") endif() -option(PTI_GPU_BUILD_SDK "Build PTI" ON) -option(PTI_GPU_BUILD_UNITRACE "Build unitrace" ON) +include(ExternalProject) + +set(PTI_GPU_ALL_TOOLS + cl_tracer + ze_tracer + onetrace + oneprof + gpuinfo + instcount + memaccess + sysmon) + +set(PTI_GPU_ALL_SAMPLES + cl_debug_info + cl_gemm + cl_gemm_inst + cl_gemm_itt + cl_gpu_metrics + cl_gpu_query + cl_hot_functions + cl_hot_kernels + dpc_gemm + dpc_info + gpu_perfmon_set + omp_gemm + omp_hot_regions + ze_debug_info + ze_gemm + ze_hot_functions + ze_hot_kernels + ze_info + ze_metric_info + ze_metric_query + ze_metric_streamer + ze_sysman) + +# Samples that hard-code icpx as their compiler. +set(PTI_GPU_ICPX_SAMPLES dpc_gemm dpc_info omp_gemm omp_hot_regions) +# Samples that need the IGA library (FindIGALibrary is fatal without it). +set(PTI_GPU_IGA_SAMPLES cl_debug_info ze_debug_info) + +option(PTI_GPU_BUILD_TOOLS "Build the PTI-GPU tools" ON) +option(PTI_GPU_BUILD_SAMPLES "Build the PTI-GPU samples" ON) +set(PTI_GPU_TOOLS + "${PTI_GPU_ALL_TOOLS}" + CACHE STRING "Tools to build") +set(PTI_GPU_SAMPLES + "${PTI_GPU_ALL_SAMPLES}" + CACHE STRING "Samples to build") +set(PTI_GPU_SKIP + "" + CACHE STRING "Tools and samples to skip") option(BUILD_TESTING "Build tests" OFF) include(CTest) -if(PTI_GPU_BUILD_SDK) - if(PTI_GPU_COMMIT_HASH) - set(PTI_COMMIT_HASH - ${PTI_GPU_COMMIT_HASH} - CACHE INTERNAL "PTI commit hash") - endif() - set(PTI_BUILD_TESTING - ${BUILD_TESTING} - CACHE INTERNAL "Build PTI tests") - set(PTI_BUILD_SAMPLES - ${BUILD_TESTING} - CACHE INTERNAL "Build PTI samples") - add_subdirectory(sdk) +if(NOT CMAKE_BUILD_TYPE) + set(CMAKE_BUILD_TYPE + Release + CACHE STRING "Build type" FORCE) endif() -if(PTI_GPU_BUILD_UNITRACE) - if(NOT MPI_FOUND) - find_package(MPI QUIET) +# Cheap dependency probes. A missing dependency skips the affected components +# with a message instead of failing the whole build. Linux only: on Windows +# the samples pick other compilers and build_utils locates IGA by its DLL. +if(WIN32) + set(PTI_GPU_ICPX ON) + set(PTI_GPU_IGA_LIB ON) +else() + find_program(PTI_GPU_ICPX icpx) + find_library(PTI_GPU_IGA_LIB NAMES iga64) +endif() + +# Settings forwarded to each sub-project when they are set here. +set(PTI_GPU_EP_CMAKE_ARGS "-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}") +foreach(_var CMAKE_PREFIX_PATH CMAKE_INCLUDE_PATH CMAKE_LIBRARY_PATH GTPIN_PATH) + if(DEFINED ${_var} AND NOT "${${_var}}" STREQUAL "") + string(REPLACE ";" "|" _val "${${_var}}") + list(APPEND PTI_GPU_EP_CMAKE_ARGS "-D${_var}=${_val}") endif() - if(NOT MPI_FOUND) - set(BUILD_WITH_MPI - OFF - CACHE BOOL "Build Unitrace with MPI support") +endforeach() + +# Returns TRUE in OUT_VAR if component NAME should be built. +function(pti_gpu_component_enabled NAME OUT_VAR) + set(_enabled TRUE) + if(NAME IN_LIST PTI_GPU_SKIP) + message(STATUS "Skipping ${NAME}: listed in PTI_GPU_SKIP") + set(_enabled FALSE) + elseif(NAME IN_LIST PTI_GPU_ICPX_SAMPLES AND NOT PTI_GPU_ICPX) + message(STATUS "Skipping ${NAME}: icpx not found (source oneAPI setvars.sh)") + set(_enabled FALSE) + elseif(NAME IN_LIST PTI_GPU_IGA_SAMPLES AND NOT PTI_GPU_IGA_LIB) + message(STATUS "Skipping ${NAME}: IGA library (libiga64) not found") + set(_enabled FALSE) endif() - add_subdirectory(tools/unitrace) + set(${OUT_VAR} + ${_enabled} + PARENT_SCOPE) +endfunction() + +set(PTI_GPU_ENABLED_TOOLS "") +set(PTI_GPU_STAGE_DIR "${CMAKE_BINARY_DIR}/stage") + +if(PTI_GPU_BUILD_TOOLS) + foreach(_tool IN LISTS PTI_GPU_TOOLS) + if(NOT _tool IN_LIST PTI_GPU_ALL_TOOLS) + message(FATAL_ERROR "Unknown tool in PTI_GPU_TOOLS: ${_tool}") + endif() + pti_gpu_component_enabled(${_tool} _enabled) + if(NOT _enabled) + continue() + endif() + # Each tool installs into its own staging prefix; the top-level install() + # below copies it into CMAKE_INSTALL_PREFIX as a per-tool CPack component. + ExternalProject_Add( + ${_tool} + SOURCE_DIR "${PROJECT_SOURCE_DIR}/tools/${_tool}" + BINARY_DIR "${CMAKE_BINARY_DIR}/tools/${_tool}" + INSTALL_DIR "${PTI_GPU_STAGE_DIR}/${_tool}" + LIST_SEPARATOR "|" + CMAKE_ARGS ${PTI_GPU_EP_CMAKE_ARGS} "-DCMAKE_INSTALL_PREFIX=" + BUILD_ALWAYS ON) + install( + DIRECTORY "${PTI_GPU_STAGE_DIR}/${_tool}/" + DESTINATION . + USE_SOURCE_PERMISSIONS + COMPONENT ${_tool}) + list(APPEND PTI_GPU_ENABLED_TOOLS ${_tool}) + endforeach() +endif() + +if(PTI_GPU_BUILD_SAMPLES) + foreach(_sample IN LISTS PTI_GPU_SAMPLES) + if(NOT _sample IN_LIST PTI_GPU_ALL_SAMPLES) + message(FATAL_ERROR "Unknown sample in PTI_GPU_SAMPLES: ${_sample}") + endif() + pti_gpu_component_enabled(${_sample} _enabled) + if(NOT _enabled) + continue() + endif() + ExternalProject_Add( + ${_sample} + SOURCE_DIR "${PROJECT_SOURCE_DIR}/samples/${_sample}" + BINARY_DIR "${CMAKE_BINARY_DIR}/samples/${_sample}" + LIST_SEPARATOR "|" + CMAKE_ARGS ${PTI_GPU_EP_CMAKE_ARGS} + BUILD_ALWAYS ON + INSTALL_COMMAND "") + endforeach() endif() -if(PROJECT_IS_TOP_LEVEL) - include(cmake/packaging.cmake) +if(BUILD_TESTING) + find_package(Python3 REQUIRED COMPONENTS Interpreter) + # Builds and runs every sample and tool in-tree (/build), as before. + add_test(NAME legacy_run_py + COMMAND ${Python3_EXECUTABLE} ${PROJECT_SOURCE_DIR}/tests/run.py + WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/tests) + set_tests_properties(legacy_run_py PROPERTIES LABELS legacy) endif() + +include(cmake/packaging.cmake) diff --git a/README.md b/README.md index 958e8630..36b1ab73 100644 --- a/README.md +++ b/README.md @@ -1,23 +1,20 @@ # Profiling Tools Interfaces for GPU (PTI for GPU) -> [!WARNING] -> The samples and auxiliary tools (other than `tools/unitrace`) are no longer -> under active development and will be removed soon. Candidates for removal: -> -> - `chapters` -> - `samples` -> - `loader` -> - `tests` -> - `tools/ze_tracer` -> - `tools/memaccess` -> - `tools/gpuinfo` -> - `tools/oneprof` -> - `tools/onetrace` -> - `tools/instcount` -> - `tools/sysmon` -> -> Identical functionality can be found in `unitrace` for most of the tools. For -> GTPin-related tools, one can find tools and usage samples at . +## About this fork + +This fork is a maintained continuation of the PTI-GPU tools and samples that +upstream marked as no longer under active development. The PTI SDK and +`unitrace` are not part of this fork. + +- Targets Linux with both the i915 and xe kernel drivers. Testing is + currently done on i915; xe validation is in progress. The Windows build + paths are kept, but Windows is not tested here. +- Tools: [onetrace](tools/onetrace/README.md), [oneprof](tools/oneprof/README.md), + [ze_tracer](tools/ze_tracer/README.md), [cl_tracer](tools/cl_tracer/README.md), + [gpuinfo](tools/gpuinfo/README.md), [instcount](tools/instcount/README.md), + [memaccess](tools/memaccess/README.md), [sysmon](tools/sysmon/README.md). +- Also included: the [samples](#sample-tools--utilities), the profiling + [chapters](#profiling-chapters), and the `tests/run.py` test driver. ## Overview @@ -33,8 +30,8 @@ You may obtain a copy of the License at ## Supported OS -- Linux -- Windows +- Linux (i915 and xe kernel drivers): developed and tested (xe validation in progress) +- Windows: build paths kept, not tested in this fork ## Supported Platforms @@ -46,11 +43,9 @@ You may obtain a copy of the License at *Some samples may have higher hardware requirements.* -## Regularly Tested Configurations +## Tested Configurations -- Ubuntu 24.04 with Intel® Arc™ B580 Graphics -- Ubuntu 24.04 with Intel® Data Center GPU Max Series -- Windows 11 with Intel® Arc™ B580 Graphics +- Ubuntu 24.04 with Intel® Data Center GPU Max Series (i915) ## Profiling Chapters @@ -79,22 +74,22 @@ You may obtain a copy of the License at ## Profiling & Debug Tools -- [unitrace](tools/unitrace/README.md) - unified tracing and profiling tool. In - addition to Level Zero and/or OpenCL, this tool is capable of profiling - software layers in the software stack, for example, SYCL and plugins, oneCCL, - MPI etc., for scale-up and scale-out applications. It also supports profiling - hardware metrics (including instruction-level EU stalls) and software events - at the same time. +- [onetrace](tools/onetrace/README.md) - host and device tracing tool for + OpenCL(TM) and Level Zero backends (including DPC++ and OpenMP* GPU offload); +- [ze_tracer](tools/ze_tracer/README.md) - host and device tracing tool for + Level Zero; +- [cl_tracer](tools/cl_tracer/README.md) - host and device tracing tool for + OpenCL(TM); +- [oneprof](tools/oneprof/README.md) - GPU HW metrics collection tool; - [gpuinfo](tools/gpuinfo/README.md) - provides basic information about the GPUs installed in a system, and the list of HW metrics one can collect for it; - [instcount](tools/instcount/README.md) - prints GPU kernel assembly (GEN ISA) annotated by instruction execution count; +- [memaccess](tools/memaccess/README.md) - GT Pin based analysis of GPU kernel + memory accesses; - [sysmon](tools/sysmon/README.md) - Linux "top" like utility to monitor GPUs installed on a system; -- [pti](sdk/README.md) - profiling library one can link against to gain the - capability of profiling SYCL and Level Zero; used by PyTorch Profiler for the - Intel® XPU Activity. ## Sample Tools & Utilities @@ -196,6 +191,42 @@ sample description page. ## Build and Run +### Building everything + +The top-level CMake project builds every tool and sample, each as a +separate CMake sub-build in `build/tools/` and `build/samples/`: + +```sh +source /opt/intel/oneapi/setvars.sh # needed for the DPC++/OpenMP samples +cmake -S . -B build -GNinja -DCMAKE_BUILD_TYPE=Release +cmake --build build +cmake --install build --prefix # installs the tools into /bin +``` + +Options: + +| Option | Default | Description | +|---|---|---| +| `PTI_GPU_BUILD_TOOLS` | `ON` | Build the tools | +| `PTI_GPU_BUILD_SAMPLES` | `ON` | Build the samples | +| `PTI_GPU_TOOLS` | all | List of tools to build, e.g. `"onetrace;sysmon"` | +| `PTI_GPU_SAMPLES` | all | List of samples to build | +| `PTI_GPU_SKIP` | empty | List of tools or samples to skip, e.g. `"instcount;memaccess"` | +| `BUILD_TESTING` | `OFF` | Add a `legacy` ctest that runs `tests/run.py` | + +Samples that need `icpx` (DPC++ and OpenMP) are skipped automatically if the +compiler is not found, and the `*_debug_info` samples are skipped if the IGA +library (`libiga64.so`) is not found. `instcount` and `memaccess` download +GT Pin at configure time. + +Per-tool packages can be created with CPack, e.g.: + +```sh +cd build && cpack -G TGZ # or DEB / RPM +``` + +### Building a single sample or tool + In general, to build samples one need to perform the following steps (specific instructions for particular sample can be found on sample description page): @@ -254,18 +285,6 @@ To remove all of these folders, use: python /tests/run.py -c ``` -## Unitrace and PTI SDK Experimental Build - -The two products in active development are Unitrace and PTI SDK. A new, -top-level, CMakeLists.txt file can be used to build them together. -To build them, use CMake in the root of this repository. - -```console -source /opt/intel/oneapi/setvars.sh -cmake -S . -B build -GNinja -DCMAKE_BUILD_TYPE=Release -cmake --build build -``` - **Tested software versions one may find in [SOFTWARE](SOFTWARE) file.** **(*) Other names and brands may be claimed as property of others.** diff --git a/build_utils/CMakeLists.txt b/build_utils/CMakeLists.txt index 5617cfc7..9a93b742 100644 --- a/build_utils/CMakeLists.txt +++ b/build_utils/CMakeLists.txt @@ -1,7 +1,7 @@ set(PTI_CMAKE_MACRO_DIR ${CMAKE_CURRENT_LIST_DIR} CACHE INTERNAL "") macro(SetRequiredCMakeVersion) - set(REQUIRED_CMAKE_VERSION 3.12) + set(REQUIRED_CMAKE_VERSION 3.22) endmacro() macro(RequirePythonInterp) @@ -224,8 +224,9 @@ macro(FindIGALibrary TARGET) string(REPLACE ":" ";" SEARCH_LIB_PATH $ENV{LD_LIBRARY_PATH}) endif() endif() + # Accept the versioned runtime soname when no dev symlink is installed. find_library(IGA_LIB_PATH - NAMES iga64 + NAMES iga64 libiga64.so.2 libiga64.so.1 PATHS ${SEARCH_LIB_PATH}) if(NOT IGA_LIB_PATH) message(FATAL_ERROR @@ -358,7 +359,7 @@ macro(CheckForMDLibrary TARGET) endif() endif() find_library(MD_LIB_PATH - NAMES igdmd md + NAMES igdmd md libigdmd.so.1 PATHS ${SEARCH_LIB_PATH}) if(NOT MD_LIB_PATH) message(WARNING @@ -389,7 +390,7 @@ macro(CheckForMetricsLibrary) endif() endif() find_library(ML_LIB_PATH - NAMES igdml64 + NAMES igdml64 igdml libigdml.so.1 PATHS ${SEARCH_LIB_PATH}) endif() @@ -433,22 +434,59 @@ macro(GetGTPinPackage) message(FATAL_ERROR "Graphics Technology Pin (GT Pin) is not supported for the platform") endif() endif() + # Download the archive ourselves instead of letting FetchContent do it: + # ExternalProject retries a timed-out download 5 times, and its inactivity + # timeout does not cover a stalled TCP connect (e.g. a proxy + # misconfiguration), so an unreachable host used to hang configure forever. + set(GTPIN_DOWNLOAD_PAGE + "https://www.intel.com/content/www/us/en/download/730596/867025/gtpin.html") + if(NOT DEFINED GTPIN_DOWNLOAD_TIMEOUT) + set(GTPIN_DOWNLOAD_TIMEOUT 900) + endif() + if(NOT DEFINED GTPIN_DOWNLOAD_INACTIVITY_TIMEOUT) + set(GTPIN_DOWNLOAD_INACTIVITY_TIMEOUT 60) + endif() + if(EXISTS "${GTPIN_LINK}") + set(GTPIN_ARCHIVE "${GTPIN_LINK}") + else() + get_filename_component(GTPIN_ARCHIVE_NAME "${GTPIN_LINK}" NAME) + set(GTPIN_ARCHIVE "${CMAKE_BINARY_DIR}/_deps/${GTPIN_ARCHIVE_NAME}") + endif() + if(NOT EXISTS "${GTPIN_ARCHIVE}") + message(STATUS "Downloading GTPin package: ${GTPIN_LINK} " + "(timeout ${GTPIN_DOWNLOAD_TIMEOUT} s, inactivity timeout ${GTPIN_DOWNLOAD_INACTIVITY_TIMEOUT} s)") + string(RANDOM LENGTH 8 GTPIN_PART_SUFFIX) + set(GTPIN_ARCHIVE_PART "${GTPIN_ARCHIVE}.${GTPIN_PART_SUFFIX}.part") + file(DOWNLOAD "${GTPIN_LINK}" "${GTPIN_ARCHIVE_PART}" + TIMEOUT ${GTPIN_DOWNLOAD_TIMEOUT} + INACTIVITY_TIMEOUT ${GTPIN_DOWNLOAD_INACTIVITY_TIMEOUT} + STATUS GTPIN_DOWNLOAD_STATUS) + list(GET GTPIN_DOWNLOAD_STATUS 0 GTPIN_DOWNLOAD_CODE) + if(NOT GTPIN_DOWNLOAD_CODE EQUAL 0) + file(REMOVE "${GTPIN_ARCHIVE_PART}") + message(FATAL_ERROR + "GTPin package download failed: ${GTPIN_LINK} (${GTPIN_DOWNLOAD_STATUS}). " + "Check your proxy settings, or download the package manually from " + "${GTPIN_DOWNLOAD_PAGE}, unpack it and pass -DGTPIN_PATH= " + "(or -DGTPIN_LINK=).") + endif() + file(RENAME "${GTPIN_ARCHIVE_PART}" "${GTPIN_ARCHIVE}") + endif() include(FetchContent) if(${CMAKE_VERSION} VERSION_LESS "3.24.0") FetchContent_Declare( gtpin_package - URL ${GTPIN_LINK} -SOURCE_DIR ${GTPIN_SOURCE_DIR} + URL ${GTPIN_ARCHIVE} + SOURCE_DIR ${GTPIN_SOURCE_DIR} ) else() FetchContent_Declare( gtpin_package - URL ${GTPIN_LINK} + URL ${GTPIN_ARCHIVE} DOWNLOAD_EXTRACT_TIMESTAMP YES -SOURCE_DIR ${GTPIN_SOURCE_DIR} + SOURCE_DIR ${GTPIN_SOURCE_DIR} ) endif() - message(STATUS "Download GTPin package link: ${GTPIN_LINK}") FetchContent_MakeAvailable(gtpin_package) if(UNIX) set(GTPIN_PATH ${gtpin_package_SOURCE_DIR}) @@ -485,6 +523,24 @@ macro(FindGTPinLibrary TARGET) target_link_libraries(${TARGET} gtpin ged) endmacro() +# Installs the GTPin runtime libraries that TARGET needs into a private +# lib/ directory (one copy per tool, so separate tool packages do not +# conflict) and points the installed TARGET at it through RPATH. The GTPin +# license allows redistribution of the unmodified package, provided its license +# and third-party notices come with it; they are installed to +# share/doc//gtpin. Linux only; Windows installs are unchanged. +macro(InstallGTPinRuntime TARGET TOOL_NAME) + GetGTPinPackage() + if(UNIX) + set_target_properties(${TARGET} PROPERTIES + INSTALL_RPATH "$ORIGIN/../lib/${TOOL_NAME}") + file(GLOB GTPIN_RUNTIME_LIBS "${GTPIN_PATH}/Lib/intel64/*.so*") + install(FILES ${GTPIN_RUNTIME_LIBS} DESTINATION lib/${TOOL_NAME}) + install(DIRECTORY "${GTPIN_PATH}/Licensing/" + DESTINATION share/doc/${TOOL_NAME}/gtpin) + endif() +endmacro() + macro(FindGTPinHeaders TARGET) GetGTPinPackage() target_include_directories(${TARGET} @@ -512,13 +568,11 @@ macro(GetLevelZeroHeaders TARGET) DEPENDS ${L0_INC_PATH}/level_zero/ze_api.h ${L0_INC_PATH}/level_zero/zes_api.h ${L0_INC_PATH}/level_zero/zet_api.h - ${L0_INC_PATH}/level_zero/zer_api.h ${L0_INC_PATH}/level_zero/layers/zel_tracing_api.h ${L0_INC_PATH}/level_zero/layers/zel_tracing_register_cb.h) add_custom_command(OUTPUT ${L0_INC_PATH}/level_zero/ze_api.h ${L0_INC_PATH}/level_zero/zes_api.h ${L0_INC_PATH}/level_zero/zet_api.h - ${L0_INC_PATH}/level_zero/zer_api.h ${L0_INC_PATH}/level_zero/layers/zel_tracing_api.h ${L0_INC_PATH}/level_zero/layers/zel_tracing_register_cb.h COMMAND "${PYTHON_EXECUTABLE}" "${PTI_CMAKE_MACRO_DIR}/get_ze_headers.py" ${L0_INC_PATH} ${CMAKE_BINARY_DIR} ${LEVEL_ZERO_COMMIT_ID}) @@ -643,6 +697,11 @@ macro(FindL0HeadersPath TARGET L0_GEN_SCRIPT) DEPENDS ${L0_GEN_INC_PATH}/tracing.gen) add_custom_command(OUTPUT ${L0_GEN_INC_PATH}/tracing.gen COMMAND "${PYTHON_EXECUTABLE}" ${L0_GEN_SCRIPT} ${L0_GEN_INC_PATH} "${L0_INC_PATH}/level_zero") + if(TARGET level_zero_headers) + # The headers are downloaded at build time (FindL0Headers fallback); + # generate the callbacks only after they exist. + add_dependencies(ze_gen_headers level_zero_headers) + endif() target_include_directories(${TARGET} PUBLIC "${L0_GEN_INC_PATH}") add_dependencies(${TARGET} diff --git a/build_utils/build_utils.py b/build_utils/build_utils.py index e7fc9663..55e11ff4 100644 --- a/build_utils/build_utils.py +++ b/build_utils/build_utils.py @@ -1,12 +1,95 @@ import os import sys import shutil +import stat import subprocess +import time + +try: + import fcntl +except ImportError: # Windows + fcntl = None + import msvcrt + +def lock_file(f): + if fcntl is not None: + fcntl.flock(f, fcntl.LOCK_EX) + return + # msvcrt.LK_LOCK gives up after about 10 s, and a clone can take longer. + while True: + try: + msvcrt.locking(f.fileno(), msvcrt.LK_LOCK, 1) + return + except OSError: + time.sleep(1) + +def unlock_file(f): + if fcntl is not None: + fcntl.flock(f, fcntl.LOCK_UN) + else: + f.seek(0) + msvcrt.locking(f.fileno(), msvcrt.LK_UNLCK, 1) + +# Make git give up on a transfer that stays below 1 KB/s for 60 s, instead of +# hanging until the build (or a test timeout) kills it. +GIT_STALL_OPTIONS = ["-c", "http.lowSpeedLimit=1000", "-c", "http.lowSpeedTime=60"] + +# Written into a clone once the requested commit is checked out completely. +CLONE_STAMP = ".pti-clone-commit" + +def git(args, cwd): + return subprocess.call(["git"] + GIT_STALL_OPTIONS + args, cwd = cwd) == 0 + +def remove_tree(path): + def make_writable_and_retry(func, failed_path, exc_info): + os.chmod(failed_path, stat.S_IWRITE) # read-only git objects on Windows + func(failed_path) + if os.path.exists(path): + shutil.rmtree(path, onerror = make_writable_and_retry) + +def is_cloned(clone_path, commit): + try: + with open(os.path.join(clone_path, CLONE_STAMP)) as f: + return f.read().strip() == commit + except OSError: + return False def clone(url, commit, clone_path): - if (not os.path.exists(clone_path)): - subprocess.call(["git", "clone", url, clone_path]) - subprocess.call(["git", "checkout", commit], cwd = os.path.abspath(clone_path)) + # Several header scripts may clone the same repository into the same path + # (e.g. get_iga_headers.py and get_igc_headers.py) and run concurrently in a + # parallel build. Serialize them so nobody copies from a half-done clone. + with open(clone_path.rstrip(os.sep) + ".lock", "w") as lock: + lock_file(lock) + try: + if is_cloned(clone_path, commit): + return + # A clone without the stamp is incomplete (e.g. an interrupted build) or + # at another commit: start over. + remove_tree(clone_path) + + # Fetch into a temporary directory and move it into place only when + # complete. Try a shallow fetch of the commit first (fast), then fall + # back to a full clone. + tmp_path = clone_path.rstrip(os.sep) + ".partial" + remove_tree(tmp_path) + os.makedirs(tmp_path) + ok = (git(["init", "-q"], tmp_path) and + git(["fetch", "-q", "--depth", "1", url, commit], tmp_path) and + git(["checkout", "-q", "FETCH_HEAD"], tmp_path)) + if not ok: + remove_tree(tmp_path) + ok = (git(["clone", url, tmp_path], None) and + git(["checkout", commit], tmp_path)) + if not ok: + remove_tree(tmp_path) + raise RuntimeError("Failed to fetch " + url + " at " + commit + + " (check network and proxy settings)") + + with open(os.path.join(tmp_path, CLONE_STAMP), "w") as f: + f.write(commit + "\n") + os.rename(tmp_path, clone_path) + finally: + unlock_file(lock) def copy(src_path, dst_path, file_list): for file in file_list: diff --git a/build_utils/get_cl_headers.py b/build_utils/get_cl_headers.py index 6044ce0d..736ecbd2 100644 --- a/build_utils/get_cl_headers.py +++ b/build_utils/get_cl_headers.py @@ -4,7 +4,7 @@ import build_utils url = "https://github.com/KhronosGroup/OpenCL-Headers.git" -commit = "dcd5bede6859d26833cd85f0d6bbcee7382dc9b3" +commit = "6fe718c31a45fe25151362a72ef041c3a1047cbd" # v2026.05.29 def main(): if len(sys.argv) < 3: diff --git a/build_utils/get_compute_runtime_headers.py b/build_utils/get_compute_runtime_headers.py index e16f1111..20a9d9dd 100644 --- a/build_utils/get_compute_runtime_headers.py +++ b/build_utils/get_compute_runtime_headers.py @@ -4,7 +4,7 @@ import build_utils url = "https://github.com/intel/compute-runtime.git" -commit = "050536ff3b6f830199ec99cff8ffcac3d804c40a" # release 26.31.39395.14 +commit = "77d21ec752a6abd7f1b34c85decbff25766b64aa" # 26.44.40734.8 def postprocess(file_path): """Post-process header file: remove non-local tracing header includes. diff --git a/build_utils/get_gmm_headers.py b/build_utils/get_gmm_headers.py index 649a76e4..9cad33f6 100644 --- a/build_utils/get_gmm_headers.py +++ b/build_utils/get_gmm_headers.py @@ -4,7 +4,7 @@ import build_utils url = "https://github.com/intel/gmmlib.git" -commit = "9290546f493656d80a4aa05b63dfeaf9f8527b0a" +commit = "733c91a19baa65c40f4b1cf95a3991cc8c84d866" # intel-gmmlib-22.10.2 def main(): if len(sys.argv) < 3: diff --git a/build_utils/get_iga_headers.py b/build_utils/get_iga_headers.py index ade66891..ac6589e7 100644 --- a/build_utils/get_iga_headers.py +++ b/build_utils/get_iga_headers.py @@ -4,7 +4,7 @@ import build_utils url = "https://github.com/intel/intel-graphics-compiler.git" -commit = "d5bef0c991c41e03a567187eb78fe35b6c116847" +commit = "68759eeda7094ede9682fe61d647cf53efc3b6fd" # v2.43.9 def main(): if len(sys.argv) < 3: diff --git a/build_utils/get_igc_headers.py b/build_utils/get_igc_headers.py index 91a6ac71..ca48bbc9 100644 --- a/build_utils/get_igc_headers.py +++ b/build_utils/get_igc_headers.py @@ -4,7 +4,7 @@ import build_utils url = "https://github.com/intel/intel-graphics-compiler.git" -commit = "d5bef0c991c41e03a567187eb78fe35b6c116847" +commit = "68759eeda7094ede9682fe61d647cf53efc3b6fd" # v2.43.9 def main(): if len(sys.argv) < 3: diff --git a/build_utils/get_itt.py b/build_utils/get_itt.py index f9349a85..86e64bd1 100644 --- a/build_utils/get_itt.py +++ b/build_utils/get_itt.py @@ -4,7 +4,7 @@ import build_utils url = "https://github.com/intel/ittapi.git" -commit = "83d6ca4bb7df67dfacac7618bd7ef5f12735c8a7" +commit = "bd72cfb15e34a5fc4c0a8d10f5bb5305d60e1eec" # v3.28.4 def main(): if len(sys.argv) < 3: diff --git a/build_utils/get_md_headers.py b/build_utils/get_md_headers.py index 25830902..a10ce3fe 100644 --- a/build_utils/get_md_headers.py +++ b/build_utils/get_md_headers.py @@ -4,7 +4,7 @@ import build_utils url = "https://github.com/intel/metrics-discovery.git" -commit = "4ff8df044cbd9b270f2cf9561d1a60f826679f62" +commit = "1524a7a75f5847c23ea69e1974ec6c4245f53452" # metrics-discovery-1.14.182 def main(): if len(sys.argv) < 3: diff --git a/build_utils/get_ze_headers.py b/build_utils/get_ze_headers.py index 70029566..fd935afd 100644 --- a/build_utils/get_ze_headers.py +++ b/build_utils/get_ze_headers.py @@ -4,7 +4,7 @@ import build_utils url = "https://github.com/oneapi-src/level-zero.git" -default_commit = "a4afcb39ee265e595d3f0aa57b25b5e845fb494c" +default_commit = "b77ced661af97104f5cda03d49596274392f6aa4" # v1.29.0 def main(): if len(sys.argv) < 3: @@ -30,7 +30,7 @@ def main(): src_path = os.path.join(clone_path, "include") build_utils.copy(src_path, dst_path,\ - ["ze_api.h", "zes_api.h", "zet_api.h", "zer_api.h"]) + ["ze_api.h", "zes_api.h", "zet_api.h"]) if (not os.path.exists(os.path.join(dst_path, "layers"))): os.mkdir(os.path.join(dst_path, "layers")) diff --git a/cmake/packaging.cmake b/cmake/packaging.cmake index 7c8e895b..ab79d6c1 100644 --- a/cmake/packaging.cmake +++ b/cmake/packaging.cmake @@ -3,6 +3,12 @@ # # SPDX-License-Identifier: MIT # ============================================================= +# +# CPack configuration: one package per tool (TGZ, DEB, RPM on Linux; ZIP on +# Windows, untested). +# Expects PTI_GPU_ENABLED_TOOLS from the top-level CMakeLists.txt; each tool +# is installed as a component of the same name. + if(NOT PTI_PROJECT_LICENSE_FILE) if(EXISTS "${PROJECT_SOURCE_DIR}/LICENSE") set(PTI_PROJECT_LICENSE_FILE "${PROJECT_SOURCE_DIR}/LICENSE") @@ -18,22 +24,28 @@ include(ProcessorCount) ProcessorCount(NPROC) set(CPACK_THREADS ${NPROC}) -# TODO: Figure out whether this is desired or not. We have not stripped symbols -# in the past, so for now, this will be kept OFF. Note, leaving this ON is -# incompatible with CPACK_DEBIAN__DEBUGINFO_PACKAGE and -# CPACK_RPM__DEBUGINFO_PACKAGE. set(CPACK_STRIP_FILES OFF) +if(WIN32) + set(CPACK_GENERATOR "ZIP") +else() + set(CPACK_GENERATOR "TGZ;DEB") + find_program(PTI_GPU_RPMBUILD rpmbuild) + if(PTI_GPU_RPMBUILD) + list(APPEND CPACK_GENERATOR "RPM") + endif() +endif() + set(CPACK_PACKAGE_NAME "${PROJECT_NAME}") set(CPACK_PACKAGE_VERSION "${PROJECT_VERSION}") set(CPACK_PACKAGE_VERSION_MAJOR "${PROJECT_VERSION_MAJOR}") set(CPACK_PACKAGE_VERSION_MINOR "${PROJECT_VERSION_MINOR}") set(CPACK_PACKAGE_VERSION_PATCH "${PROJECT_VERSION_PATCH}") -set(CPACK_PACKAGE_VENDOR "Intel Corporation") -set(CPACK_PACKAGE_CONTACT "Intel Corporation ") +set(CPACK_PACKAGE_VENDOR "PTI-GPU fork maintainers") +set(CPACK_PACKAGE_CONTACT "${PROJECT_HOMEPAGE_URL}/issues") set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${PROJECT_DESCRIPTION}") set(CPACK_PACKAGE_DESCRIPTION - "${CPACK_PACKAGE_DESCRIPTION_SUMMARY}. Tools and libraries for Intel trace and profiling." + "${CPACK_PACKAGE_DESCRIPTION_SUMMARY}. Tracing and profiling tools for Intel GPUs." ) set(CPACK_PACKAGE_HOMEPAGE_URL "${PROJECT_HOMEPAGE_URL}") set(CPACK_PACKAGE_CHECKSUM SHA256) @@ -41,227 +53,63 @@ if(PTI_PROJECT_LICENSE_FILE) set(CPACK_RESOURCE_FILE_LICENSE "${PTI_PROJECT_LICENSE_FILE}") endif() set(CPACK_RESOURCE_FILE_README "${PROJECT_SOURCE_DIR}/README.md") -set(CPACK_RESOURCE_FILE_WELCOME "${CPACK_RESOURCE_FILE_README}") - -set(CPACK_COMPONENTS_GROUPING ONE_PER_GROUP) -# ################### Package Descriptions #################### -set(PTI_PKG_RUNTIME_DESCRIPTION - "PTI runtime libraries for collecting Intel GPU data") -set(PTI_PKG_DEVELOPMENT_DESCRIPTION - "PTI development files (headers, etc...) for building with PTI") -set(PTI_PKG_ONEAPI_DESCRIPTION - "PTI Intel(R) oneAPI integration files for oneAPI installation") -set(PTI_PKG_UNITRACE_GROUP_DESCRIPTION - "Intel(R) GPU Unitrace profiler tool for collecting Intel GPU data") -set(PTI_PKG_UNITRACE_SCRIPTS_GROUP_DESCRIPTION - "Intel(R) GPU Unitrace analysis scripts for analyzing data collected by Unitrace" -) - -# ################### DEBIAN CPack Configuration #################### +# One package per tool component. +set(CPACK_COMPONENTS_ALL ${PTI_GPU_ENABLED_TOOLS}) +set(CPACK_COMPONENTS_GROUPING IGNORE) +set(CPACK_ARCHIVE_COMPONENT_INSTALL ON) set(CPACK_DEB_COMPONENT_INSTALL ON) -set(CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS ON) -set(CPACK_DEBIAN_PACKAGE_NAME "${CPACK_PACKAGE_NAME}") -set(CPACK_DEBIAN_FILE_NAME DEB-DEFAULT) - -# pti-gpu-sdk -set(CPACK_DEBIAN_PTI_RUNTIME_GROUP_PACKAGE_NAME "${CPACK_PACKAGE_NAME}-sdk") -set(CPACK_DEBIAN_PTI_RUNTIME_GROUP_DEBUGINFO_PACKAGE ON) -set(CPACK_DEBIAN_PTI_RUNTIME_GROUP_DESCRIPTION "${PTI_PKG_RUNTIME_DESCRIPTION}") - -# pti-gpu-sdk-dev -set(CPACK_DEBIAN_PTI_DEVELOPMENT_GROUP_PACKAGE_NAME - "${CPACK_PACKAGE_NAME}-sdk-dev") -set(CPACK_DEBIAN_PTI_DEVELOPMENT_GROUP_PACKAGE_DEPENDS - "${CPACK_PACKAGE_NAME}-sdk (= ${CPACK_PACKAGE_VERSION})") -set(CPACK_DEBIAN_PTI_DEVELOPMENT_GROUP_DESCRIPTION - "${PTI_PKG_DEVELOPMENT_DESCRIPTION}") - -# pti-gpu-sdk-oneapi -set(CPACK_DEBIAN_PTI_ONEAPI_GROUP_PACKAGE_NAME - "${CPACK_PACKAGE_NAME}-sdk-oneapi") -set(CPACK_DEBIAN_PTI_ONEAPI_GROUP_PACKAGE_ARCHITECTURE "all") -set(CPACK_DEBIAN_PTI_ONEAPI_GROUP_PACKAGE_DEPENDS - "${CPACK_PACKAGE_NAME}-sdk (= ${CPACK_PACKAGE_VERSION})") -set(CPACK_DEBIAN_PTI_ONEAPI_GROUP_DESCRIPTION "${PTI_PKG_ONEAPI_DESCRIPTION}") - -# pti-gpu-unitrace -set(CPACK_DEBIAN_UNITRACE_GROUP_PACKAGE_NAME "${CPACK_PACKAGE_NAME}-unitrace") -set(CPACK_DEBIAN_UNITRACE_GROUP_DEBUGINFO_PACKAGE ON) -set(CPACK_DEBIAN_UNITRACE_GROUP_DESCRIPTION - "${PTI_PKG_UNITRACE_GROUP_DESCRIPTION}") - -# pti-gpu-unitrace-scripts -set(CPACK_DEBIAN_UNITRACE_SCRIPTS_GROUP_PACKAGE_NAME - "${CPACK_PACKAGE_NAME}-unitrace-scripts") -set(CPACK_DEBIAN_UNITRACE_SCRIPTS_GROUP_PACKAGE_ARCHITECTURE "all") -set(CPACK_DEBIAN_UNITRACE_SCRIPTS_GROUP_PACKAGE_DEPENDS - "${CPACK_PACKAGE_NAME}-unitrace (= ${CPACK_PACKAGE_VERSION}), python3 (>= 3.9)" -) -set(CPACK_DEBIAN_UNITRACE_SCRIPTS_GROUP_PACKAGE_RECOMMENDS - "python3-pandas, python3-matplotlib") -set(CPACK_DEBIAN_UNITRACE_SCRIPTS_GROUP_DESCRIPTION - "${PTI_PKG_UNITRACE_SCRIPTS_GROUP_DESCRIPTION}") - -# ################### RPM CPack Configuration #################### set(CPACK_RPM_COMPONENT_INSTALL ON) -set(CPACK_RPM_PACKAGE_NAME "${CPACK_PACKAGE_NAME}-sdk") + +# ################### Tool Descriptions #################### +set(PTI_PKG_cl_tracer_DESCRIPTION "OpenCL(TM) API and device activity tracer") +set(PTI_PKG_ze_tracer_DESCRIPTION + "oneAPI Level Zero API and device activity tracer") +set(PTI_PKG_onetrace_DESCRIPTION + "Host and device tracing tool for OpenCL(TM) and oneAPI Level Zero") +set(PTI_PKG_oneprof_DESCRIPTION "GPU HW metrics collection tool") +set(PTI_PKG_gpuinfo_DESCRIPTION "GPU device and metrics information tool") +set(PTI_PKG_instcount_DESCRIPTION + "GTPin-based GPU kernel instruction counting tool") +set(PTI_PKG_memaccess_DESCRIPTION "GTPin-based GPU memory access tracing tool") +set(PTI_PKG_sysmon_DESCRIPTION "GPU system monitoring tool") + +# ################### DEB / RPM Configuration #################### +set(CPACK_DEBIAN_FILE_NAME DEB-DEFAULT) set(CPACK_RPM_FILE_NAME RPM-DEFAULT) -set(CPACK_RPM_MAIN_COMPONENT Pti_Runtime_Group) set(CPACK_RPM_PACKAGE_LICENSE "${PTI_PROJECT_LICENSE_SPDX}") set(CPACK_RPM_PACKAGE_AUTOREQPROV ON) -set(CPACK_RPM_PTI_RUNTIME_GROUP_PACKAGE_SUMMARY - "Intel(R) Profiling Tools Interfaces libraries") -set(CPACK_RPM_PTI_RUNTIME_GROUP_PACKAGE_DESCRIPTION - "${PTI_PKG_RUNTIME_DESCRIPTION}") -set(CPACK_RPM_PTI_RUNTIME_GROUP_DEBUGINFO_PACKAGE ON) - -# pti-gpu-sdk-devel -set(CPACK_RPM_PTI_DEVELOPMENT_GROUP_PACKAGE_NAME - "${CPACK_PACKAGE_NAME}-sdk-devel") -set(CPACK_RPM_PTI_DEVELOPMENT_GROUP_PACKAGE_SUMMARY - "Intel(R) Profiling Tools Interfaces development files") -set(CPACK_RPM_PTI_DEVELOPMENT_GROUP_PACKAGE_DESCRIPTION - "${PTI_PKG_DEVELOPMENT_DESCRIPTION}") -set(CPACK_RPM_PTI_DEVELOPMENT_GROUP_PACKAGE_REQUIRES - "${CPACK_PACKAGE_NAME}-sdk = ${CPACK_PACKAGE_VERSION}") - -# pti-gpu-sdk-oneapi -set(CPACK_RPM_PTI_ONEAPI_GROUP_PACKAGE_NAME "${CPACK_PACKAGE_NAME}-sdk-oneapi") -set(CPACK_RPM_PTI_ONEAPI_GROUP_PACKAGE_ARCHITECTURE "noarch") -set(CPACK_RPM_PTI_ONEAPI_GROUP_PACKAGE_SUMMARY - "Intel(R) oneAPI files for Intel(R) Profiling Tools Interfaces") -set(CPACK_RPM_PTI_ONEAPI_GROUP_PACKAGE_DESCRIPTION - "${PTI_PKG_ONEAPI_DESCRIPTION}") -set(CPACK_RPM_PTI_ONEAPI_GROUP_PACKAGE_REQUIRES - "${CPACK_PACKAGE_NAME}-sdk = ${CPACK_PACKAGE_VERSION}") - -# pti-gpu-unitrace -set(CPACK_RPM_UNITRACE_GROUP_PACKAGE_NAME "${CPACK_PACKAGE_NAME}-unitrace") -set(CPACK_RPM_UNITRACE_GROUP_PACKAGE_SUMMARY - "Unitrace profiler for Intel(R) GPUs") -set(CPACK_RPM_UNITRACE_GROUP_PACKAGE_DESCRIPTION - "${PTI_PKG_UNITRACE_GROUP_DESCRIPTION}") -set(CPACK_RPM_UNITRACE_GROUP_DEBUGINFO_PACKAGE ON) - -# pti-gpu-unitrace-scripts -set(CPACK_RPM_UNITRACE_SCRIPTS_GROUP_PACKAGE_NAME - "${CPACK_PACKAGE_NAME}-unitrace-scripts") -set(CPACK_RPM_UNITRACE_SCRIPTS_GROUP_PACKAGE_ARCHITECTURE "noarch") -set(CPACK_RPM_UNITRACE_SCRIPTS_GROUP_PACKAGE_SUMMARY - "Analysis scripts for data collected by unitrace") -set(CPACK_RPM_UNITRACE_SCRIPTS_GROUP_PACKAGE_DESCRIPTION - "${PTI_PKG_UNITRACE_SCRIPTS_GROUP_DESCRIPTION}") -set(CPACK_RPM_UNITRACE_SCRIPTS_GROUP_PACKAGE_REQUIRES - "${CPACK_PACKAGE_NAME}-unitrace = ${CPACK_PACKAGE_VERSION}, python3 >= 3.9") +foreach(_tool IN LISTS PTI_GPU_ENABLED_TOOLS) + string(TOUPPER "${_tool}" _TOOL) + set(CPACK_DEBIAN_${_TOOL}_PACKAGE_NAME "${CPACK_PACKAGE_NAME}-${_tool}") + set(CPACK_DEBIAN_${_TOOL}_DESCRIPTION "${PTI_PKG_${_tool}_DESCRIPTION}") + set(CPACK_RPM_${_TOOL}_PACKAGE_NAME "${CPACK_PACKAGE_NAME}-${_tool}") + set(CPACK_RPM_${_TOOL}_PACKAGE_SUMMARY "${PTI_PKG_${_tool}_DESCRIPTION}") +endforeach() +# Hidden directories (.git, .github, editor and cache dirs, local-only dirs). set(CPACK_SOURCE_IGNORE_FILES - "/\\.git/" - "/\\.github/" - "/\\.vscode/" - "/\\.vs/" - "/\\.vim/" - "/\\.cache/" - "/\\.venv/" + "/\\.[^/]+/" "/venv/" "/build/" "/build-[^/]*/" - "/wbr/" - "/out/" - "/drop_raw/" - "/dist/" "/__pycache__/" "\\.swp$" "${PROJECT_BINARY_DIR}/") include(CPack) # After CPACK_* -# ################### Component Groups #################### -cpack_add_component_group( - Pti_Runtime_Group - DISPLAY_NAME "PTI Runtime" - DESCRIPTION "PTI Runtime Libraries for collecting Level Zero and SYCL data.") - -cpack_add_component_group( - Pti_Development_Group - DISPLAY_NAME "PTI Development" - DESCRIPTION "Files (headers, etc...) needed to build against PTI") - -cpack_add_component_group( - Pti_oneAPI_Group - DISPLAY_NAME "PTI oneAPI-specifics" - DESCRIPTION "oneAPI installation files") - -cpack_add_component_group( - Unitrace_Group - DISPLAY_NAME "Unitrace" - DESCRIPTION "Unitrace Tool Binaries") - -cpack_add_component_group( - Unitrace_Scripts_Group - DISPLAY_NAME "Unitrace Analysis Scripts" - DESCRIPTION "Scripts that analyze the data collected by unitrace") - # ################### Components #################### -cpack_add_component( - Pti_Runtime - DISPLAY_NAME "Libraries" - DESCRIPTION "Libraries needed at runtime" - GROUP Pti_Runtime_Group) - -cpack_add_component( - Pti_Doc - DISPLAY_NAME "Documentation" - DESCRIPTION "Documentation related files" - GROUP Pti_Runtime_Group - DEPENDS Pti_Runtime) - -cpack_add_component( - Pti_Development - DISPLAY_NAME "Development" - DESCRIPTION "Header files + configuration files" - GROUP Pti_Development_Group - DEPENDS Pti_Runtime) - -cpack_add_component( - Pti_oneAPI - DISPLAY_NAME "oneAPI-specifics" - DESCRIPTION "files related to oneAPI installation" - GROUP Pti_oneAPI_Group - DEPENDS Pti_Runtime) - -cpack_add_component( - Pti_Bom - DISPLAY_NAME "oneAPI Bill of Materials" - DESCRIPTION "Bill of materials generated for oneAPI drops" - GROUP Pti_oneAPI_Group - DEPENDS Pti_oneAPI - HIDDEN) - -cpack_add_component( - Unspecified - DISPLAY_NAME "Unspecified" - DESCRIPTION "Files installed without an explicit component" - GROUP Pti_oneAPI_Group - HIDDEN) - -cpack_add_component( - Unitrace_Runtime - DISPLAY_NAME "Unitrace Binaries" - DESCRIPTION "Unitrace tool and runtime" - GROUP Unitrace_Group) - -cpack_add_component( - Unitrace_Config - DISPLAY_NAME "Unitrace Configuration Files" - DESCRIPTION "Unitrace configuration files" - GROUP Unitrace_Group - DEPENDS Unitrace_Runtime) - -cpack_add_component( - Unitrace_Scripts - DISPLAY_NAME "Unitrace Analysis Scripts" - DESCRIPTION "Unitrace scripts for analysis of collected data" - GROUP Unitrace_Scripts_Group - DEPENDS Unitrace_Runtime) +cpack_add_component_group( + Tools + DISPLAY_NAME "PTI-GPU Tools" + DESCRIPTION "Tracing and profiling tools for Intel GPUs") + +foreach(_tool IN LISTS PTI_GPU_ENABLED_TOOLS) + cpack_add_component( + ${_tool} + DISPLAY_NAME "${_tool}" + DESCRIPTION "${PTI_PKG_${_tool}_DESCRIPTION}" + GROUP Tools) +endforeach() diff --git a/samples/cl_debug_info/README.md b/samples/cl_debug_info/README.md index bbb26e79..d0c1ae7b 100644 --- a/samples/cl_debug_info/README.md +++ b/samples/cl_debug_info/README.md @@ -84,7 +84,7 @@ As a result, listing like the following will be printed for each kernel (once pe - Windows ## Prerequisites -- [CMake](https://cmake.org/) (version 3.12 and above) +- [CMake](https://cmake.org/) (version 3.22 and above) - [Git](https://git-scm.com/) (version 1.8 and above) - [Python](https://www.python.org/) (version 2.7 and above) - [OpenCL(TM) ICD Loader](https://github.com/KhronosGroup/OpenCL-ICD-Loader) diff --git a/samples/cl_gemm/README.md b/samples/cl_gemm/README.md index d3399ace..4cf1f997 100644 --- a/samples/cl_gemm/README.md +++ b/samples/cl_gemm/README.md @@ -19,7 +19,7 @@ Total execution time: 0.739879 sec - Windows ## Prerequisites -- [CMake](https://cmake.org/) (version 3.12 and above) +- [CMake](https://cmake.org/) (version 3.22 and above) - [Git](https://git-scm.com/) (version 1.8 and above) - [Python](https://www.python.org/) (version 2.7 and above) - [OpenCL(TM) ICD Loader](https://github.com/KhronosGroup/OpenCL-ICD-Loader) diff --git a/samples/cl_gemm_inst/README.md b/samples/cl_gemm_inst/README.md index f5011d7e..a07744ce 100644 --- a/samples/cl_gemm_inst/README.md +++ b/samples/cl_gemm_inst/README.md @@ -30,7 +30,7 @@ Estimated total number of HW threads: 336 - Windows ## Prerequisites -- [CMake](https://cmake.org/) (version 3.12 and above) +- [CMake](https://cmake.org/) (version 3.22 and above) - [Git](https://git-scm.com/) (version 1.8 and above) - [Python](https://www.python.org/) (version 2.7 and above) - [OpenCL(TM) ICD Loader](https://github.com/KhronosGroup/OpenCL-ICD-Loader) diff --git a/samples/cl_gemm_itt/README.md b/samples/cl_gemm_itt/README.md index b9ac38be..696716bb 100644 --- a/samples/cl_gemm_itt/README.md +++ b/samples/cl_gemm_itt/README.md @@ -19,7 +19,7 @@ Total execution time: 0.739879 sec - Windows ## Prerequisites -- [CMake](https://cmake.org/) (version 3.12 and above) +- [CMake](https://cmake.org/) (version 3.22 and above) - [Git](https://git-scm.com/) (version 1.8 and above) - [Python](https://www.python.org/) (version 2.7 and above) - [OpenCL(TM) ICD Loader](https://github.com/KhronosGroup/OpenCL-ICD-Loader) diff --git a/samples/cl_gpu_metrics/README.md b/samples/cl_gpu_metrics/README.md index b7adee0a..e8ac1b9f 100644 --- a/samples/cl_gpu_metrics/README.md +++ b/samples/cl_gpu_metrics/README.md @@ -19,7 +19,7 @@ To set target device and sub-device to collect metrics from one can specify `PTI - Windows ## Prerequisites -- [CMake](https://cmake.org/) (version 3.12 and above) +- [CMake](https://cmake.org/) (version 3.22 and above) - [Git](https://git-scm.com/) (version 1.8 and above) - [Python](https://www.python.org/) (version 2.7 and above) - [OpenCL(TM) ICD Loader](https://github.com/KhronosGroup/OpenCL-ICD-Loader) diff --git a/samples/cl_gpu_query/README.md b/samples/cl_gpu_query/README.md index 9aae3e7b..4d6735de 100644 --- a/samples/cl_gpu_query/README.md +++ b/samples/cl_gpu_query/README.md @@ -19,7 +19,7 @@ To set target device and sub-device to collect metrics from one can specify `PTI - Windows ## Prerequisites -- [CMake](https://cmake.org/) (version 3.12 and above) +- [CMake](https://cmake.org/) (version 3.22 and above) - [Git](https://git-scm.com/) (version 1.8 and above) - [Python](https://www.python.org/) (version 2.7 and above) - [OpenCL(TM) ICD Loader](https://github.com/KhronosGroup/OpenCL-ICD-Loader) diff --git a/samples/cl_hot_functions/README.md b/samples/cl_hot_functions/README.md index 0b3b6d07..636dcdd8 100644 --- a/samples/cl_hot_functions/README.md +++ b/samples/cl_hot_functions/README.md @@ -44,7 +44,7 @@ clCreateCommandQueueWithProperties, 1, 1388, 0.00, - Windows ## Prerequisites -- [CMake](https://cmake.org/) (version 3.12 and above) +- [CMake](https://cmake.org/) (version 3.22 and above) - [Git](https://git-scm.com/) (version 1.8 and above) - [Python](https://www.python.org/) (version 2.7 and above) - [OpenCL(TM) ICD Loader](https://github.com/KhronosGroup/OpenCL-ICD-Loader) diff --git a/samples/cl_hot_kernels/README.md b/samples/cl_hot_kernels/README.md index 0e604568..2167ddc7 100644 --- a/samples/cl_hot_kernels/README.md +++ b/samples/cl_hot_kernels/README.md @@ -20,7 +20,7 @@ Total Device Time for GPU (ns): 174828332 - Windows ## Prerequisites -- [CMake](https://cmake.org/) (version 3.12 and above) +- [CMake](https://cmake.org/) (version 3.22 and above) - [Git](https://git-scm.com/) (version 1.8 and above) - [Python](https://www.python.org/) (version 2.7 and above) - [OpenCL(TM) ICD Loader](https://github.com/KhronosGroup/OpenCL-ICD-Loader) diff --git a/samples/dpc_gemm/CMakeLists.txt b/samples/dpc_gemm/CMakeLists.txt index f0a223c0..c7f25e22 100644 --- a/samples/dpc_gemm/CMakeLists.txt +++ b/samples/dpc_gemm/CMakeLists.txt @@ -14,10 +14,12 @@ SetBuildType() add_executable(dpc_gemm main.cc) -target_compile_options(dpc_gemm PUBLIC -fsycl -gline-tables-only) +# -g rather than -gline-tables-only: icpx ignores the latter for the SPIR-V +# device target, and ze_debug_info needs device line info for source mapping. +target_compile_options(dpc_gemm PUBLIC -fsycl -g) # target_link_options CMake >= 3.13 -set_target_properties(dpc_gemm PROPERTIES LINK_FLAGS "-fsycl -gline-tables-only") +set_target_properties(dpc_gemm PROPERTIES LINK_FLAGS "-fsycl -g") target_include_directories(dpc_gemm PRIVATE "${PROJECT_SOURCE_DIR}/../../utils") diff --git a/samples/dpc_gemm/README.md b/samples/dpc_gemm/README.md index 7ac5f3ea..32186324 100644 --- a/samples/dpc_gemm/README.md +++ b/samples/dpc_gemm/README.md @@ -19,7 +19,7 @@ Total execution time: 0.373728 sec - Windows ## Prerequisites -- [CMake](https://cmake.org/) (version 3.12 and above) +- [CMake](https://cmake.org/) (version 3.22 and above) - [Git](https://git-scm.com/) (version 1.8 and above) - [Python](https://www.python.org/) (version 2.7 and above) - [Intel(R) oneAPI Base Toolkit](https://software.intel.com/content/www/us/en/develop/tools/oneapi/base-toolkit.html) @@ -37,7 +37,7 @@ make ``` Use this command line to run the application: ```sh -./dpc_gemm [cpu|gpu|host] [matrix_size] [repeat_count] +./dpc_gemm [cpu|gpu] [matrix_size] [repeat_count] ``` ### Windows Use Microsoft* Visual Studio x64 command prompt to run the following commands and build the sample (make sure you have oneAPI DPC++ Compiler in `PATH` for building): @@ -52,5 +52,5 @@ cmake --build . --config Release Use this command line to run the application: ```sh cd Release -dpc_gemm.exe [cpu|gpu|host] [matrix_size] [repeats_count] +dpc_gemm.exe [cpu|gpu] [matrix_size] [repeats_count] ``` \ No newline at end of file diff --git a/samples/dpc_gemm/main.cc b/samples/dpc_gemm/main.cc index 828a0fa4..fc45e5bb 100644 --- a/samples/dpc_gemm/main.cc +++ b/samples/dpc_gemm/main.cc @@ -110,8 +110,6 @@ int main(int argc, char* argv[]) { dev = sycl::device(sycl::gpu_selector_v); if (argc > 1 && strcmp(argv[1], "cpu") == 0) { dev = sycl::device(sycl::cpu_selector_v); - } else if (argc > 1 && strcmp(argv[1], "host") == 0) { - dev = sycl::device(sycl::default_selector_v); } } catch (const sycl::exception& e) { std::cerr << "Error: Exception caught while executing SYCL " << e.what() << '\n'; diff --git a/samples/dpc_info/README.md b/samples/dpc_info/README.md index 493e615a..0e20fbb2 100644 --- a/samples/dpc_info/README.md +++ b/samples/dpc_info/README.md @@ -45,7 +45,7 @@ The following modes are implemented: - Windows ## Prerequisites -- [CMake](https://cmake.org/) (version 3.12 and above) +- [CMake](https://cmake.org/) (version 3.22 and above) - [Git](https://git-scm.com/) (version 1.8 and above) - [Python](https://www.python.org/) (version 2.7 and above) - [Intel(R) oneAPI Base Toolkit](https://software.intel.com/content/www/us/en/develop/tools/oneapi/base-toolkit.html) diff --git a/samples/dpc_info/main.cc b/samples/dpc_info/main.cc index 4f59a573..7b6c63b4 100644 --- a/samples/dpc_info/main.cc +++ b/samples/dpc_info/main.cc @@ -5,6 +5,13 @@ #include +// Some descriptors printed below are deprecated in SYCL 2020 and have no +// drop-in replacement. Keep printing them, but silence the deprecation warning. +#define PTI_SYCL_DEPRECATED_BEGIN \ + _Pragma("clang diagnostic push") \ + _Pragma("clang diagnostic ignored \"-Wdeprecated-declarations\"") +#define PTI_SYCL_DEPRECATED_END _Pragma("clang diagnostic pop") + #define TAB std::string(" ") #define TEXT_WIDTH 50 @@ -99,8 +106,10 @@ int main(int argc, char* argv[]) { std::cout << std::setw(TEXT_WIDTH) << std::left << TAB + "Platform Vendor " << vendor << std::endl; + PTI_SYCL_DEPRECATED_BEGIN std::string profile = platform.get_info(); + PTI_SYCL_DEPRECATED_END std::cout << std::setw(TEXT_WIDTH) << std::left << TAB + "Platform Profile " << profile << std::endl; } @@ -250,11 +259,18 @@ int main(int argc, char* argv[]) { // TODO(matthew.schilling@intel.com): Deprecated, however, I do not // know a drop-in replacement. // https://registry.khronos.org/SYCL/specs/sycl-2020/html/sycl-2020.html#_device_information_descriptors - bool preferred_interop_user_sync = - device.get_info(); + // Only the OpenCL backend supports this query; others throw. std::cout << std::setw(TEXT_WIDTH) << std::left << - TAB + "Prefer user sync for interop " << - (is_compiler_avilable ? "Yes" : "No") << std::endl; + TAB + "Prefer user sync for interop "; + if (device.get_backend() == sycl::backend::opencl) { + PTI_SYCL_DEPRECATED_BEGIN + bool preferred_interop_user_sync = + device.get_info(); + PTI_SYCL_DEPRECATED_END + std::cout << (preferred_interop_user_sync ? "Yes" : "No") << std::endl; + } else { + std::cout << "N/A" << std::endl; + } size_t profiling_timer_resolution = device.get_info(); @@ -265,8 +281,10 @@ int main(int argc, char* argv[]) { // TODO(matthew.schilling@intel.com): Deprecated, however, I do not // know a drop-in replacement. // https://registry.khronos.org/SYCL/specs/sycl-2020/html/sycl-2020.html#_device_information_descriptors + PTI_SYCL_DEPRECATED_BEGIN size_t printf_buffer_size = device.get_info(); + PTI_SYCL_DEPRECATED_END std::cout << std::setw(TEXT_WIDTH) << std::left << TAB + "printf() buffer size" << printf_buffer_size << " (" << ConvertBytesToString(printf_buffer_size) << ")" << std::endl; @@ -284,8 +302,10 @@ int main(int argc, char* argv[]) { // suggested replacement is not 1-for-1. I added the implementation // using aspects below. Keeping this for now. // https://registry.khronos.org/SYCL/specs/sycl-2020/html/sycl-2020.html#_device_information_descriptors + PTI_SYCL_DEPRECATED_BEGIN std::vector device_extensions = device.get_info(); + PTI_SYCL_DEPRECATED_END std::cout << std::setw(TEXT_WIDTH) << std::left << TAB + "Device Extensions "; for (const auto& device_extension : device_extensions) { diff --git a/samples/gpu_perfmon_set/README.md b/samples/gpu_perfmon_set/README.md index 16219328..83364ee2 100644 --- a/samples/gpu_perfmon_set/README.md +++ b/samples/gpu_perfmon_set/README.md @@ -18,7 +18,7 @@ To read the collected values for the event one should use binary instrumentation - Linux ## Prerequisites -- [CMake](https://cmake.org/) (version 3.12 and above) +- [CMake](https://cmake.org/) (version 3.22 and above) - [Git](https://git-scm.com/) (version 1.8 and above) - [Python](https://www.python.org/) (version 2.7 and above) - [libdrm](https://gitlab.freedesktop.org/mesa/drm) diff --git a/samples/omp_gemm/README.md b/samples/omp_gemm/README.md index 636d5ee2..1979246d 100644 --- a/samples/omp_gemm/README.md +++ b/samples/omp_gemm/README.md @@ -19,7 +19,7 @@ Total execution time: 5.37699 sec - Windows (*under development*) ## Prerequisites -- [CMake](https://cmake.org/) (version 3.12 and above) +- [CMake](https://cmake.org/) (version 3.22 and above) - [Git](https://git-scm.com/) (version 1.8 and above) - [Python](https://www.python.org/) (version 2.7 and above) - [Intel(R) oneAPI Base Toolkit](https://software.intel.com/content/www/us/en/develop/tools/oneapi/base-toolkit.html) diff --git a/samples/omp_hot_regions/README.md b/samples/omp_hot_regions/README.md index 7cd6d531..3b99fabd 100644 --- a/samples/omp_hot_regions/README.md +++ b/samples/omp_hot_regions/README.md @@ -19,7 +19,7 @@ Total Region Time (ns): 186811670 - Windows (*under development*) ## Prerequisites -- [CMake](https://cmake.org/) (version 3.12 and above) +- [CMake](https://cmake.org/) (version 3.22 and above) - [Git](https://git-scm.com/) (version 1.8 and above) - [Python](https://www.python.org/) (version 2.7 and above) - [Intel(R) oneAPI Base Toolkit](https://software.intel.com/content/www/us/en/develop/tools/oneapi/base-toolkit.html) diff --git a/samples/omp_hot_regions/tool.cc b/samples/omp_hot_regions/tool.cc index afa1719e..b46e4318 100644 --- a/samples/omp_hot_regions/tool.cc +++ b/samples/omp_hot_regions/tool.cc @@ -177,6 +177,9 @@ static void Finalize(ompt_data_t* data) { // Internal Tool Interface //////////////////////////////////////////////////// +// Must be exported: the library is built with -fvisibility=hidden, and the +// OpenMP runtime looks this symbol up with dlsym(). +extern "C" PTI_EXPORT ompt_start_tool_result_t* ompt_start_tool( unsigned int omp_version, const char* runtime_version) { std::cerr << "[INFO] OMP Runtime Version: " << runtime_version << std::endl; diff --git a/samples/ze_debug_info/README.md b/samples/ze_debug_info/README.md index 48f743cc..3f420a98 100644 --- a/samples/ze_debug_info/README.md +++ b/samples/ze_debug_info/README.md @@ -91,7 +91,7 @@ As a result, listing like the following will be printed for each kernel (once pe - Windows (*under development*) ## Prerequisites -- [CMake](https://cmake.org/) (version 3.12 and above) +- [CMake](https://cmake.org/) (version 3.22 and above) - [Git](https://git-scm.com/) (version 1.8 and above) - [Python](https://www.python.org/) (version 2.7 and above) - [oneAPI Level Zero loader](https://github.com/oneapi-src/level-zero) diff --git a/samples/ze_debug_info/tool.cc b/samples/ze_debug_info/tool.cc index e64f64b3..f25d2222 100644 --- a/samples/ze_debug_info/tool.cc +++ b/samples/ze_debug_info/tool.cc @@ -38,7 +38,7 @@ static void PrintResults() { void EnableProfiling() { ze_result_t status = ZE_RESULT_SUCCESS; - status = zeInit(ZE_INIT_FLAG_GPU_ONLY); + status = utils::ze::InitGpuDrivers(); PTI_ASSERT(status == ZE_RESULT_SUCCESS); collector = ZeDebugInfoCollector::Create(); } diff --git a/samples/ze_gemm/README.md b/samples/ze_gemm/README.md index fd0e056a..ed8241a9 100644 --- a/samples/ze_gemm/README.md +++ b/samples/ze_gemm/README.md @@ -21,7 +21,7 @@ To run application on target device and sub-device one can specify `PTI_DEVICE_I - Windows (*under development*) ## Prerequisites -- [CMake](https://cmake.org/) (version 3.12 and above) +- [CMake](https://cmake.org/) (version 3.22 and above) - [Git](https://git-scm.com/) (version 1.8 and above) - [Python](https://www.python.org/) (version 2.7 and above) - [oneAPI Level Zero loader](https://github.com/oneapi-src/level-zero) diff --git a/samples/ze_gemm/main.cc b/samples/ze_gemm/main.cc index d8838682..7fcb59d7 100644 --- a/samples/ze_gemm/main.cc +++ b/samples/ze_gemm/main.cc @@ -251,7 +251,7 @@ static void Compute(ze_device_handle_t device, int main(int argc, char* argv[]) { ze_result_t status = ZE_RESULT_SUCCESS; - status = zeInit(ZE_INIT_FLAG_GPU_ONLY); + status = utils::ze::InitGpuDrivers(); PTI_ASSERT(status == ZE_RESULT_SUCCESS); ze_device_handle_t device = utils::ze::GetGpuDevice(); diff --git a/samples/ze_hot_functions/README.md b/samples/ze_hot_functions/README.md index 9a0e4cbe..a6ed20fa 100644 --- a/samples/ze_hot_functions/README.md +++ b/samples/ze_hot_functions/README.md @@ -44,7 +44,7 @@ zeCommandQueueExecuteCommandLists, 4, 89169473, 20.72, - Windows (*under development*) ## Prerequisites -- [CMake](https://cmake.org/) (version 3.12 and above) +- [CMake](https://cmake.org/) (version 3.22 and above) - [Git](https://git-scm.com/) (version 1.8 and above) - [Python](https://www.python.org/) (version 2.7 and above) - [oneAPI Level Zero loader](https://github.com/oneapi-src/level-zero) diff --git a/samples/ze_hot_functions/tool.cc b/samples/ze_hot_functions/tool.cc index b96944d6..8cc93847 100644 --- a/samples/ze_hot_functions/tool.cc +++ b/samples/ze_hot_functions/tool.cc @@ -64,7 +64,7 @@ static void PrintResults() { void EnableProfiling() { ze_result_t status = ZE_RESULT_SUCCESS; - status = zeInit(ZE_INIT_FLAG_GPU_ONLY); + status = utils::ze::InitGpuDrivers(); PTI_ASSERT(status == ZE_RESULT_SUCCESS); collector = ZeApiCollector::Create(); diff --git a/samples/ze_hot_kernels/README.md b/samples/ze_hot_kernels/README.md index ae5d9d21..331e9e50 100644 --- a/samples/ze_hot_kernels/README.md +++ b/samples/ze_hot_kernels/README.md @@ -17,7 +17,7 @@ Total Device Time (ns): 172440915 - Windows (*under development*) ## Prerequisites -- [CMake](https://cmake.org/) (version 3.12 and above) +- [CMake](https://cmake.org/) (version 3.22 and above) - [Git](https://git-scm.com/) (version 1.8 and above) - [Python](https://www.python.org/) (version 2.7 and above) - [oneAPI Level Zero loader](https://github.com/oneapi-src/level-zero) diff --git a/samples/ze_hot_kernels/tool.cc b/samples/ze_hot_kernels/tool.cc index 5a33467d..1b3d5307 100644 --- a/samples/ze_hot_kernels/tool.cc +++ b/samples/ze_hot_kernels/tool.cc @@ -68,7 +68,7 @@ static void PrintResults() { void EnableProfiling() { ze_result_t status = ZE_RESULT_SUCCESS; - status = zeInit(ZE_INIT_FLAG_GPU_ONLY); + status = utils::ze::InitGpuDrivers(); PTI_ASSERT(status == ZE_RESULT_SUCCESS); collector = ZeKernelCollector::Create(); diff --git a/samples/ze_hot_kernels/ze_kernel_collector.h b/samples/ze_hot_kernels/ze_kernel_collector.h index 1b1ba7c5..857d58b4 100644 --- a/samples/ze_hot_kernels/ze_kernel_collector.h +++ b/samples/ze_hot_kernels/ze_kernel_collector.h @@ -149,6 +149,11 @@ class ZeKernelCollector { ze_result_t status = ZE_RESULT_SUCCESS; status = zelTracerSetEnabled(tracer_, false); PTI_ASSERT(status == ZE_RESULT_SUCCESS); + + // Applications that only use synchronous immediate command lists (e.g. + // the OpenMP offload runtime) never synchronize or destroy events, so + // collect the kernels that have completed but are still pending. + ProcessCalls(); } const ZeKernelInfoMap& GetKernelInfoMap() const { diff --git a/samples/ze_info/README.md b/samples/ze_info/README.md index 644e46d2..0f22a13c 100644 --- a/samples/ze_info/README.md +++ b/samples/ze_info/README.md @@ -37,7 +37,7 @@ This sample application provides information on all platforms and devices availa - Windows (*under development*) ## Prerequisites -- [CMake](https://cmake.org/) (version 3.12 and above) +- [CMake](https://cmake.org/) (version 3.22 and above) - [Git](https://git-scm.com/) (version 1.8 and above) - [Python](https://www.python.org/) (version 2.7 and above) - [oneAPI Level Zero loader](https://github.com/oneapi-src/level-zero) diff --git a/samples/ze_info/main.cc b/samples/ze_info/main.cc index 547a8376..42146864 100644 --- a/samples/ze_info/main.cc +++ b/samples/ze_info/main.cc @@ -378,7 +378,7 @@ int main(int argc, char *argv[]) { } ze_result_t status = ZE_RESULT_SUCCESS; - status = zeInit(ZE_INIT_FLAG_GPU_ONLY); + status = utils::ze::InitGpuDrivers(); PTI_ASSERT(status == ZE_RESULT_SUCCESS); if (list_mode) { diff --git a/samples/ze_metric_info/CMakeLists.txt b/samples/ze_metric_info/CMakeLists.txt index ce32531a..a4821aa8 100644 --- a/samples/ze_metric_info/CMakeLists.txt +++ b/samples/ze_metric_info/CMakeLists.txt @@ -17,6 +17,7 @@ endif() FindL0Library(ze_metric_info) FindL0Headers(ze_metric_info) +GetMDHeaders(ze_metric_info) CheckForMDLibrary(ze_metric_info) CheckForMetricsLibrary() diff --git a/samples/ze_metric_info/README.md b/samples/ze_metric_info/README.md index 43c66af7..10c0ed4a 100644 --- a/samples/ze_metric_info/README.md +++ b/samples/ze_metric_info/README.md @@ -27,7 +27,7 @@ To set target device and sub-device to collect metric info from one can specify - Windows (*under development*) ## Prerequisites -- [CMake](https://cmake.org/) (version 3.12 and above) +- [CMake](https://cmake.org/) (version 3.22 and above) - [Git](https://git-scm.com/) (version 1.8 and above) - [Python](https://www.python.org/) (version 2.7 and above) - [oneAPI Level Zero loader](https://github.com/oneapi-src/level-zero) diff --git a/samples/ze_metric_info/main.cc b/samples/ze_metric_info/main.cc index b8b7756e..e99f9a7e 100644 --- a/samples/ze_metric_info/main.cc +++ b/samples/ze_metric_info/main.cc @@ -78,7 +78,7 @@ int main(int argc, char* argv[]) { utils::SetEnv("ZET_ENABLE_METRICS", "1"); ze_result_t status = ZE_RESULT_SUCCESS; - status = zeInit(ZE_INIT_FLAG_GPU_ONLY); + status = utils::ze::InitGpuDrivers(); PTI_ASSERT(status == ZE_RESULT_SUCCESS); ze_device_handle_t device = utils::ze::GetGpuDevice(); diff --git a/samples/ze_metric_query/CMakeLists.txt b/samples/ze_metric_query/CMakeLists.txt index 8a780509..098eedfb 100644 --- a/samples/ze_metric_query/CMakeLists.txt +++ b/samples/ze_metric_query/CMakeLists.txt @@ -19,6 +19,7 @@ endif() FindL0Library(zet_metric_query) FindL0Headers(zet_metric_query) +GetMDHeaders(zet_metric_query) CheckForMDLibrary(zet_metric_query) CheckForMetricsLibrary() diff --git a/samples/ze_metric_query/README.md b/samples/ze_metric_query/README.md index ecd689e1..6382b532 100644 --- a/samples/ze_metric_query/README.md +++ b/samples/ze_metric_query/README.md @@ -19,7 +19,7 @@ To set target device and sub-device to collect metrics from one can specify `PTI - Windows (*under development*) ## Prerequisites -- [CMake](https://cmake.org/) (version 3.12 and above) +- [CMake](https://cmake.org/) (version 3.22 and above) - [Git](https://git-scm.com/) (version 1.8 and above) - [Python](https://www.python.org/) (version 2.7 and above) - [oneAPI Level Zero loader](https://github.com/oneapi-src/level-zero) diff --git a/samples/ze_metric_query/tool.cc b/samples/ze_metric_query/tool.cc index 7746a30e..ea9bee48 100644 --- a/samples/ze_metric_query/tool.cc +++ b/samples/ze_metric_query/tool.cc @@ -186,7 +186,7 @@ static void PrintResults() { void EnableProfiling() { ze_result_t status = ZE_RESULT_SUCCESS; - status = zeInit(ZE_INIT_FLAG_GPU_ONLY); + status = utils::ze::InitGpuDrivers(); PTI_ASSERT(status == ZE_RESULT_SUCCESS); ze_driver_handle_t driver = utils::ze::GetGpuDriver(); diff --git a/samples/ze_metric_streamer/CMakeLists.txt b/samples/ze_metric_streamer/CMakeLists.txt index d6905c27..c48b49df 100644 --- a/samples/ze_metric_streamer/CMakeLists.txt +++ b/samples/ze_metric_streamer/CMakeLists.txt @@ -27,6 +27,7 @@ endif() FindL0Library(zet_metric_streamer) FindL0Headers(zet_metric_streamer) +GetMDHeaders(zet_metric_streamer) CheckForMDLibrary(zet_metric_streamer) CheckForMetricsLibrary() diff --git a/samples/ze_metric_streamer/README.md b/samples/ze_metric_streamer/README.md index 176ea1c9..8ad93725 100644 --- a/samples/ze_metric_streamer/README.md +++ b/samples/ze_metric_streamer/README.md @@ -22,7 +22,7 @@ To set target device and sub-device to collect metrics from one can specify `PTI - Windows (*under development*) ## Prerequisites -- [CMake](https://cmake.org/) (version 3.12 and above) +- [CMake](https://cmake.org/) (version 3.22 and above) - [Git](https://git-scm.com/) (version 1.8 and above) - [Python](https://www.python.org/) (version 2.7 and above) - [oneAPI Level Zero loader](https://github.com/oneapi-src/level-zero) diff --git a/samples/ze_metric_streamer/tool.cc b/samples/ze_metric_streamer/tool.cc index 6e0e7efa..4bf0802a 100644 --- a/samples/ze_metric_streamer/tool.cc +++ b/samples/ze_metric_streamer/tool.cc @@ -222,7 +222,7 @@ static void PrintResults() { void EnableProfiling() { ze_result_t status = ZE_RESULT_SUCCESS; - status = zeInit(ZE_INIT_FLAG_GPU_ONLY); + status = utils::ze::InitGpuDrivers(); PTI_ASSERT(status == ZE_RESULT_SUCCESS); ze_driver_handle_t driver = utils::ze::GetGpuDriver(); diff --git a/samples/ze_sysman/README.md b/samples/ze_sysman/README.md index 89b569f6..bcec2d18 100644 --- a/samples/ze_sysman/README.md +++ b/samples/ze_sysman/README.md @@ -20,7 +20,7 @@ Device: Intel(R) Iris(R) Plus Graphics 655 [0x3ea5] - Windows (*under development*) ## Prerequisites -- [CMake](https://cmake.org/) (version 3.12 and above) +- [CMake](https://cmake.org/) (version 3.22 and above) - [Git](https://git-scm.com/) (version 1.8 and above) - [Python](https://www.python.org/) (version 2.7 and above) - [oneAPI Level Zero loader](https://github.com/oneapi-src/level-zero) diff --git a/samples/ze_sysman/main.cc b/samples/ze_sysman/main.cc index 63b73888..e76f7aff 100644 --- a/samples/ze_sysman/main.cc +++ b/samples/ze_sysman/main.cc @@ -1,5 +1,6 @@ #include #include +#include #include #ifdef __linux__ @@ -16,14 +17,65 @@ #define BYTES_IN_MB (1024 * 1024) -int main() { - utils::SetEnv("ZES_ENABLE_SYSMAN", "1"); +// Returns the GPU selected by PTI_DEVICE_ID (default 0) using Sysman handles +// obtained after zesInit(). +static zes_device_handle_t GetSysmanGpuDevice() { + std::vector gpu_list; - ze_result_t status = ZE_RESULT_SUCCESS; - status = zeInit(ZE_INIT_FLAG_GPU_ONLY); + uint32_t driver_count = 0; + ze_result_t status = zesDriverGet(&driver_count, nullptr); + if (status != ZE_RESULT_SUCCESS || driver_count == 0) { + return nullptr; + } + std::vector driver_list(driver_count); + status = zesDriverGet(&driver_count, driver_list.data()); PTI_ASSERT(status == ZE_RESULT_SUCCESS); - ze_device_handle_t device = utils::ze::GetGpuDevice(); + for (auto driver : driver_list) { + uint32_t device_count = 0; + status = zesDeviceGet(driver, &device_count, nullptr); + if (status != ZE_RESULT_SUCCESS || device_count == 0) { + continue; + } + std::vector device_list(device_count); + status = zesDeviceGet(driver, &device_count, device_list.data()); + PTI_ASSERT(status == ZE_RESULT_SUCCESS); + + for (auto device : device_list) { + zes_device_properties_t props{ZES_STRUCTURE_TYPE_DEVICE_PROPERTIES, }; + status = zesDeviceGetProperties(device, &props); + PTI_ASSERT(status == ZE_RESULT_SUCCESS); + if (props.core.type == ZE_DEVICE_TYPE_GPU) { + gpu_list.push_back(device); + } + } + } + + if (gpu_list.empty()) { + return nullptr; + } + + std::string value = utils::GetEnv("PTI_DEVICE_ID"); + uint32_t device_id = value.empty() ? 0 : std::stoul(value); + PTI_ASSERT(device_id < gpu_list.size()); + return gpu_list[device_id]; +} + +int main() { + zes_device_handle_t device = nullptr; + + ze_result_t status = zesInit(0); + if (status == ZE_RESULT_SUCCESS) { + device = GetSysmanGpuDevice(); + } else { + // Older loader or driver without zesInit(): use the legacy mode, where + // Level Zero core device handles are also valid Sysman handles. + utils::SetEnv("ZES_ENABLE_SYSMAN", "1"); + status = zeInit(ZE_INIT_FLAG_GPU_ONLY); + PTI_ASSERT(status == ZE_RESULT_SUCCESS); + device = utils::ze::GetGpuDevice(); + } + if (device == nullptr) { std::cout << "[WARNING] GPU device was not found" << std::endl; return 0; diff --git a/sdk/.editorconfig b/sdk/.editorconfig deleted file mode 100644 index ee1491f0..00000000 --- a/sdk/.editorconfig +++ /dev/null @@ -1,24 +0,0 @@ -root = true - -[*] -end_of_line = lf -insert_final_newline = true -trim_trailing_whitespace = true - -[*.{c,cc,h}] -indent_style = space -indent_size = 2 -max_line_length = 100 - -[{CMakeLists.txt,*.cmake}] -indent_style = space -indent_size = 2 -max_line_length = 80 - -[*.py] -indent_style = space -indent_size = 4 -profile = black - -[*.patch] -trim_trailing_whitespace = false diff --git a/sdk/.gitignore b/sdk/.gitignore deleted file mode 100644 index 72700104..00000000 --- a/sdk/.gitignore +++ /dev/null @@ -1,21 +0,0 @@ -build*/ -*~ -venv/ -.vscode/ -.vs/ -.vim/ -.cache/ -compile_commands.json -CMakeUserPresets.json -error_diff.txt - -# Shortened Windows build directory -wbr - -# Common test install directory -out/ - -# Raw install/packaging intermediary data -drop_raw/ - -dist/ diff --git a/sdk/CMakeLists.txt b/sdk/CMakeLists.txt deleted file mode 100644 index 6a3449fc..00000000 --- a/sdk/CMakeLists.txt +++ /dev/null @@ -1,545 +0,0 @@ -#============================================================== -# Copyright (C) Intel Corporation -# -# SPDX-License-Identifier: MIT -# ============================================================= -set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} - "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules/") - -include(macros) -cmake_minimum_required(VERSION 3.14) - -SetPtiVersion() - -project( - pti - VERSION ${PTI_VERSION} - DESCRIPTION "Intel Profiling Tools Interface" - HOMEPAGE_URL "https://github.com/intel/pti-gpu" - LANGUAGES C CXX -) - -ProjectIsTopLevel() -SetBuildType() - -# Global Settings - -if(PROJECT_IS_TOP_LEVEL AND NOT DEFINED PTI_COMMIT_HASH) - GetCurrentGitCommit(PTI_COMMIT_HASH) -endif() - -if(NOT DEFINED PTI_COMMIT_HASH OR PTI_COMMIT_HASH STREQUAL "") - set(PTI_COMMIT_HASH "unknown") -endif() - -if(PROJECT_IS_TOP_LEVEL) - set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin CACHE STRING "") - set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib CACHE STRING "") -endif() - -# For developer use with tools like clangd(can be used by vscode and vim -# plugins). -set(CMAKE_EXPORT_COMPILE_COMMANDS ON) - -if(PROJECT_IS_TOP_LEVEL) - AddFormatTarget() -endif() - -if(NOT DEFINED CMAKE_CXX_STANDARD) - set(CMAKE_CXX_STANDARD 17) -else() - if(CMAKE_CXX_STANDARD LESS 17 OR CMAKE_CXX_STANDARD EQUAL 98) - message(FATAL_ERROR "CMAKE_CXX_STANDARD must be at least 17") - endif() -endif() - -if(NOT DEFINED CMAKE_CXX_STANDARD_REQUIRED) - set(CMAKE_CXX_STANDARD_REQUIRED ON) -endif() - -if(NOT DEFINED CMAKE_CXX_EXTENSIONS) - set(CMAKE_CXX_EXTENSIONS OFF) -endif() - -if(NOT DEFINED CMAKE_CXX_VISIBILITY_PRESET) - set(CMAKE_CXX_VISIBILITY_PRESET "hidden") -endif() - -if(NOT DEFINED CMAKE_C_STANDARD) - # C99 for the C headers in the PTI interface (${PROJECT_SOURCE_DIR}/include). - # They include stdint.h. - set(CMAKE_C_STANDARD 99) -endif() - -if(NOT DEFINED CMAKE_C_STANDARD_REQUIRED) - set(CMAKE_C_STANDARD_REQUIRED ON) -endif() - -if(NOT DEFINED CMAKE_C_EXTENSIONS) - set(CMAKE_C_EXTENSIONS OFF) -endif() - -if(NOT DEFINED CMAKE_C_VISIBILITY_PRESET) - set(CMAKE_C_VISIBILITY_PRESET "hidden") -endif() - -if(NOT DEFINED CMAKE_VISIBILITY_INLINES_HIDDEN) - set(CMAKE_VISIBILITY_INLINES_HIDDEN ON) -endif() - -if(PROJECT_IS_TOP_LEVEL) - # Add the current directory to the rpath during the build. On Linux, this - # allows dlopen to find the proper modules. - if(NOT APPLE) - list(APPEND CMAKE_BUILD_RPATH $ORIGIN) - endif() -endif() - -option(PTI_BUILD_TESTING "Build PTI tests" ${PROJECT_IS_TOP_LEVEL}) -option(PTI_BUILD_SAMPLES "Build samples with library" ${PROJECT_IS_TOP_LEVEL}) -option(PTI_BUILD_URGEMM "Build urgemm_suite test" ${PROJECT_IS_TOP_LEVEL}) -option(PTI_INSTALL "Install library when invoking --install" ON) -option(PTI_ENABLE_LOGGING "Enable logging for Pti" OFF) -option(PTI_FUZZ "Enable Fuzz Pti" OFF) -option(PTI_API_ID_REGENERATE "Regenerate Apiid files" OFF) - -include(GNUInstallDirs) - -if(NOT DEFINED PTI_MODULE_SUBDIR) - set(PTI_MODULE_SUBDIR "pti") -endif() - -if(NOT DEFINED PTI_INSTALL_CMAKE_DIR) - set(PTI_INSTALL_CMAKE_DIR "${CMAKE_INSTALL_LIBDIR}/cmake/pti") -endif() - -if (NOT DEFINED PTI_INSTALL_INCLUDE_DIR) - set(PTI_INSTALL_INCLUDE_DIR "${CMAKE_INSTALL_INCLUDEDIR}") -endif() - -if (NOT DEFINED PTI_INSTALL_LIB_DIR) - set(PTI_INSTALL_LIB_DIR "${CMAKE_INSTALL_LIBDIR}") -endif() - -if (NOT DEFINED PTI_INSTALL_BIN_DIR) - set(PTI_INSTALL_BIN_DIR "${CMAKE_INSTALL_BINDIR}") -endif() - -if (NOT DEFINED PTI_INSTALL_LIC_DIR) - set(PTI_INSTALL_LIC_DIR "${CMAKE_INSTALL_DOCDIR}") -endif() - -if (NOT DEFINED PTI_INSTALL_MODULE_DIR) - if (WIN32) - set(PTI_INSTALL_MODULE_DIR "${PTI_INSTALL_BIN_DIR}/${PTI_MODULE_SUBDIR}") - else() - set(PTI_INSTALL_MODULE_DIR "${PTI_INSTALL_LIB_DIR}/${PTI_MODULE_SUBDIR}") - endif() -endif() - -set(PTI_API_SOVERSION "${PROJECT_VERSION_MAJOR}") - -CheckSOVersion(${PTI_API_SOVERSION}) -CheckExperimentalFilesystem() -PtiCheckLinkerFlag(EXCLUDE_LIBS_ALL "LINKER:--exclude-libs,ALL") -PtiCheckLinkerFlag(NODELETE "LINKER:-z,nodelete") - -# Check and Get Dependencies -GetSpdlog() - -if(NOT TARGET Xpti::xpti) - find_package(Xpti) -endif() -if(NOT TARGET Xpti::xpti) - find_package(xptifw) - if(TARGET xptifw::xptifw) - add_library(Xpti::xpti ALIAS xptifw::xptifw) - endif() -endif() - -include(cmake/levelzero.cmake) - -get_itt() - -find_package(Threads REQUIRED) - -# Build PTI libraries. -configure_file(${PROJECT_SOURCE_DIR}/include/pti/pti_version.h.in - ${PROJECT_BINARY_DIR}/include/pti/pti_version.h) - -# Generate file with configuration information above. -configure_file(${PROJECT_SOURCE_DIR}/src/utils/platform_config.h.in - ${PROJECT_BINARY_DIR}/platform_config.h - @ONLY) - -# https://cmake.org/cmake/help/latest/guide/importing-exporting/index.html -add_library(pti_all INTERFACE) -add_library(Pti::pti_all ALIAS pti_all) - -# The ITT collector is only built for the Linux version -set(PTI_ITT_COLLECTOR_FILE $<$:${PROJECT_SOURCE_DIR}/src/itt/itt_collector.cc>) -set(PTI_ITT_STUBS_FILE $<$:${PROJECT_SOURCE_DIR}/src/itt/itt_stubs.cc>) -set(PTI_ITT_ADAPTER_FILE $<$:${PROJECT_SOURCE_DIR}/src/itt/itt_adapter.cc>) -set(PTI_ITT_LIB_ENV_FILE $<$:${PROJECT_SOURCE_DIR}/src/itt/itt_lib_env.cc>) -set(PTI_INTEL_LLVM_EXCLUDE_LIBS - $<$,$>:-no-intel-lib> - $<$,$>:/Qno-intel-lib>) - -# Apply -Wno-attributes flag to ITT files only for GCC on Linux -if(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU") - set_source_files_properties(${PROJECT_SOURCE_DIR}/src/itt/itt_collector.cc - ${PROJECT_SOURCE_DIR}/src/itt/itt_stubs.cc - ${PROJECT_SOURCE_DIR}/src/itt/itt_adapter.cc - PROPERTIES COMPILE_FLAGS "-Wno-attributes") -endif() - -# Core implementation loaded by pti_view -add_library(pti MODULE "${PROJECT_SOURCE_DIR}/src/pti_view.cc" - "${PROJECT_SOURCE_DIR}/src/pti.cc" - "${PROJECT_SOURCE_DIR}/src/levelzero/ze_driver_init.cc" - "${PROJECT_SOURCE_DIR}/src/levelzero/ze_command_visitor.cc" - "${PROJECT_SOURCE_DIR}/src/pti_callbacks.cc" - "${PROJECT_SOURCE_DIR}/src/pc_sampling/pti_pc_sampling.cc" - "${PROJECT_SOURCE_DIR}/src/pc_sampling/pti_pc_sampling_collector.cc" - "${PROJECT_SOURCE_DIR}/src/pc_sampling/pti_pc_sampling_aggregator.cc" - "${PROJECT_SOURCE_DIR}/src/metrics/pti_metrics.cc" - "${PROJECT_SOURCE_DIR}/src/metrics/pti_metrics_scope.cc" - "${PROJECT_SOURCE_DIR}/src/metrics/metric_state_manager.cc" - "${PROJECT_SOURCE_DIR}/src/pti_version.cc" - "${PROJECT_SOURCE_DIR}/src/overhead_kinds.cc" - "$<$:${PROJECT_SOURCE_DIR}/src/sycl/sycl_collector.cc>" - "${PTI_ITT_COLLECTOR_FILE}") - -# We might want to make our own, but for now use CMake's -# https://cmake.org/cmake/help/latest/module/GenerateExportHeader.html -include(GenerateExportHeader) -generate_export_header(pti EXPORT_FILE_NAME - ${PROJECT_BINARY_DIR}/include/pti/pti_export.h) - -# Suspect we need this since we're sharing across multiple targets -set(PTI_DEFINE_SYMBOL "pti_EXPORTS") - -add_library(Pti::pti ALIAS pti) - -# Where to find headers that user will include. -set(PTI_PUBLIC_INCLUDE_DIRS - "$" - "$" - "$" - "$" -) - -set(PTI_PRIVATE_INCLUDE_DIRS - "${PROJECT_SOURCE_DIR}/src" - "${PROJECT_SOURCE_DIR}/src/sycl" - "${PROJECT_SOURCE_DIR}/src/levelzero" - "${PROJECT_SOURCE_DIR}/src/itt" - "${PROJECT_SOURCE_DIR}/src/utils" -) - -target_include_directories( - pti - PUBLIC ${PTI_PUBLIC_INCLUDE_DIRS} - PRIVATE ${PTI_PRIVATE_INCLUDE_DIRS}) - -set_target_properties( - pti - PROPERTIES VERSION "${PROJECT_VERSION}" - SOVERSION "${PTI_API_SOVERSION}" - POSITION_INDEPENDENT_CODE ON - LIBRARY_OUTPUT_DIRECTORY $/${PTI_MODULE_SUBDIR} - RUNTIME_OUTPUT_DIRECTORY $/${PTI_MODULE_SUBDIR}) - -if (WIN32) - set_target_properties( - pti - PROPERTIES DEBUG_POSTFIX "d" - ) - AddProjectVersionInfo(pti) -endif() - - -set(XPTI_FRAMEWORK_DISPATCHER_NAME_DEFINE - $<$:$<$:PTI_XPTI_FRAMEWORK_DISPATCHER_NAME=$>>) - -# XPTI needs NOMINMAX defined on Windows to avoid conflicts with numerical -# limits. -target_compile_definitions( - pti - PRIVATE $<$:PTI_TRACE_SYCL> - $<$,$>:NOMINMAX> - ${XPTI_FRAMEWORK_DISPATCHER_NAME_DEFINE} - $<$:PTI_LEVEL_ZERO=1> - $, - SPDLOG_ACTIVE_LEVEL=SPDLOG_LEVEL_TRACE, - SPDLOG_ACTIVE_LEVEL=SPDLOG_LEVEL_INFO> - $<$:PTI_CCL_ITT_COMPILE> - PTI_OVERHEAD_TRACKING_ENABLED) - -target_link_libraries( - pti - PUBLIC Threads::Threads - PRIVATE $ - LevelZero::level-zero - LevelZero::level-zero-ext - spdlog::spdlog - ${CMAKE_DL_LIBS} - ${FS_LIB} - $) - -target_compile_options(pti PRIVATE ${PTI_INTEL_LLVM_EXCLUDE_LIBS}) - -# Since PTI provides callbacks to Level Zero tracing and XPTI framework, it -# should not be unloaded; therefore, marking it NODELETE. -target_link_options(pti PRIVATE ${PTI_INTEL_LLVM_EXCLUDE_LIBS} ${PTI_EXCLUDE_LIBS_ALL} ${PTI_NODELETE}) -PtiAddVersionScript(pti "${PROJECT_SOURCE_DIR}/src/libpti.map") - -FindTracedLibrariesHeaderPaths( - pti "${PROJECT_SOURCE_DIR}/src/gen_tracing_callbacks.py" - "tracing.gen" gen_tracing_libs_header LevelZero::level-zero) - -if(PROJECT_IS_TOP_LEVEL) - AddApiGenTarget( - "${PROJECT_SOURCE_DIR}/src/gen_tracing_callbacks.py" "tracing.gen" LevelZero::level-zero) - add_dependencies(generate-ids gen_tracing_libs_header) -endif() - -# Library that loads core (pti). User links to this one. -add_library(pti_view SHARED "${PROJECT_SOURCE_DIR}/src/xpti_adapter.cc" - "${PROJECT_SOURCE_DIR}/src/pti.cc" - "${PROJECT_SOURCE_DIR}/src/pti_version.cc" - "${PROJECT_SOURCE_DIR}/src/pti_view_load.cc" - "${PTI_ITT_ADAPTER_FILE}" - "${PTI_ITT_LIB_ENV_FILE}" - "${PTI_ITT_STUBS_FILE}") - -add_library(Pti::pti_view ALIAS pti_view) - -target_include_directories( - pti_view - PUBLIC ${PTI_PUBLIC_INCLUDE_DIRS} - PRIVATE ${PTI_PRIVATE_INCLUDE_DIRS}) - -set_target_properties( - pti_view - PROPERTIES VERSION "${PROJECT_VERSION}" - SOVERSION "${PTI_API_SOVERSION}" - POSITION_INDEPENDENT_CODE ON - DEFINE_SYMBOL "${PTI_DEFINE_SYMBOL}") - -if (WIN32) - set_target_properties( - pti_view - PROPERTIES OUTPUT_NAME "pti_view-${PROJECT_VERSION_MAJOR}" - DEBUG_POSTFIX "d" - ) - - AddVersionlessLinkFile(pti_view) - - AddProjectVersionInfo(pti_view) -endif() - -target_compile_definitions( - pti_view - PRIVATE PTI_VIEW_CORE_LIB_NAME=$ - ${XPTI_FRAMEWORK_DISPATCHER_NAME_DEFINE} - $, - SPDLOG_ACTIVE_LEVEL=SPDLOG_LEVEL_TRACE, - SPDLOG_ACTIVE_LEVEL=SPDLOG_LEVEL_INFO> - $<$:PTI_CCL_ITT_COMPILE>) - -target_link_libraries( - pti_view - PRIVATE spdlog::spdlog - ${CMAKE_DL_LIBS} - ${FS_LIB} - $) - -target_compile_options(pti_view PRIVATE ${PTI_INTEL_LLVM_EXCLUDE_LIBS}) - -target_link_options(pti_view PRIVATE ${PTI_INTEL_LLVM_EXCLUDE_LIBS} ${PTI_EXCLUDE_LIBS_ALL}) -PtiAddVersionScript(pti_view "${PROJECT_SOURCE_DIR}/src/libpti_view.map") - -target_link_libraries( - pti_all INTERFACE Pti::pti_view) - -include(CTest) - -if(BUILD_TESTING AND PTI_BUILD_SAMPLES) - # Workaround for crash with tbb_debug in oneAPI < 2026.0 - # https://github.com/uxlfoundation/oneTBB/commit/d784b628190cbbcb6139916da3efe8c0b60abaa2 - if(CMAKE_CXX_COMPILER_ID MATCHES "IntelLLVM" AND DEFINED ENV{CMPLR_ROOT}) - string(REGEX MATCH "compiler/([0-9]+)" ONEAPI_VERSION_MATCH "$ENV{CMPLR_ROOT}") - set(ONEAPI_VERSION "${CMAKE_MATCH_1}") - if(ONEAPI_VERSION AND ONEAPI_VERSION LESS 2026) - set(TBB_FIND_RELEASE_ONLY ON CACHE BOOL "Only use release TBB to workaround crash with tbb_debug" FORCE) - message(STATUS "oneAPI ${ONEAPI_VERSION}: Enabling TBB_FIND_RELEASE_ONLY workaround") - endif() - endif() - - add_subdirectory(samples/dlworkloads) - add_subdirectory(samples/dpc_gemm) - add_subdirectory(samples/dpc_gemm_threaded) - add_subdirectory(samples/view_record_versioned) - add_subdirectory(samples/vector_sq_add) - add_subdirectory(samples/onemkl_gemm) - add_subdirectory(samples/iso3dfd_dpcpp) - add_subdirectory(samples/metrics_iso3dfd_dpcpp) - add_subdirectory(samples/callback) - add_subdirectory(samples/metrics_scope) - add_subdirectory(samples/omp_vec_add) - add_subdirectory(samples/metrics_perf) - add_subdirectory(samples/pc_sampling) - add_subdirectory(samples/pc_sampling_profiler) - add_subdirectory(samples/itt_ccl) -endif() - -if(BUILD_TESTING AND PTI_BUILD_TESTING) - add_subdirectory(test) -endif() - -if(PROJECT_IS_TOP_LEVEL AND BUILD_TESTING) - include(cmake/coverage.cmake) -endif() - -if(PROJECT_IS_TOP_LEVEL) - include(cmake/docs.cmake) -endif() - -# Targets / Install phase -export( - TARGETS pti_all pti pti_view - FILE "${CMAKE_CURRENT_BINARY_DIR}/cmake/PtiTargets.cmake" - NAMESPACE Pti::) - -if(PTI_INSTALL) - include(CMakePackageConfigHelpers) - - write_basic_package_version_file( - "${PROJECT_BINARY_DIR}/PtiConfigVersion.cmake" - VERSION "${PROJECT_VERSION}" - COMPATIBILITY SameMinorVersion) - - install( - FILES "${PROJECT_SOURCE_DIR}/PtiConfig.cmake" - "${PROJECT_BINARY_DIR}/PtiConfigVersion.cmake" - COMPONENT Pti_Development - DESTINATION "${PTI_INSTALL_CMAKE_DIR}") - - install( - TARGETS pti_all pti_view - EXPORT PtiTargets - LIBRARY DESTINATION ${PTI_INSTALL_LIB_DIR} - COMPONENT Pti_Runtime - NAMELINK_COMPONENT Pti_Development - ARCHIVE DESTINATION ${PTI_INSTALL_LIB_DIR} COMPONENT Pti_Development - RUNTIME DESTINATION ${PTI_INSTALL_BIN_DIR} COMPONENT Pti_Runtime) - - install( - TARGETS pti - EXPORT PtiTargets - LIBRARY DESTINATION ${PTI_INSTALL_MODULE_DIR} - COMPONENT Pti_Runtime - RUNTIME DESTINATION ${PTI_INSTALL_MODULE_DIR} COMPONENT Pti_Runtime) - - install( - DIRECTORY "${PROJECT_BINARY_DIR}/include/pti" - DESTINATION "${PTI_INSTALL_INCLUDE_DIR}" - COMPONENT Pti_Development - FILES_MATCHING - PATTERN "*.h") - - install( - DIRECTORY "${PROJECT_SOURCE_DIR}/include/" - DESTINATION "${PTI_INSTALL_INCLUDE_DIR}" - COMPONENT Pti_Development - FILES_MATCHING - PATTERN "*.h") - - install( - EXPORT PtiTargets - FILE PtiTargets.cmake - NAMESPACE Pti:: - DESTINATION "${PTI_INSTALL_CMAKE_DIR}" - COMPONENT Pti_Development) - - if(WIN32) - install( - FILES $/pti_view$<$:d>${CMAKE_LINK_LIBRARY_SUFFIX} - COMPONENT Pti_Development - DESTINATION "${PTI_INSTALL_LIB_DIR}") - endif() - - if (EXISTS "${PROJECT_SOURCE_DIR}/../LICENSE") - install( - FILES "../LICENSE" - DESTINATION "${PTI_INSTALL_LIC_DIR}" - RENAME "LICENSE.txt" - COMPONENT Pti_Doc) - endif() - - # - # This file is only installed in oneAPI drops - # - if("${PTI_PRESET_USED}" MATCHES "[lw].*-oneAPI-release") - - include(cmake/bom_macro.cmake) - - set(BOMFILE_DIR "drop_raw") - set(BOMFILE_DEV "${BOMFILE_DIR}/pti_dev.txt") - set(BOMFILE_RUN "${BOMFILE_DIR}/pti_run.txt") - - install(CODE " - file(REMOVE ${BOMFILE_DEV} ${BOMFILE_RUN}) " - COMPONENT Pti_Bom) - - if (EXISTS "${PROJECT_SOURCE_DIR}/../third-party-programs.txt") - install( - FILES "../third-party-programs.txt" - DESTINATION "${PTI_INSTALL_LIC_DIR}" - COMPONENT Pti_oneAPI) - else() - message(FATAL_ERROR "The PTI library must be built within the top-level " - "repository to ensure a valid installation.") - endif() - - if (UNIX) - install(FILES "env/vars.sh" DESTINATION "env/" COMPONENT Pti_oneAPI) - install(FILES "env/oneapi-vars.sh" DESTINATION "${CMAKE_INSTALL_SYSCONFDIR}/pti" RENAME vars.sh COMPONENT Pti_oneAPI) - install(DIRECTORY "cmake/tags/" DESTINATION "tags/" FILES_MATCHING PATTERN "lin_*.txt") - elseif (WIN32) - install(FILES "env/vars.bat" DESTINATION "env/" COMPONENT Pti_oneAPI) - install(FILES "env/oneapi-vars.bat" DESTINATION "${CMAKE_INSTALL_SYSCONFDIR}/pti" RENAME vars.bat COMPONENT Pti_oneAPI) - install(DIRECTORY "cmake/tags/" DESTINATION "tags/" FILES_MATCHING PATTERN "win_*.txt") - endif() - - set(BOMFILE_DIRNULL "NULL") - set(BOMFILE_DIRPREFIX "-LIB") - - bomline(${BOMFILE_DIR} ${BOMFILE_DEV} ${BOMFILE_DIRNULL} - [[\"\${CMAKE_INSTALL_PREFIX}/${PTI_INSTALL_INCLUDE_DIR}/pti*.h\"]]) - bomline(${BOMFILE_DIR} ${BOMFILE_DEV} ${BOMFILE_DIRNULL} - [[\"\${CMAKE_INSTALL_PREFIX}/${PTI_INSTALL_LIB_DIR}/cmake/pti/Pti*.cmake\"]]) - bomline(${BOMFILE_DIR} ${BOMFILE_RUN} ${BOMFILE_DIRNULL} - [[\"\${CMAKE_INSTALL_PREFIX}/${PTI_INSTALL_LIC_DIR}/*\"]]) - bomline(${BOMFILE_DIR} ${BOMFILE_RUN} ${BOMFILE_DIRNULL} - [[\"\${CMAKE_INSTALL_PREFIX}/${PTI_INSTALL_LIB_DIR}/libpti*so.[0-9]*\"]]) - bomline(${BOMFILE_DIR} ${BOMFILE_RUN} ${BOMFILE_DIRNULL} - [[\"\${CMAKE_INSTALL_PREFIX}/${PTI_INSTALL_LIB_DIR}/libpti*so\"]]) - bomline(${BOMFILE_DIR} ${BOMFILE_DEV} ${BOMFILE_DIRNULL} - [[\"\${CMAKE_INSTALL_PREFIX}/${PTI_INSTALL_LIB_DIR}/*.lib\"]]) - bomline(${BOMFILE_DIR} ${BOMFILE_RUN} ${BOMFILE_DIRPREFIX} - [[\"\${CMAKE_INSTALL_PREFIX}/${PTI_INSTALL_LIB_DIR}/*.dll\"]]) - bomline(${BOMFILE_DIR} ${BOMFILE_RUN} ${BOMFILE_DIRPREFIX} - [[\"\${CMAKE_INSTALL_PREFIX}/${PTI_INSTALL_BIN_DIR}/*.dll\"]]) - bomline(${BOMFILE_DIR} ${BOMFILE_RUN} ${BOMFILE_DIRNULL} - [[\"\${CMAKE_INSTALL_PREFIX}/env/*\"]]) - bomline(${BOMFILE_DIR} ${BOMFILE_RUN} ${BOMFILE_DIRNULL} - [[\"\${CMAKE_INSTALL_PREFIX}/etc/*\"]]) - - endif() -endif() - -if(PROJECT_IS_TOP_LEVEL AND PTI_INSTALL) - include(cmake/packaging.cmake) -endif() diff --git a/sdk/CMakePresets.json b/sdk/CMakePresets.json deleted file mode 100644 index 5ff4b778..00000000 --- a/sdk/CMakePresets.json +++ /dev/null @@ -1,625 +0,0 @@ -{ - "version": 2, - "configurePresets": [ - { - "name": "linux-icpx-release", - "displayName": "Linux Release x64 IntelLLVM Ninja Config", - "description": "Linux Release x64 Config using Ninja generator and oneAPI compiler", - "generator": "Ninja", - "binaryDir": "${sourceDir}/build-${presetName}", - "cacheVariables": { - "CMAKE_BUILD_TYPE": "Release", - "CMAKE_TOOLCHAIN_FILE": "${sourceDir}/cmake/toolchains/icpx_toolchain.cmake", - "CMAKE_CXX_FLAGS": "-Wall -Wextra -Wextra-semi -pedantic -Wformat -Werror -Wformat-security -Werror=format-security -fstack-protector-strong -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2", - "CMAKE_C_FLAGS": "-Wall -Wextra -Wextra-semi -pedantic -Wformat -Werror -Wformat-security -Werror=format-security -fstack-protector-strong -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2", - "CMAKE_SHARED_LINKER_FLAGS": "-Wl,-z,relro,-z,now,-z,noexecstack,--build-id=sha1", - "CMAKE_MODULE_LINKER_FLAGS": "-Wl,-z,relro,-z,now,-z,noexecstack,--build-id=sha1", - "CMAKE_EXE_LINKER_FLAGS": "-Wl,-z,relro,-z,now,-z,noexecstack,--build-id=sha1" - } - }, - { - "name": "linux-icpx-reldebuginfo", - "displayName": "Linux Release x64 IntelLLVM Ninja Config", - "description": "Linux Release x64 Config using Ninja generator and oneAPI compiler", - "generator": "Ninja", - "binaryDir": "${sourceDir}/build-${presetName}", - "cacheVariables": { - "CMAKE_BUILD_TYPE": "Release", - "CMAKE_TOOLCHAIN_FILE": "${sourceDir}/cmake/toolchains/icpx_toolchain.cmake", - "CMAKE_CXX_FLAGS": "-Wall -Wextra -Wextra-semi -Wformat -Werror -Wformat-security -Werror=format-security -g -fstack-protector-strong -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2", - "CMAKE_C_FLAGS": "-Wall -Wextra -Wextra-semi -Wformat -Werror -Wformat-security -Werror=format-security -g -fstack-protector-strong -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2", - "CMAKE_SHARED_LINKER_FLAGS": "-Wl,-z,relro,-z,now,-z,noexecstack,--build-id=sha1", - "CMAKE_MODULE_LINKER_FLAGS": "-Wl,-z,relro,-z,now,-z,noexecstack,--build-id=sha1", - "CMAKE_EXE_LINKER_FLAGS": "-Wl,-z,relro,-z,now,-z,noexecstack,--build-id=sha1" - } - }, - { - "name": "linux-icpx-debug", - "displayName": "Linux Debug x64 IntelLLVM Ninja Config", - "description": "Linux Debug x64 Config using Ninja generator and oneAPI compiler", - "generator": "Ninja", - "binaryDir": "${sourceDir}/build-${presetName}", - "cacheVariables": { - "CMAKE_BUILD_TYPE": "Debug", - "CMAKE_TOOLCHAIN_FILE": "${sourceDir}/cmake/toolchains/icpx_toolchain.cmake", - "CMAKE_CXX_FLAGS": "-Wall -Wextra -Wextra-semi -Wformat -Wformat-security -fno-omit-frame-pointer -fno-optimize-sibling-calls", - "CMAKE_C_FLAGS": "-Wall -Wextra -Wextra-semi -Wformat -Wformat-security -fno-omit-frame-pointer -fno-optimize-sibling-calls", - "PTI_ENABLE_LOGGING": "ON" - } - }, - { - "name": "linux-cov", - "displayName": "Linux Code Coverage", - "description": "Linux Source-based Code Coverage Config", - "generator": "Ninja", - "binaryDir": "${sourceDir}/build-${presetName}", - "cacheVariables": { - "CMAKE_BUILD_TYPE": "Coverage", - "CMAKE_TOOLCHAIN_FILE": "${sourceDir}/cmake/toolchains/icpx_toolchain.cmake", - "CMAKE_CXX_FLAGS_COVERAGE": "-g3 -O0 -Xarch_host -fprofile-instr-generate -Xarch_host -fcoverage-mapping -Xarch_host -mllvm=-runtime-counter-relocation=true", - "CMAKE_C_FLAGS_COVERAGE": "-g3 -O0 -Xarch_host -fprofile-instr-generate -Xarch_host -fcoverage-mapping -Xarch_host -mllvm=-runtime-counter-relocation=true", - "CMAKE_SHARED_LINKER_FLAGS_COVERAGE": "-Xarch_host -fprofile-instr-generate", - "CMAKE_MODULE_LINKER_FLAGS_COVERAGE": "-Xarch_host -fprofile-instr-generate", - "CMAKE_EXE_LINKER_FLAGS_COVERAGE": "-Xarch_host -fprofile-instr-generate", - "PTI_ENABLE_LOGGING": "ON" - } - }, - { - "name": "linux-icpx-make-release", - "inherits": "linux-icpx-release", - "displayName": "Linux Release x64 IntelLLVM Make Config", - "description": "Linux Release x64 Config using Unix Makefiles generator and oneAPI compiler", - "generator": "Unix Makefiles" - }, - { - "name": "linux-icpx-make-debug", - "inherits": "linux-icpx-debug", - "displayName": "Linux Debug x64 IntelLLVM Make Config", - "description": "Linux Debug x64 Config using Unix Makefiles generator and oneAPI compiler", - "generator": "Unix Makefiles" - }, - { - "name": "linux-oneAPI-release", - "inherits": "linux-icpx-release", - "displayName": "Linux oneAPI x64 Release Config", - "description": "Latest known valid configuration for releasing PTI with oneAPI toolkit.", - "binaryDir": "${sourceDir}/build-${presetName}", - "cacheVariables": { - "CMAKE_INSTALL_LIBDIR": "lib", - "CMAKE_DISABLE_FIND_PACKAGE_spdlog": true, - "PTI_PRESET_USED": "${presetName}" - } - }, - { - "name": "linux-asan", - "inherits": "linux-icpx-debug", - "displayName": "Linux AddressSanitizer Config", - "description": "Linux build configuration for testing PTI with AddressSanitizer.", - "binaryDir": "${sourceDir}/build-${presetName}", - "cacheVariables": { - "CMAKE_TOOLCHAIN_FILE": "${sourceDir}/cmake/toolchains/icpx_asan_toolchain.cmake" - }, - "environment": { - "NEOReadDebugKeys": "1", - "DisableDeepBind": "1", - "PATH": "$penv{CMPLR_ROOT}/bin/compiler:$penv{PATH}", - "ASAN_SYMBOLIZER_PATH": "$penv{CMPLR_ROOT}/bin/compiler/llvm-symbolizer", - "LSAN_SYMBOLIZER_PATH": "$penv{CMPLR_ROOT}/bin/compiler/llvm-symbolizer", - "ASAN_OPTIONS": "suppressions=${sourceDir}/test/suppressions/ASan.supp,detect_leaks=1,check_initialization_order=1,halt_on_error=1,use_sigaltstack=0", - "LSAN_OPTIONS": "suppressions=${sourceDir}/test/suppressions/LSan.supp,use_unaligned=1", - "UBSAN_OPTIONS": "suppressions=${sourceDir}/test/suppressions/UBSan.supp,print_stacktrace=1,halt_on_error=1", - "TBB_ENABLE_SANITIZERS": "1" - } - }, - { - "name": "linux-fuzz", - "inherits": "linux-asan", - "displayName": "Linux Fuzz Testing Config", - "description": "Linux build configuration for fuzz testing with libFuzzer.", - "binaryDir": "${sourceDir}/build-${presetName}", - "cacheVariables": { - "PTI_FUZZ": true, - "CMAKE_TOOLCHAIN_FILE": "${sourceDir}/cmake/toolchains/icpx_fuzz_toolchain.cmake" - } - }, - { - "name": "linux-tsan", - "inherits": "linux-asan", - "displayName": "Linux ThreadSanitizer Config", - "description": "Linux build configuration for testing PTI with ThreadSanitizer.", - "environment": { - "ONEAPI_DEVICE_SELECTOR": "level_zero:gpu", - "TSAN_OPTIONS": "suppressions=${sourceDir}/test/suppressions/TSan.supp external_symbolizer_path=$penv{CMPLR_ROOT}/bin/compiler/llvm-symbolizer halt_on_error=1 force_seq_cst_atomics=1" - }, - "cacheVariables": { - "CMAKE_TOOLCHAIN_FILE": "${sourceDir}/cmake/toolchains/icpx_tsan_toolchain.cmake" - } - }, - { - "name": "linux-clang-release", - "inherits": "linux-icpx-release", - "displayName": "Linux Release x64 Clang Config", - "description": "Linux Release x64 Config using Ninja generator and clang compiler", - "cacheVariables": { - "CMAKE_TOOLCHAIN_FILE": "${sourceDir}/cmake/toolchains/clang_toolchain.cmake" - } - }, - { - "name": "linux-dpclang-release", - "inherits": "linux-icpx-release", - "displayName": "Linux Release x64 DPC++ Clang Config", - "description": "Linux Release x64 Config using Ninja generator and dpclang compiler", - "cacheVariables": { - "CMAKE_TOOLCHAIN_FILE": "${sourceDir}/cmake/toolchains/dpclang_toolchain.cmake" - } - }, - { - "name": "linux-clang-debug", - "inherits": "linux-icpx-debug", - "displayName": "Linux Debug x64 Clang Config", - "description": "Linux Debug x64 Config using Ninja generator and clang compiler", - "cacheVariables": { - "CMAKE_TOOLCHAIN_FILE": "${sourceDir}/cmake/toolchains/clang_toolchain.cmake", - "PTI_ENABLE_LOGGING": "ON" - } - }, - { - "name": "linux-dpclang-debug", - "inherits": "linux-icpx-debug", - "displayName": "Linux Debug x64 DPC++ Clang Config", - "description": "Linux Debug x64 Config using Ninja generator and dpclang compiler", - "cacheVariables": { - "CMAKE_TOOLCHAIN_FILE": "${sourceDir}/cmake/toolchains/dpclang_toolchain.cmake", - "PTI_ENABLE_LOGGING": "ON" - } - }, - { - "name": "linux-gxx-release", - "displayName": "Linux Release x64 GCC Ninja Config", - "description": "Linux Release x64 Config using Ninja generator and gcc/g++ compiler", - "generator": "Ninja", - "binaryDir": "${sourceDir}/build-${presetName}", - "cacheVariables": { - "CMAKE_BUILD_TYPE": "Release", - "CMAKE_C_COMPILER": "gcc", - "CMAKE_CXX_COMPILER": "g++", - "CMAKE_CXX_FLAGS": "-Wall -Wextra -Wextra-semi -pedantic -Wformat -Werror -Wformat-security -Werror=format-security -fstack-protector-strong -O3 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2", - "CMAKE_C_FLAGS": "-Wall -Wextra -pedantic -Wformat -Werror -Wformat-security -Werror=format-security -fstack-protector-strong -O3 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2", - "CMAKE_SHARED_LINKER_FLAGS": "-Wl,-z,relro,-z,now,-z,noexecstack,--build-id=sha1", - "CMAKE_MODULE_LINKER_FLAGS": "-Wl,-z,relro,-z,now,-z,noexecstack,--build-id=sha1", - "CMAKE_EXE_LINKER_FLAGS": "-Wl,-z,relro,-z,now,-z,noexecstack,--build-id=sha1" - } - }, - { - "name": "linux-abi", - "displayName": "Linux ABI Check x64 GCC Ninja Config", - "description": "Library-only build with DWARF for abidw/abidiff and abi-dumper. Release builds strip debug info, which those tools require.", - "generator": "Ninja", - "binaryDir": "${sourceDir}/build-${presetName}", - "cacheVariables": { - "CMAKE_BUILD_TYPE": "RelWithDebInfo", - "CMAKE_C_COMPILER": "gcc", - "CMAKE_CXX_COMPILER": "g++", - "CMAKE_CXX_FLAGS": "-Wall -Wextra -Wformat -Wformat-security -fstack-protector-strong -g -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2", - "CMAKE_C_FLAGS": "-Wall -Wextra -Wformat -Wformat-security -fstack-protector-strong -g -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2", - "CMAKE_SHARED_LINKER_FLAGS": "-Wl,-z,relro,-z,now,-z,noexecstack,--build-id=sha1", - "CMAKE_MODULE_LINKER_FLAGS": "-Wl,-z,relro,-z,now,-z,noexecstack,--build-id=sha1", - "CMAKE_EXE_LINKER_FLAGS": "-Wl,-z,relro,-z,now,-z,noexecstack,--build-id=sha1", - "PTI_BUILD_SAMPLES": "OFF", - "PTI_BUILD_TESTING": "OFF", - "PTI_BUILD_URGEMM": "OFF" - } - }, - { - "name": "windows-icx-debug", - "displayName": "Windows Debug x64 IntelLLVM Config", - "description": "Windows Debug x64 IntelLLVM Compiler Config. Uses icx and Ninja. Turns on logging.", - "generator": "Ninja", - "binaryDir": "${sourceDir}/build-${presetName}", - "cacheVariables": { - "CMAKE_BUILD_TYPE": "Debug", - "CMAKE_TOOLCHAIN_FILE": "${sourceDir}/cmake/toolchains/icpx_toolchain.cmake", - "CMAKE_CXX_FLAGS": "/W4 /MDd /EHcs /fp:precise -Qstd:c++17 /sdl /GS /Gy /DYNAMICBASE /guard:cf /RTCsu -Wno-error=character-conversion", - "CMAKE_SHARED_LINKER_FLAGS": "/DEPENDENTLOADFLAG:0x2000 /DYNAMICBASE /guard:cf", - "CMAKE_MODULE_LINKER_FLAGS": "/DEPENDENTLOADFLAG:0x2000 /DYNAMICBASE /guard:cf", - "CMAKE_EXE_LINKER_FLAGS": "/DEPENDENTLOADFLAG:0x2000 /DYNAMICBASE /guard:cf", - "PTI_ENABLE_LOGGING": "ON" - } - }, - { - "name": "windows-icx-release", - "displayName": "Windows Release x64 IntelLLVM Config", - "description": "Windows Release x64 IntelLLVM Compiler Config. Uses icx and Ninja.", - "generator": "Ninja", - "binaryDir": "${sourceDir}/build-${presetName}", - "cacheVariables": { - "CMAKE_BUILD_TYPE": "Release", - "CMAKE_TOOLCHAIN_FILE": "${sourceDir}/cmake/toolchains/icpx_toolchain.cmake", - "CMAKE_CXX_FLAGS": "/W4 /WX /MD /EHcs /fp:precise -Qstd:c++17 /sdl /GS /Gy /DYNAMICBASE /guard:cf", - "CMAKE_SHARED_LINKER_FLAGS": "/DEPENDENTLOADFLAG:0x2000 /DYNAMICBASE /NXCOMPAT /guard:cf", - "CMAKE_MODULE_LINKER_FLAGS": "/DEPENDENTLOADFLAG:0x2000 /DYNAMICBASE /NXCOMPAT /guard:cf", - "CMAKE_EXE_LINKER_FLAGS": "/DEPENDENTLOADFLAG:0x2000 /DYNAMICBASE /NXCOMPAT /guard:cf" - } - }, - { - "name": "windows-icx-reldebuginfo", - "displayName": "Windows Release x64 IntelLLVM Config with Debug Info", - "description": "Windows Release x64 IntelLLVM Compiler Config with Debug Info. Uses icx and Ninja.", - "generator": "Ninja", - "binaryDir": "${sourceDir}/build-${presetName}", - "cacheVariables": { - "CMAKE_BUILD_TYPE": "RelWithDebInfo", - "CMAKE_TOOLCHAIN_FILE": "${sourceDir}/cmake/toolchains/icpx_toolchain.cmake", - "CMAKE_CXX_FLAGS": "/W4 /WX /MD /EHcs /fp:precise -Qstd:c++17 /sdl /GS /Gy /DYNAMICBASE /guard:cf", - "CMAKE_SHARED_LINKER_FLAGS": "/DEPENDENTLOADFLAG:0x2000 /DYNAMICBASE /NXCOMPAT /guard:cf", - "CMAKE_MODULE_LINKER_FLAGS": "/DEPENDENTLOADFLAG:0x2000 /DYNAMICBASE /NXCOMPAT /guard:cf", - "CMAKE_EXE_LINKER_FLAGS": "/DEPENDENTLOADFLAG:0x2000 /DYNAMICBASE /NXCOMPAT /guard:cf" - } - }, - { - "name": "windows-cov", - "displayName": "Windows Code Coverage", - "description": "Windows Source-based Code Coverage Config", - "generator": "Ninja", - "binaryDir": "${sourceDir}/build-${presetName}", - "cacheVariables": { - "CMAKE_BUILD_TYPE": "Coverage", - "CMAKE_TOOLCHAIN_FILE": "${sourceDir}/cmake/toolchains/icpx_toolchain.cmake", - "CMAKE_CXX_FLAGS_COVERAGE": "/MD /EHcs /fp:precise -Qstd:c++17 /Zi -fprofile-instr-generate -fcoverage-mapping", - "CMAKE_SHARED_LINKER_FLAGS_COVERAGE": "-fprofile-instr-generate", - "CMAKE_MODULE_LINKER_FLAGS_COVERAGE": "-fprofile-instr-generate", - "CMAKE_EXE_LINKER_FLAGS_COVERAGE": "-fprofile-instr-generate", - "PTI_ENABLE_LOGGING": "ON" - } - }, - { - "name": "windows-ci-release", - "displayName": "Windows CI Release Config", - "description": "Windows CI Release Config. Uses icx and Ninja.", - "inherits": "windows-icx-release", - "binaryDir": "${sourceDir}/wbr" - }, - { - "name": "windows-oneAPI-release", - "displayName": "Windows oneAPI Release Config", - "description": "Latest known valid configuration for releasing PTI with oneAPI toolkit.", - "inherits": "windows-ci-release", - "cacheVariables": { - "CMAKE_INSTALL_LIBDIR": "lib", - "CMAKE_DISABLE_FIND_PACKAGE_spdlog": true, - "CMAKE_DISABLE_FIND_PACKAGE_LevelZero": true, - "PTI_PRESET_USED": "${presetName}" - } - }, - { - "name": "windows-ci-debug", - "displayName": "Windows CI Debug Config", - "description": "Windows CI Debug Config. Uses icx and Ninja.", - "inherits": "windows-icx-debug", - "binaryDir": "${sourceDir}/wbd" - }, - { - "name": "windows-debug", - "displayName": "Windows Debug x64 MSVC Config", - "description": "Windows Debug x64 MSVC Compiler Config. Uses cl and Ninja. Turns on logging.", - "generator": "Ninja", - "binaryDir": "${sourceDir}/build-${presetName}", - "cacheVariables": { - "CMAKE_BUILD_TYPE": "Debug", - "CMAKE_C_COMPILER": "cl.exe", - "CMAKE_CXX_COMPILER": "cl.exe", - "CMAKE_CXX_FLAGS": "/MP /W4 /MDd /EHcs /sdl /analyze /wd6326 /wd28020 /Gy /GS /DYNAMICBASE /guard:cf /RTCsu", - "CMAKE_SHARED_LINKER_FLAGS": "/DEPENDENTLOADFLAG:0x2000 /DYNAMICBASE /guard:cf", - "CMAKE_MODULE_LINKER_FLAGS": "/DEPENDENTLOADFLAG:0x2000 /DYNAMICBASE /guard:cf", - "CMAKE_EXE_LINKER_FLAGS": "/DEPENDENTLOADFLAG:0x2000 /DYNAMICBASE /guard:cf", - "PTI_ENABLE_LOGGING": "ON" - } - }, - { - "name": "windows-release", - "displayName": "Windows Release x64 MSVC Config", - "description": "Windows Release x64 MSVC Compiler Config. Uses cl and Ninja. Turns on logging.", - "generator": "Ninja", - "binaryDir": "${sourceDir}/build-${presetName}", - "cacheVariables": { - "CMAKE_BUILD_TYPE": "Release", - "CMAKE_C_COMPILER": "cl.exe", - "CMAKE_CXX_COMPILER": "cl.exe", - "CMAKE_CXX_FLAGS": "/MP /W4 /WX /MD /EHcs /sdl /analyze /wd6326 /wd28020 /Gy /GS /DYNAMICBASE /guard:cf", - "CMAKE_SHARED_LINKER_FLAGS": "/DEPENDENTLOADFLAG:0x2000 /DYNAMICBASE /NXCOMPAT /LTCG /sdl /guard:cf", - "CMAKE_MODULE_LINKER_FLAGS": "/DEPENDENTLOADFLAG:0x2000 /DYNAMICBASE /NXCOMPAT /LTCG /sdl /guard:cf", - "CMAKE_EXE_LINKER_FLAGS": "/DEPENDENTLOADFLAG:0x2000 /DYNAMICBASE /NXCOMPAT /LTCG /sdl /guard:cf" - } - } - ], - "buildPresets": [ - { - "name": "linux-icpx-release", - "configurePreset": "linux-icpx-release", - "displayName": "Linux Release x64 IntelLLVM Ninja Build" - }, - { - "name": "linux-clang-release", - "configurePreset": "linux-clang-release", - "displayName": "Linux Release x64 Clang Ninja Build" - }, - { - "name": "linux-dpclang-release", - "configurePreset": "linux-dpclang-release", - "displayName": "Linux Release x64 DPC++ Clang Ninja Build" - }, - { - "name": "linux-icpx-reldebuginfo", - "configurePreset": "linux-icpx-reldebuginfo", - "displayName": "Linux Release x64 IntelLLVM Ninja Build" - }, - { - "name": "linux-icpx-debug", - "configurePreset": "linux-icpx-debug", - "displayName": "Linux Debug x64 IntelLLVM Ninja Build" - }, - { - "name": "linux-clang-debug", - "configurePreset": "linux-clang-debug", - "displayName": "Linux Debug x64 Clang Ninja Build" - }, - { - "name": "linux-dpclang-debug", - "configurePreset": "linux-dpclang-debug", - "displayName": "Linux Debug x64 DPC++ Clang Ninja Build" - }, - { - "name": "linux-cov", - "configurePreset": "linux-cov", - "displayName": "Linux Source-Based Code Coverage Build" - }, - { - "name": "linux-icpx-make-release", - "configurePreset": "linux-icpx-make-release", - "displayName": "Linux Release x64 IntelLLVM Make Build" - }, - { - "name": "linux-icpx-make-debug", - "configurePreset": "linux-icpx-make-debug", - "displayName": "Linux Debug x64 IntelLLVM Make Build" - }, - { - "name": "linux-oneAPI-release", - "configurePreset": "linux-oneAPI-release", - "displayName": "Linux oneAPI x64 Release Build" - }, - { - "name": "linux-asan", - "configurePreset": "linux-asan", - "displayName": "Linux AddressSanitizer Build" - }, - { - "name": "linux-fuzz", - "configurePreset": "linux-fuzz", - "displayName": "Linux Fuzz Testing Build" - }, - { - "name": "linux-tsan", - "configurePreset": "linux-tsan", - "displayName": "Linux ThreadSanitizer Build" - }, - { - "name": "linux-gxx-release", - "configurePreset": "linux-gxx-release", - "displayName": "Linux gcc/g++ Build" - }, - { - "name": "linux-abi", - "configurePreset": "linux-abi", - "displayName": "Linux ABI Check Build", - "targets": ["pti_view", "pti"] - }, - { - "name": "windows-debug", - "displayName": "Windows Debug x64 MSVC Build", - "configurePreset": "windows-debug" - }, - { - "name": "windows-release", - "displayName": "Windows Release x64 MSVC Build", - "configurePreset": "windows-release" - }, - { - "name": "windows-icx-debug", - "displayName": "Windows Debug x64 IntelLLVM Build", - "configurePreset": "windows-icx-debug" - }, - { - "name": "windows-icx-release", - "displayName": "Windows Release x64 IntelLLVM Build", - "configurePreset": "windows-icx-release" - }, - { - "name": "windows-icx-reldebuginfo", - "displayName": "Windows Release x64 IntelLLVM Build with Debug Info", - "configurePreset": "windows-icx-reldebuginfo" - }, - { - "name": "windows-cov", - "configurePreset": "windows-cov", - "displayName": "Windows Source-Based Code Coverage Build" - }, - { - "name": "windows-ci-release", - "displayName": "Windows CI Release Build", - "configurePreset": "windows-ci-release" - }, - { - "name": "windows-oneAPI-release", - "configurePreset": "windows-oneAPI-release", - "displayName": "Windows oneAPI Release Build" - }, - { - "name": "windows-ci-debug", - "displayName": "Windows CI Debug Build", - "configurePreset": "windows-ci-debug" - } - ], - "testPresets": [ - { - "name": "linux-icpx-release", - "configurePreset": "linux-icpx-release", - "displayName": "Linux Release x64 IntelLLVM Tests", - "environment": { - "LD_LIBRARY_PATH": "${sourceDir}/build-${presetName}/lib:$penv{LD_LIBRARY_PATH}" - } - }, - { - "name": "linux-clang-release", - "configurePreset": "linux-clang-release", - "displayName": "Linux Release x64 Clang Tests", - "environment": { - "LD_LIBRARY_PATH": "${sourceDir}/build-${presetName}/lib:$penv{LD_LIBRARY_PATH}" - } - }, - { - "name": "linux-dpclang-release", - "configurePreset": "linux-dpclang-release", - "displayName": "Linux Release x64 DPC++ Clang Tests", - "environment": { - "LD_LIBRARY_PATH": "${sourceDir}/build-${presetName}/lib:$penv{LD_LIBRARY_PATH}" - } - }, - { - "name": "linux-icpx-reldebuginfo", - "configurePreset": "linux-icpx-reldebuginfo", - "displayName": "Linux Release x64 IntelLLVM Tests", - "environment": { - "LD_LIBRARY_PATH": "${sourceDir}/build-${presetName}/lib:$penv{LD_LIBRARY_PATH}" - } - }, - { - "name": "linux-icpx-debug", - "configurePreset": "linux-icpx-debug", - "displayName": "Linux Debug x64 IntelLLVM Tests", - "environment": { - "LD_LIBRARY_PATH": "${sourceDir}/build-${presetName}/lib:$penv{LD_LIBRARY_PATH}" - } - }, - { - "name": "linux-clang-debug", - "configurePreset": "linux-clang-debug", - "displayName": "Linux Debug x64 Clang Tests", - "environment": { - "LD_LIBRARY_PATH": "${sourceDir}/build-${presetName}/lib:$penv{LD_LIBRARY_PATH}" - } - }, - { - "name": "linux-dpclang-debug", - "configurePreset": "linux-dpclang-debug", - "displayName": "Linux Debug x64 DPC++ Clang Tests", - "environment": { - "LD_LIBRARY_PATH": "${sourceDir}/build-${presetName}/lib:$penv{LD_LIBRARY_PATH}" - } - }, - { - "name": "linux-cov", - "configurePreset": "linux-cov", - "displayName": "Linux Test With Code Coverage", - "environment": { - "LD_LIBRARY_PATH": "${sourceDir}/build-${presetName}/lib:$penv{LD_LIBRARY_PATH}", - "LLVM_PROFILE_FILE": "${sourceDir}/build-${presetName}/coverage/raw/pti-cov.%p.profraw" - } - }, - { - "name": "linux-icpx-make-release", - "configurePreset": "linux-icpx-make-release", - "displayName": "Linux Release x64 IntelLLVM Tests", - "environment": { - "LD_LIBRARY_PATH": "${sourceDir}/build-${presetName}/lib:$penv{LD_LIBRARY_PATH}" - } - }, - { - "name": "linux-icpx-make-debug", - "configurePreset": "linux-icpx-make-debug", - "displayName": "Linux Debug x64 IntelLLVM Tests", - "environment": { - "LD_LIBRARY_PATH": "${sourceDir}/build-${presetName}/lib:$penv{LD_LIBRARY_PATH}" - } - }, - { - "name": "linux-oneAPI-release", - "configurePreset": "linux-oneAPI-release", - "displayName": "Linux oneAPI x64 Release Tests", - "environment": { - "LD_LIBRARY_PATH": "${sourceDir}/build-${presetName}/lib:$penv{LD_LIBRARY_PATH}" - } - }, - { - "name": "linux-asan", - "configurePreset": "linux-asan", - "displayName": "Linux AddressSanitizer Tests", - "environment": { - "LD_LIBRARY_PATH": "${sourceDir}/build-${presetName}/lib:$penv{LD_LIBRARY_PATH}" - } - }, - { - "name": "linux-fuzz", - "configurePreset": "linux-fuzz", - "displayName": "Linux Fuzz Testing", - "environment": { - "LD_LIBRARY_PATH": "${sourceDir}/build-${presetName}/lib:$penv{LD_LIBRARY_PATH}" - } - }, - { - "name": "linux-tsan", - "configurePreset": "linux-tsan", - "displayName": "Linux ThreadSanitizer Tests", - "environment": { - "LD_LIBRARY_PATH": "${sourceDir}/build-${presetName}/lib:$penv{LD_LIBRARY_PATH}" - } - }, - { - "name": "linux-gxx-release", - "configurePreset": "linux-gxx-release", - "displayName": "Linux gcc/g++ Tests", - "environment": { - "LD_LIBRARY_PATH": "${sourceDir}/build-${presetName}/lib:$penv{LD_LIBRARY_PATH}" - } - }, - { - "name": "windows-icx-debug", - "displayName": "Windows Debug x64 IntelLLVM Test", - "configurePreset": "windows-icx-debug" - }, - { - "name": "windows-icx-release", - "displayName": "Windows Release x64 IntelLLVM Test", - "configurePreset": "windows-icx-release" - }, - { - "name": "windows-icx-reldebuginfo", - "displayName": "Windows Release x64 IntelLLVM Test with Debug Info", - "configurePreset": "windows-icx-reldebuginfo" - }, - { - "name": "windows-cov", - "configurePreset": "windows-cov", - "displayName": "Windows Test With Code Coverage", - "environment": { - "PATH": "${sourceDir}/build-${presetName}/bin;$penv{PATH}", - "LLVM_PROFILE_FILE": "${sourceDir}/build-${presetName}/coverage/raw/pti-cov.%p.profraw" - } - }, - { - "name": "windows-oneAPI-release", - "configurePreset": "windows-oneAPI-release", - "displayName": "Windows oneAPI Release Test" - }, - { - "name": "windows-ci-release", - "displayName": "Windows CI Release Test", - "configurePreset": "windows-ci-release" - }, - { - "name": "windows-ci-debug", - "displayName": "Windows CI Debug Test", - "configurePreset": "windows-ci-debug" - } - ] -} diff --git a/sdk/INSTALL.md b/sdk/INSTALL.md deleted file mode 100644 index 7ced682b..00000000 --- a/sdk/INSTALL.md +++ /dev/null @@ -1,232 +0,0 @@ -# Building and Installation Guide - -This guide provides instructions for building and installing the PTI SDK. - -## Table of Contents - -- [Prerequisites](#prerequisites) -- [Building from Source](#building-from-source) - - [Linux](#linux) - - [Windows](#windows) -- [Installation](#installation) -- [Verification](#verification) -- [Linking PTI SDK in Your Application](#linking-pti-sdk-in-your-application) -- [Troubleshooting](#troubleshooting) - -## Prerequisites - -### Common Requirements - -- **CMake**: Version 3.14 or higher (3.20+ for CMake presets, 3.23+ for Windows tests) -- **Git**: Version 1.8 or higher -- **Ninja**: Version 1.10.1 or higher (optional for Linux, required for Windows) -- **Intel(R) oneAPI Base Toolkit**: See [tested versions](#tested-versions) below -- **Level Zero Loader**: headers version 1.32.0 or higher (downloaded automatically by CMake if not found); version 1.14.0 or higher at runtime - -### Platform-Specific Requirements - -#### Linux -- GCC or Intel C++ Compiler (icpx) -- Make or Ninja build system - -#### Windows -- Visual Studio 2022 or higher -- Ninja build system (version 1.12.1 or higher) -- Intel C++ Compiler (icpx) - -### Tested Versions - -#### Intel(R) oneAPI Base Toolkit - -| Support | Linux | Windows | -| -------- | ------- | ------- | -| Full | 2026.0, 2026.1 | 2026.0 | - -**Note**: Full support indicates regular testing with all features. - -#### Regularly Tested Configurations - -- Ubuntu 22.04 with Intel(R) Data Center GPU Max 1550 -- Ubuntu 22.04 with Intel(R) Data Center GPU Max 1100 -- Ubuntu 24.04 with Intel(R) Data Center GPU Max Series -- Ubuntu 25.10 with Intel(R) Arc(TM) Graphics (A-Series and B-Series) -- Rocky 9 with Intel(R) Data Center GPU Max Series -- Windows 11 with Intel(R) Arc(TM) Graphics (A-Series and B-Series) -- Windows 11 with Intel(R) Data Center GPU Flex Series - -## Building from Source - -### Environment Setup - -**Linux:** -```bash -source /setvars.sh -cd sdk -``` - -**Windows:** -```cmd -call "C:\Program Files (x86)\Intel\oneAPI\setvars-vcvarsall.bat" -call "C:\Program Files (x86)\Intel\oneAPI\setvars.bat" -cd sdk -``` - -### Configure Build - -**Configure build with testing (debug):** -```bash -CC=icx CXX=icpx cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug -``` - -**Configure build with testing (release):** -```bash -CC=icx CXX=icpx cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -``` - -**Note:** The Intel C++ Compiler (icpx) is recommended. You can also build with GCC by omitting the `CC=icx CXX=icpx` prefix. - -### Build - -```bash -cmake --build build --parallel 4 -``` - -## Verification - -### Running Tests - -From the build directory: - -```bash -ctest --test-dir build --output-on-failure -``` - -## Installation - -Most users do not need to install PTI SDK. Installation is only necessary if you want to: - -* Install PTI SDK system-wide or to a custom location -* Use PTI SDK with CMake ``find_package()`` in other projects -* Package PTI SDK for distribution - -From the build directory: - -```bash -cmake --install build --config Release --prefix "../out" -``` - -You can specify a different installation prefix: - -**Linux:** -```bash -cmake --install build --config Release --prefix "/usr/local" -``` - -**Windows:** -```cmd -cmake --install build --config Release --prefix "C:\Program Files\PTI" -``` - -The installation includes: -- Header files in `/include/pti/` -- Library files in `/lib/` -- CMake configuration files in `/lib/cmake/pti/` - -### Running Sample Applications - -**Linux:** -```bash -./build/bin/vector_sq_add -``` - -**Windows:** -```cmd -build\bin\vector_sq_add.exe -``` - -If the sample runs successfully and produces output, your installation is working correctly. - -## Linking PTI SDK in Your Application - -### Using CMake find_package - -Add the following to your `CMakeLists.txt`: - -```cmake -# Set Pti_DIR if you installed in a non-standard location -set(Pti_DIR /lib/cmake/pti) - -# Find the package -find_package(Pti REQUIRED) - -# Link against the pti_view library -target_link_libraries(your_target PUBLIC Pti::pti_view) -``` - -### Manual Linking - -If not using CMake's `find_package`, you can manually specify: - -- **Include directory**: `/include` -- **Library directory**: `/lib` -- **Library to link**: `pti_view` - -Example with g++: - -```bash -g++ -I/include \ - -L/lib \ - -lpti_view \ - your_application.cpp -o your_app -``` - -## Troubleshooting - -### Common Issues - -**CMake cannot find oneAPI components:** -- Ensure you've sourced the oneAPI environment: - - Linux: `source /setvars.sh` - - Windows: Run `\setvars.bat` in cmd - -**Level Zero headers not found:** -- CMake fetches the Level Zero headers when it does not find version >= 1.32.0, so this error means the download failed (for example, an offline build) or an older system Level Zero header set was picked up -- Install Level Zero loader headers >= 1.32.0, or allow network access during configuration -- Ensure oneAPI environment is properly sourced/initialized - -**Build fails with compiler errors:** -- Ensure you're using a supported oneAPI version -- Verify C++17 support is available -- Try deleting the build directory and reconfiguring - -**Windows: Kernel name demangling not available:** -- This is a known limitation on Windows -- Kernel names will appear in mangled form - -### Getting Help - -- Submit issues at: https://github.com/intel/pti-gpu/issues -- Check existing issues and discussions -- Refer to the samples directory for usage examples - -## Additional Build Options - -### Common CMake Options - -- `-DCMAKE_BUILD_TYPE=`: Set build type -- `-DCMAKE_CXX_STANDARD=<17|20>`: Set C++ standard (minimum 17) -- `-DCMAKE_CXX_COMPILER=`: Set C++ compiler (e.g., g++, icpx) -- `-DCMAKE_C_COMPILER=`: Set C compiler (e.g., gcc, icx) -- `-DBUILD_TESTING=`: Enable/disable building tests (default: ON) - - -### PTI Custom Options - -- `-DPTI_BUILD_SAMPLES=`: Enable/disable building samples (default: ON when building as top-level project) -- `-DPTI_BUILD_TESTING=`: Enable/disable building PTI tests (default: ON when building as top-level project) -- `-DPTI_INSTALL=`: Enable/disable library installation when invoking `--install` (default: ON) -- `-DPTI_ENABLE_LOGGING=`: Enable internal logging for PTI (default: OFF) - ---- - -For more information, see the [PTI SDK Documentation](https://intel.github.io/pti-gpu/). diff --git a/sdk/PtiConfig.cmake b/sdk/PtiConfig.cmake deleted file mode 100644 index 2c7f4222..00000000 --- a/sdk/PtiConfig.cmake +++ /dev/null @@ -1,5 +0,0 @@ -# https://cmake.org/cmake/help/latest/guide/importing-exporting/index.html -include("${CMAKE_CURRENT_LIST_DIR}/PtiTargets.cmake") - -include(CMakeFindDependencyMacro) -find_dependency(Threads) diff --git a/sdk/README.md b/sdk/README.md deleted file mode 100644 index d5f1aa32..00000000 --- a/sdk/README.md +++ /dev/null @@ -1,200 +0,0 @@ -# Profiling Tools Interfaces SDK - -## Overview - -This is PTI SDK Proof of Concept. - -**PTI SDK** will be a framework for developing profiling tools for applications built on top of oneAPI and running on Intel XPUs. - -Today **SDK** POC provides *pti_view* library with an API to trace various tasks of application running on Intel GPU. While the library implementation uses low-level tracing APIs of SYCL run-time and Level-Zero, its own API is high level. - -**SDK** POC is being built on the experience of **PTI-GPU** tools and samples and reuses that code with some modification. - -As for the project organization here – SDK folder is self-contained and independent from the rest of repository. - -One of the objectives is to extend functionality of PTI SDK and with the time to transform today’s **PTI-GPU** project to an **SDK**. - - -This project is in active development. We decided to open it at this early stage to benefit from feedback and critisim of interested parties and early adopters. - -## Recent (version 0.7.0) update - -Starting version 0.7.0 **PTI SDK** implements the new functionality of Local collection. It enables starting and stopping collection anytime-anywhere in an application when run on the system with installed Level-Zero runtime supporting [1.9.0 specification](https://spec.oneapi.io/releases/index.html#level-zero-v1-9-0) and higher. - -Local collection functionality is transparent and controlled via `ptiViewEnable` and `ptiViewDisable` calls, where the first `ptiViewEnable` (or several of them) called at any place start the Local collection and the last `ptiViewDisable` (or several of them, paired with preceding `ptiViewEnable` calls) stop the Local collection. -Outside of Local collection regions of interest, PTI SDK maintains zero overhead by not issuing any calls or collecting any data. - -On systems with Level-Zero version lower than 1.9.0 **PTI SDK** still operates as before its version 0.7.0: tracing runtime calls and causing the overhead outside of `ptiViewEnable` - `ptiViewDisable` regions, but reporting data only for `ptiViewEnable` - `ptiViewDisable` regions. - -## Recent (version 0.9.0) update - -- Added function call(s) providing the timestamp and allowing the user to provide - their own timestamp via a callback. -- Windows support added. -- Various bug fixes and improvements. - -## Recent (version 1.1.0) update - -- Preliminary Level Zero native graph support added. - Requires Intel(R) oneAPI icpx 2026.1.1 compiler and Level Zero (compute-runtime) 1.15.39122+12. -- With Level Zero (compute-runtime) 1.15.39122+12 SYCL graph support is also - enabled. To enable SYCL graph support, set environment variables - `NEOReadDebugKeys=1 ExperimentalFlatCommandListApiRecording=1`. (Note: this - limitation is *NOT* a part of Level Zero native graph support. Just legacy - SYCL graph.) - -**Known issues on Windows:** - -- Kernel Name Demangling not present. -- In the current oneAPI release, SYCL runtime records are not present. - -## How to contribute - -At this stage we do not accept pull requests. We will change this soon. - -For now - please, submit issues or start a discussion. - -Please, check [TODO](TODO.md) list. We are aware of many shortcomings and inefficiencies and are working on them. - -## Supported OS - -- Linux -- Windows - -## Regularly Tested Configurations - -- Ubuntu 22.04 with Intel(R) Data Center GPU Max 1550 -- Ubuntu 22.04 with Intel(R) Data Center GPU Max 1100 -- Rocky 8 with Intel(R) Data Center GPU Max 1100 -- Windows 11 with Intel(R) Arc(TM) A380 Graphics - -## Prerequisites - -- [CMake](https://cmake.org/) (version 3.14 and above. For presets, >= 3.20) -- [Git](https://git-scm.com/) (version 1.8 and above) -- [Ninja](https://github.com/ninja-build/ninja) (optional, version >= 1.10.1) -- [Intel(R) oneAPI Base Toolkit](https://software.intel.com/content/www/us/en/develop/tools/oneapi/base-toolkit.html) ([version](#intelr-oneapi-base-toolkit-tested-versions)) -- [Level Zero Loader](https://github.com/oneapi-src/level-zero) (>= 1.14.0 at runtime; building requires headers >= 1.32.0, which CMake downloads if they are not found) - -> **Note:** For the best experience, use a recent Rolling GPU driver ([compute-runtime](https://github.com/intel/compute-runtime/releases)) and Level Zero loader (for reference, PTI 1.2.0 is validated with Level Zero loader 1.32.0 and compute-runtime 26.31.39395.13). Graph profiling and on-demand collection require Rolling drivers. - -### Windows Specific Prerequisites - -- [CMake](https://cmake.org/) (For Windows tests version >= 3.23) -- [Ninja](https://github.com/ninja-build/ninja) (version 1.12.1) -- [Visual Studio 2022](https://visualstudio.microsoft.com/vs/) (Tested with version >= 17.10.3) - -### Intel(R) oneAPI Base Toolkit Tested Version(s) - -| Support | Linux | Windows | -| -------- | ------- | ------- | -| Full | 2026.0, 2026.1 | 2026.0 | - -Full support indicates regular testing with all features. - -## Build - -### Linux - -Build the pti library + tests and samples - -```console ->> source /setvars.sh ->> cd sdk ->> mkdir build ->> cd build ->> cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/icpx_toolchain.cmake .. ->> make -j -``` - -### Windows - -Using the Intel(R) oneAPI cmd and Visual Studio 2022 - -```console -> cd sdk -> mkdir build -> cd build -> cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/icpx_toolchain.cmake -DCMAKE_CXX_FLAGS=/EHcs -> cmake --build . --parallel 4 -``` - -## Sample - -### Linux - -From `build` directory: - -```console ->> ./bin/vec_sqadd -``` - -### Windows - -From `build` directory: - -```console -> bin\vec_sqadd.exe -``` - -## Test - -### Linux - -```console ->> make test -``` - -### Windows - -```console -> ninja test -``` - -## Install - -### Linux - -```console ->> mkdir build ->> cd build ->> cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/icpx_toolchain.cmake -DBUILD_TESTING=OFF .. ->> make -j ->> cmake --install . --config Release --prefix "../out" -``` - -### Windows - -```console -> mkdir build -> cd build -> cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/icpx_toolchain.cmake -> cmake --build . --parallel 4 -> cmake --install . --config Release --prefix "../out" -``` - -## Linking - -### find_package - -```cmake -# set Pti_DIR if you install in a nonstandard location. -set(Pti_DIR /lib/cmake/pti) - -find_package(Pti X.Y.Z) - -target_link_libraries(stuff PUBLIC Pti::pti_view) -``` - -## Usage - -Use the `samples/` as a guide to developing with this library. - -Note: - -- Before `ptiViewEnable()` is called, please define -callbacks and register them with `ptiViewSetCallbacks()`. - ---- - -Intel and the Intel logo are trademarks of Intel Corporation or its subsidiaries in the U.S. and/or other countries. Other names and brands may be claimed as the property of others. diff --git a/sdk/TODO.md b/sdk/TODO.md deleted file mode 100644 index 8b9a2b42..00000000 --- a/sdk/TODO.md +++ /dev/null @@ -1,11 +0,0 @@ -# TODO list for Profiling Tools Interfaces SDK - -1. Make a documentation -2. Clean and optimize View records - - Compact them, e.g., remove redundant fields, compact other fields. - - If decided to keep - make records fields representing context, device etc. - back-end agnostic - - Remove (?) `_process_id` field -3. Clarify and properly define `pti_view_memcpy_type` and `pti_view_memory_type` -4. Change type of _pci_address in all records to numerical. -5. Structurize uuid -- is currently a uint8_t array of PTI_MAX_DEVICE_UUID_SIZE. - diff --git a/sdk/VERSION b/sdk/VERSION deleted file mode 100644 index f0bb29e7..00000000 --- a/sdk/VERSION +++ /dev/null @@ -1 +0,0 @@ -1.3.0 diff --git a/sdk/cmake/Modules/FindDevUtilities.cmake b/sdk/cmake/Modules/FindDevUtilities.cmake deleted file mode 100644 index 100889e0..00000000 --- a/sdk/cmake/Modules/FindDevUtilities.cmake +++ /dev/null @@ -1,72 +0,0 @@ -# Distributed under the OSI-approved BSD 3-Clause License. See accompanying -# file Copyright.txt or https://cmake.org/licensing for details. - -#[=======================================================================[.rst: -FindDevUtilities -------- - -Finds the dpc_common library. This is a library that is part of the standard -oneAPI installation but is not part of a oneAPI component. - -It is a header-only library. This module just finds its include path. - -It is primarily used in the -`oneAPI samples `_ - -Imported Targets -^^^^^^^^^^^^^^^^ - -This module provides the following imported targets, if found: - -``DevUtilities::utils`` - Common samples include path - -Result Variables -^^^^^^^^^^^^^^^^ - -This will define the following variables: - -``DevUtilities_FOUND`` - True if the system has the DevUtilities library. -``DevUtilities_INCLUDE_DIRS`` - Include directories needed to use DevUtilities. - -Cache Variables -^^^^^^^^^^^^^^^ - -The following cache variables may also be set: - -``DevUtilities_INCLUDE_DIR`` - The directory containing ``dpc_common.hpp``. - -#]=======================================================================] - -# Based on tutorial found in CMake manual: -# https://cmake.org/cmake/help/latest/manual/cmake-developer.7.html -find_path( - DevUtilities_INCLUDE_DIR - NAMES dpc_common.hpp - HINTS ENV CPATH - ENV LD_LIBRARY_PATH - ENV CMPLR_ROOT - PATHS /opt/intel/oneapi/dev-utilities - /opt/intel/oneapi/dev-utilities/latest - /opt/intel/oneapi/dev-utilities/linux - "C:/Program Files (x86)/Intel/oneAPI/dev-utilities/latest" - PATH_SUFFIXES include - linux/include) - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args( - DevUtilities - FOUND_VAR DevUtilities_FOUND - REQUIRED_VARS DevUtilities_INCLUDE_DIR) - -if(DevUtilities_FOUND AND NOT TARGET DevUtilities::utils) - add_library(DevUtilities::utils INTERFACE IMPORTED) - set_target_properties( - DevUtilities::utils PROPERTIES INTERFACE_INCLUDE_DIRECTORIES - "${DevUtilities_INCLUDE_DIR}") -endif() - -mark_as_advanced(DevUtilities_INCLUDE_DIR) diff --git a/sdk/cmake/Modules/FindLevelZero.cmake b/sdk/cmake/Modules/FindLevelZero.cmake deleted file mode 100644 index c95ffedd..00000000 --- a/sdk/cmake/Modules/FindLevelZero.cmake +++ /dev/null @@ -1,136 +0,0 @@ -# Distributed under the OSI-approved BSD 3-Clause License. See accompanying -# file Copyright.txt or https://cmake.org/licensing for details. - -#[=======================================================================[.rst: -FindLevelZero -------- - -Finds the LevelZero library. - -Imported Targets -^^^^^^^^^^^^^^^^ - -This module provides the following imported targets, if found: - -``LevelZero::level-zero`` - Level Zero library -``LevelZero::headers`` - Level Zero Headers - -Result Variables -^^^^^^^^^^^^^^^^ - -This will define the following variables: - -``LevelZero_FOUND`` - True if the system has the LevelZero library. -``LevelZero_INCLUDE_DIRS`` - Include directories needed to use LevelZero. - -Cache Variables -^^^^^^^^^^^^^^^ - -The following cache variables may also be set: - -``LevelZero_INCLUDE_DIR`` - The directory containing ``level_zero/ze_api.h``. -``LevelZero_LIBRARY`` - The path to the LevelZero library. - -#]=======================================================================] - -# Based on tutorial found in CMake manual: -# https://cmake.org/cmake/help/latest/manual/cmake-developer.7.html - -# Level Zero provides -# * libze_loader.pc -find_package(PkgConfig) -pkg_check_modules(PC_ze_loader QUIET libze_loader) - -find_path( - LevelZero_INCLUDE_DIR - NAMES level_zero/ze_api.h - HINTS ENV CPATH - ${PC_ze_loader_INCLUDE_DIRS} - ${PC_ze_loader_INCLUDEDIR} - PATHS ${CMAKE_INCLUDE_PATH} - ENV LEVEL_ZERO_V1_SDK_PATH - PATH_SUFFIXES include -) - -find_library( - LevelZero_LIBRARY - NAMES ze_loader - HINTS ENV LIBRARY_PATH - ${PC_ze_loader_LIBRARY_DIRS} - ${PC_ze_loader_LIBDIR} - PATHS ${CMAKE_LIBRARY_PATH} - ENV LEVEL_ZERO_V1_SDK_PATH - ENV LD_LIBRARY_PATH - PATH_SUFFIXES lib -) - -get_filename_component(LevelZero_LIBRARY_DIR ${LevelZero_LIBRARY} DIRECTORY) -# AFAIK, version can only be found via pc file. This is part of a regular level -# zero install. -find_path( - LevelZero_PkgConfig_DIR - NAMES libze_loader.pc - HINTS ${LevelZero_LIBRARY_DIR} - PATH_SUFFIXES pkgconfig - lib/pkgconfig - lib/${CMAKE_LIBRARY_ARCHITECTURE}/pkgconfig - ${CMAKE_LIBRARY_ARCHITECTURE}/pkgconfig - lib64/pkgconfig - lib64/${CMAKE_LIBRARY_ARCHITECTURE}/pkgconfig - NO_CMAKE_PATH - NO_CMAKE_ENVIRONMENT_PATH - NO_SYSTEM_ENVIRONMENT_PATH - NO_CMAKE_SYSTEM_PATH -) - -if(LevelZero_PkgConfig_DIR) - file(READ "${LevelZero_PkgConfig_DIR}/libze_loader.pc" LevelZero_PkgConfig) - string(REGEX MATCH "[0-9]+\\.[0-9]+\\.[0-9]+" LEVEL_ZERO_VER_FOUND "${LevelZero_PkgConfig}") - set(LevelZero_VERSION ${LEVEL_ZERO_VER_FOUND}) -endif() - -# On Windows, the driver installs a version of the loader sdk without pc file. -# However, the version can be found in the path to the .lib. The pc file is -# present when downloading the sdk from GitHub releases: -# https://github.com/oneapi-src/level-zero/releases -if(NOT DEFINED LevelZero_VERSION AND WIN32) - string(REGEX MATCH "[0-9]+\\.[0-9]+\\.[0-9]+" LEVEL_ZERO_VER_FOUND "${LevelZero_LIBRARY_DIR}") - if (DEFINED LEVEL_ZERO_VER_FOUND AND NOT LEVEL_ZERO_VER_FOUND STREQUAL "") - set(LevelZero_VERSION ${LEVEL_ZERO_VER_FOUND}) - endif() -endif() - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args( - LevelZero - FOUND_VAR LevelZero_FOUND - REQUIRED_VARS LevelZero_INCLUDE_DIR - VERSION_VAR LevelZero_VERSION) - -if(LevelZero_FOUND AND NOT TARGET LevelZero::level-zero) - add_library(LevelZero::level-zero UNKNOWN IMPORTED) - set_target_properties( - LevelZero::level-zero - PROPERTIES IMPORTED_LOCATION "${LevelZero_LIBRARY}" - INTERFACE_COMPILE_OPTIONS "${PC_ze_loader_CFLAGS_OTHER}" - INTERFACE_INCLUDE_DIRECTORIES "${LevelZero_INCLUDE_DIR}") -endif() - -if(LevelZero_FOUND AND NOT TARGET LevelZero::headers) - add_library(LevelZero::headers INTERFACE IMPORTED) - set_target_properties( - LevelZero::headers - PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${LevelZero_INCLUDE_DIR}") -endif() - -mark_as_advanced(LevelZero_INCLUDE_DIR LevelZero_LIBRARY) - -if(DEFINED LevelZero_VERSION) - set(LevelZero_VERSION_STRING ${LevelZero_VERSION}) -endif() diff --git a/sdk/cmake/Modules/FindXpti.cmake b/sdk/cmake/Modules/FindXpti.cmake deleted file mode 100644 index e03f6ae3..00000000 --- a/sdk/cmake/Modules/FindXpti.cmake +++ /dev/null @@ -1,217 +0,0 @@ -# Distributed under the OSI-approved BSD 3-Clause License. See accompanying -# file Copyright.txt or https://cmake.org/licensing for details. - -#[=======================================================================[.rst: -FindXpti -------- - -Finds the Xpti library. Xpti is part of the Intel/LLVM project. It is also -included as part of the standard oneAPI installation. - -`Intel/LLVM `_ - -Further documentation on linking and using XPTI can be found here: -https://github.com/intel/llvm/blob/sycl/xptifw/doc/XPTI_Framework.md. - -Imported Targets -^^^^^^^^^^^^^^^^ - -This module provides the following imported targets, if found: - -``Xpti::xpti`` - XPTI shared -``Xpti::xpti_static`` - XPTI static - -Result Variables -^^^^^^^^^^^^^^^^ - -This will define the following variables: - -``Xpti_FOUND`` - True if the system has the Xpti library. -``Xpti_INCLUDE_DIRS`` - Include directories needed to use Xpti. - -Cache Variables -^^^^^^^^^^^^^^^ - -The following cache variables may also be set: - -``Xpti_INCLUDE_DIR`` - The directory containing ``xpti_trace_framework.h``. -``Xpti_Static_LIBRARY`` - The path to the Xpti static library. -``Xpti_Shared_LIBRARY`` - The path to the Xpti shared library. - -#]=======================================================================] - -# Based on tutorial found in CMake manual: -# https://cmake.org/cmake/help/latest/manual/cmake-developer.7.html - -find_path( - Xpti_INCLUDE_DIR - NAMES xpti/xpti_trace_framework.h - HINTS ENV CPLUS_INCLUDE_PATH - ENV C_INCLUDE_PATH - ENV CPATH - ENV INCLUDE - ENV CMPLR_ROOT - PATH_SUFFIXES include linux/include) - -find_library( - Xpti_Static_LIBRARY - NAMES xpti - HINTS ENV CMPLR_ROOT ENV LIBRARY_PATH - PATH_SUFFIXES lib linux/lib) - -find_library( - Xpti_Shared_LIBRARY - NAMES xptifw - HINTS ENV LIBRARY_PATH - ENV LD_LIBRARY_PATH - ENV LIB - ENV CMPLR_ROOT - PATH_SUFFIXES lib linux/lib) - -if(WIN32) -find_library( - Xpti_Static_Debug_LIBRARY - NAMES xptid - HINTS ENV LIB ENV CMPLR_ROOT ENV LIBRARY_PATH - PATH_SUFFIXES lib linux/lib) - -find_library( - Xpti_Shared_Debug_LIBRARY - NAMES xptifwd - HINTS ENV LIB ENV CMPLR_ROOT ENV LIBRARY_PATH - PATH_SUFFIXES lib linux/lib) - -find_file( - Xpti_Shared_Runtime_LIBRARY - NAMES xptifw.dll - HINTS ENV PATH ENV CMPLR_ROOT ENV LIBRARY_PATH - PATH_SUFFIXES bin windows/bin) - -find_file( - Xpti_Shared_Debug_Runtime_LIBRARY - NAMES xptifwd.dll - HINTS ENV PATH ENV CMPLR_ROOT ENV LIBRARY_PATH - PATH_SUFFIXES bin windows/bin) -endif() - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args( - Xpti - FOUND_VAR Xpti_FOUND - REQUIRED_VARS Xpti_Shared_LIBRARY Xpti_INCLUDE_DIR) - -if(Xpti_FOUND AND NOT TARGET Xpti::xpti) - add_library(Xpti::xpti SHARED IMPORTED) - set_target_properties( - Xpti::xpti - PROPERTIES IMPORTED_LOCATION "${Xpti_Shared_LIBRARY}" - INTERFACE_COMPILE_DEFINITIONS - "XPTI_API_EXPORTS;XPTI_CALLBACK_API_EXPORTS" - INTERFACE_INCLUDE_DIRECTORIES "${Xpti_INCLUDE_DIR}") - if(WIN32) - set_target_properties( - Xpti::xpti - PROPERTIES RUNTIME_OUTPUT_NAME "xptifw.dll" - RUNTIME_OUTPUT_NAME_RELEASE "xptifw.dll" - RUNTIME_OUTPUT_NAME_DEBUG "xptifwd.dll") - endif() - - if(UNIX) - set_target_properties( - Xpti::xpti - PROPERTIES RUNTIME_OUTPUT_NAME "libxptifw.so" - RUNTIME_OUTPUT_NAME_RELEASE "libxptifw.so" - RUNTIME_OUTPUT_NAME_DEBUG "libxptifw.so") - endif() - - # Just a guess, not actually supported. - if(APPLE) - set_target_properties( - Xpti::xpti - PROPERTIES RUNTIME_OUTPUT_NAME "libxptifw.dylib" - RUNTIME_OUTPUT_NAME_RELEASE "libxptifw.dylib" - RUNTIME_OUTPUT_NAME_DEBUG "libxptifw.dylib") - endif() - - if(WIN32) - # Since XPTI on Windows supports multiple configurations (Debug and Release) - # we should handle both those cases. - # Note the difference between IMPORTED_IMPLIB and IMPORTED_LOCATION. On - # Windows, IMPORTED_IMPLIB should be the .lib file and IMPORTED_LOCATION - # should be the .dll file for SHARED libraries. - if(Xpti_Shared_LIBRARY) - set_property( - TARGET Xpti::xpti - APPEND - PROPERTY IMPORTED_CONFIGURATIONS RELEASE) - set_target_properties(Xpti::xpti PROPERTIES IMPORTED_IMPLIB - "${Xpti_Shared_LIBRARY}" - IMPORTED_IMPLIB_RELEASE - "${Xpti_Shared_LIBRARY}") - if(Xpti_Shared_Runtime_LIBRARY) - set_target_properties( - Xpti::xpti - PROPERTIES IMPORTED_LOCATION "${Xpti_Shared_Runtime_LIBRARY}" - IMPORTED_LOCATION_RELEASE "${Xpti_Shared_Runtime_LIBRARY}") - endif() - endif() - - if(Xpti_Shared_Debug_LIBRARY) - set_property( - TARGET Xpti::xpti - APPEND - PROPERTY IMPORTED_CONFIGURATIONS DEBUG) - set_target_properties( - Xpti::xpti PROPERTIES IMPORTED_IMPLIB_DEBUG - "${Xpti_Shared_Debug_LIBRARY}") - if(Xpti_Shared_Debug_Runtime_LIBRARY) - set_target_properties( - Xpti::xpti PROPERTIES IMPORTED_LOCATION_DEBUG - "${Xpti_Shared_Debug_Runtime_LIBRARY}") - endif() - endif() - endif() -endif() - -if(Xpti_FOUND AND NOT TARGET Xpti::xpti_static) - add_library(Xpti::xpti_static STATIC IMPORTED) - set_target_properties( - Xpti::xpti_static - PROPERTIES IMPORTED_LOCATION "${Xpti_Static_LIBRARY}" - INTERFACE_COMPILE_DEFINITIONS "XPTI_STATIC_LIBRARY" - INTERFACE_INCLUDE_DIRECTORIES "${Xpti_INCLUDE_DIR}") - if(WIN32) - if(Xpti_Static_LIBRARY) - set_property( - TARGET Xpti::xpti_static - APPEND - PROPERTY IMPORTED_CONFIGURATIONS RELEASE) - set_target_properties( - Xpti::xpti_static - PROPERTIES IMPORTED_IMPLIB "${Xpti_Static_LIBRARY}" - IMPORTED_IMPLIB_RELEASE "${Xpti_Static_LIBRARY}" - IMPORTED_LOCATION "${Xpti_Static_LIBRARY}" - IMPORTED_LOCATION_RELEASE "${Xpti_Static_LIBRARY}") - endif() - - if(Xpti_Static_Debug_LIBRARY) - set_property( - TARGET Xpti::xpti_static - APPEND - PROPERTY IMPORTED_CONFIGURATIONS DEBUG) - set_target_properties( - Xpti::xpti_static - PROPERTIES IMPORTED_IMPLIB_DEBUG "${Xpti_Static_Debug_LIBRARY}" - IMPORTED_LOCATION_DEBUG "${Xpti_Static_Debug_LIBRARY}") - endif() - endif() -endif() - -mark_as_advanced(Xpti_INCLUDE_DIR Xpti_Static_LIBRARY Xpti_Shared_LIBRARY) diff --git a/sdk/cmake/Modules/Findunified-runtime.cmake b/sdk/cmake/Modules/Findunified-runtime.cmake deleted file mode 100644 index 4c105606..00000000 --- a/sdk/cmake/Modules/Findunified-runtime.cmake +++ /dev/null @@ -1,101 +0,0 @@ -# Distributed under the OSI-approved BSD 3-Clause License. See accompanying -# file Copyright.txt or https://cmake.org/licensing for details. - -#[=======================================================================[.rst: -Findunified-runtime -------- - -Imported Targets -^^^^^^^^^^^^^^^^ - -This module provides the following imported targets, if found: - -``unified-runtime::loader`` - ur_loader.so - -Result Variables -^^^^^^^^^^^^^^^^ - -This will define the following variables: - -``unified-runtime_FOUND`` - True if the system has the Ur library. -``unified-runtime_INCLUDE_DIRS`` - Include directories needed to use Ur. - -Cache Variables -^^^^^^^^^^^^^^^ - -The following cache variables may also be set: - -``unified-runtime_INCLUDE_DIR`` - The directory containing ``sycl/ur_api.h``. -``unified-runtime_LIBRARY`` -The path to the Unified Runtime library. - -#]=======================================================================] - -# Based on tutorial found in CMake manual: -# https://cmake.org/cmake/help/latest/manual/cmake-developer.7.html - -# -# Note about PATHS: -# -# These are specifically hardcoded fallbacks. -# -# * `/opt/intel/oneapi/compiler/latest` - common oneAPI installation location on -# Linux. -# * `/opt/sycl` - Intel/LLVM open-source compiler container installation location -# on Linux. -# -find_library( - unified-runtime_LIBRARY - NAMES ur_loader - HINTS ENV LIBRARY_PATH - ENV LD_LIBRARY_PATH - ENV LIB - ENV CMPLR_ROOT - PATHS /opt/intel/oneapi/compiler/latest - /opt/intel/oneapi/compiler/latest/linux - /opt/sycl - PATH_SUFFIXES lib - linux/lib -) - -if(unified-runtime_LIBRARY) - # Get the root directory of the unified-runtime installation. This will help - # us find the include directory, given some versions of the compiler do not - # have an environment variable pointing to the installation root. - get_filename_component(UNIFIED_RUNTIME_LIB_DIR "${unified-runtime_LIBRARY}" DIRECTORY) - get_filename_component(UNIFIED_RUNTIME_ROOT_DIR "${UNIFIED_RUNTIME_LIB_DIR}" DIRECTORY) -endif() - -find_path( - unified-runtime_INCLUDE_DIR -# the file order seems impacts if it finds UR in the dir under CMPLR_ROOT - NAMES ur_api.h sycl/ur_api.h - HINTS ${UNIFIED_RUNTIME_ROOT_DIR} - ENV CPATH - ENV C_INCLUDE_PATH - ENV CPLUS_INCLUDE_PATH - ENV INCLUDE - ENV CMPLR_ROOT - PATH_SUFFIXES include - linux/include -) - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args( - unified-runtime - FOUND_VAR unified-runtime_FOUND - REQUIRED_VARS unified-runtime_LIBRARY unified-runtime_INCLUDE_DIR) - -if(unified-runtime_FOUND AND NOT TARGET unified-runtime::loader) - add_library(unified-runtime::loader UNKNOWN IMPORTED) - set_target_properties( - unified-runtime::loader - PROPERTIES IMPORTED_LOCATION "${unified-runtime_LIBRARY}" - INTERFACE_INCLUDE_DIRECTORIES "${unified-runtime_INCLUDE_DIR}") -endif() - -mark_as_advanced(unified-runtime_INCLUDE_DIR unified-runtime_LIBRARY) diff --git a/sdk/cmake/Modules/macros.cmake b/sdk/cmake/Modules/macros.cmake deleted file mode 100644 index 2d6dc2d4..00000000 --- a/sdk/cmake/Modules/macros.cmake +++ /dev/null @@ -1,705 +0,0 @@ -set(PTI_CMAKE_MACRO_DIR ${CMAKE_CURRENT_LIST_DIR}/../.. CACHE INTERNAL "") - -include(${PTI_CMAKE_MACRO_DIR}/cmake/dependency_pins.cmake) - -macro(RequirePythonInterp) - if(NOT DEFINED _Python_EXECUTABLE OR NOT TARGET Python::Interpreter) - find_package(Python COMPONENTS Interpreter REQUIRED) - set(PYTHON_EXECUTABLE "${Python_EXECUTABLE}") - else() - set(PYTHON_EXECUTABLE "${_Python_EXECUTABLE}") - endif() -endmacro() - -macro(SetPtiVersion) - file(STRINGS "${PTI_CMAKE_MACRO_DIR}/VERSION" PTI_VERSION) - set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS - "${PTI_CMAKE_MACRO_DIR}/VERSION") -endmacro() - -macro(SetBuildType) - if(NOT CMAKE_BUILD_TYPE) - set(CMAKE_BUILD_TYPE "Release") - endif() - message(STATUS "Build Type: ${CMAKE_BUILD_TYPE}") - - if(CMAKE_SIZEOF_VOID_P EQUAL 8) - message(STATUS "Bitness: 64 bits") - else() - message(FATAL_ERROR "32-bit mode is not supported") - endif() -endmacro() - -macro(FindTracedLibrariesHeaderPaths TARGET L0_GEN_SCRIPT GEN_FILE_NAME custom_target L0_TARGET) - RequirePythonInterp() - - # Use the target that links level zero to find the level zero library - get_target_property(L0_TARGET_PATH ${L0_TARGET} INTERFACE_INCLUDE_DIRECTORIES) - - # HINTS before PATHS - find_path(L0_INC_PATH - NAMES level_zero/ze_api.h - HINTS ${L0_TARGET_PATH} - PATHS ENV CPATH) - if (NOT L0_INC_PATH) - message(FATAL_ERROR - "Level Zero headers path is not found.\n" - "You may need to install oneAPI Level Zero Driver to fix this issue.") - else() - message(STATUS "Level Zero headers are found at ${L0_INC_PATH}") - endif() - - set(L0_GEN_INC_PATH "${PROJECT_BINARY_DIR}") - if (NOT TARGET unified-runtime::loader) - find_package(unified-runtime) - endif() - - # Fake file path until we stop generating code on each build. - set(UR_HEADER_PATH "${PROJECT_SOURCE_DIR}/third-party/unified-runtime/include/unified-runtime/ur_api.h") - if (TARGET unified-runtime::loader) - get_target_property(UR_HEADER_PATH unified-runtime::loader INTERFACE_INCLUDE_DIRECTORIES) - endif() - - add_custom_target(${custom_target} ALL - DEPENDS ${L0_GEN_INC_PATH}/${GEN_FILE_NAME}) - string(CONCAT PTI_LEVELZERO_COMMIT_INFO "commit: " ${PTI_LEVELZERO_COMMIT} " - v" ${PTI_LEVELZERO_VERSION}) - add_custom_command(OUTPUT ${L0_GEN_INC_PATH}/${GEN_FILE_NAME} - COMMAND "${PYTHON_EXECUTABLE}" ${L0_GEN_SCRIPT} - ${L0_GEN_INC_PATH} "${L0_INC_PATH}/level_zero" - "${PROJECT_BINARY_DIR}" "${PROJECT_SOURCE_DIR}/include/pti" ${UR_HEADER_PATH} ${PTI_API_ID_REGENERATE} ${PTI_LEVELZERO_COMMIT_INFO} - DEPENDS ${L0_GEN_SCRIPT}) - target_include_directories(${TARGET} - PUBLIC "$") - add_dependencies(${TARGET} - ${custom_target}) -endmacro() - -macro(CheckIfSyclIsAvailable) - include(CheckCXXCompilerFlag) - include(CheckIncludeFileCXX) - CHECK_CXX_COMPILER_FLAG("-fsycl" HAVE_SYCL) - - if(HAVE_SYCL) - CHECK_INCLUDE_FILE_CXX("sycl/sycl.hpp" SYCL_IS_AVAILABLE "-fsycl") - if(NOT SYCL_IS_AVAILABLE) - set(HAVE_SYCL NO) - else() - message(STATUS "Able to compile sycl code. All samples will be built.") - endif() - endif() - - if(NOT HAVE_SYCL) - message( - STATUS - "Not able to compile sycl code. Some tests may not run and some samples may not be built." - ) - endif() -endmacro() - -macro(GetSpdlog) - if(NOT TARGET spdlog::spdlog) - find_package(spdlog ${PTI_SPDLOG_VERSION} QUIET) - endif() - - if(NOT TARGET spdlog::spdlog) - include(FetchContent) - FetchContent_Declare( - fmt - GIT_REPOSITORY ${PTI_FMT_REPOSITORY} - GIT_TAG ${PTI_FMT_COMMIT} - ) - FetchContent_Declare( - spdlog - GIT_REPOSITORY ${PTI_SPDLOG_REPOSITORY} - GIT_TAG ${PTI_SPDLOG_COMMIT} - ) - set(FMT_SYSTEM_HEADERS - ON - CACHE BOOL "" FORCE) - set(FMT_INSTALL - OFF - CACHE BOOL "" FORCE) - set(SPDLOG_BUILD_SHARED - OFF - CACHE BOOL "" FORCE) - set(SPDLOG_BUILD_PIC - ON - CACHE BOOL "" FORCE) - set(SPDLOG_FMT_EXTERNAL_HO - ON - CACHE BOOL "" FORCE) - set(SPDLOG_SYSTEM_INCLUDES - ON - CACHE BOOL "" FORCE) - set(SPDLOG_BUILD_WARNINGS - OFF - CACHE BOOL "" FORCE) - FetchContent_MakeAvailable(fmt spdlog) - - # To keep macro self contained. - if (NOT DEFINED PTI_INTEL_LLVM_EXCLUDE_LIBS) - set(PTI_INTEL_LLVM_EXCLUDE_LIBS - $<$,$>:-no-intel-lib> - $<$,$>:/Qno-intel-lib>) - endif() - - set(PTI_FMT_COMPILE_OPTIONS - $<$:/wd6285 /wd6294 /wd6240 /wd6031 - $<$:/wd4702 /wd6385 - >> - ) - - # Prevent fmt from using exceptions because it could throw while logging. - # Disable warning in fmt due to our usage of EHsc. - set(PTI_FMT_COMPILE_DEFINITIONS - FMT_USE_EXCEPTIONS=0 - ) - - # spdlog sets the /MP flag on MSVC which causes a warning on icx. - set(PTI_SPDLOG_COMPILE_OPTIONS - $<$:-Wno-unused-command-line-argument> - ) - - target_compile_definitions(fmt PRIVATE ${PTI_FMT_COMPILE_DEFINITIONS}) - target_compile_options(fmt PRIVATE ${PTI_FMT_COMPILE_OPTIONS} ${PTI_INTEL_LLVM_EXCLUDE_LIBS}) - target_link_options(fmt PRIVATE ${PTI_INTEL_LLVM_EXCLUDE_LIBS}) - - target_compile_definitions(fmt-header-only INTERFACE - ${PTI_FMT_COMPILE_DEFINITIONS}) - target_compile_options(fmt-header-only INTERFACE ${PTI_FMT_COMPILE_OPTIONS}) - - target_compile_options(spdlog PRIVATE ${PTI_SPDLOG_COMPILE_OPTIONS} ${PTI_INTEL_LLVM_EXCLUDE_LIBS}) - target_link_options(spdlog PRIVATE ${PTI_INTEL_LLVM_EXCLUDE_LIBS}) - endif() -endmacro() - -macro(GetGTest) - # TODO(PTI): Use FetchContent find_package mode when we bump minimum CMake - # version to 3.24 or higher. - if(NOT TARGET GTest::gtest - OR NOT TARGET GTest::gtest_main - OR NOT TARGET GTest::gmock - OR NOT TARGET GTest::gmock_main) - find_package(GTest QUIET) - endif() - - if(NOT TARGET GTest::gtest - OR NOT TARGET GTest::gtest_main - OR NOT TARGET GTest::gmock - OR NOT TARGET GTest::gmock_main) - if(TARGET GTest::gtest AND NOT TARGET GTest::gmock) - message(FATAL_ERROR "GTest/GMock mismatch. Uninstall GTest or ensure GMock is available (e.g., install libgmock-dev on Ubuntu)") - endif() - if(TARGET GTest::gmock AND NOT TARGET GTest::gmock) - message(FATAL_ERROR "GTest/GMock mismatch. Uninstall GMock or ensure GTest is available (e.g., install libgtest-dev on Ubuntu)") - endif() - include(FetchContent) - FetchContent_Declare( - googletest - GIT_REPOSITORY ${PTI_GOOGLETEST_REPOSITORY} - GIT_TAG ${PTI_GOOGLETEST_COMMIT} - ) - - set(INSTALL_GTEST - OFF - CACHE BOOL "" FORCE) - set(gtest_force_shared_crt - ON - CACHE BOOL "" FORCE) - FetchContent_MakeAvailable(googletest) - - set(PTI_GTEST_COMPILE_OPTIONS - $<$,$>: - -Wno-deprecated-declarations - -Wno-character-conversion - -Wno-unknown-warning-option - > - $<$:/wd6239 /wd6031 /wd6387> - ) - - set_target_properties(gmock_main gmock gtest gtest_main - PROPERTIES - COMPILE_OPTIONS "${PTI_GTEST_COMPILE_OPTIONS}") - endif() -endmacro() - -macro(CheckSOVersion PROJ_SOVERSION) - # Not automatically set because this should be done intentionally. - # PTI's rules for backwards compatibility should be re-evaluated upon first - # major / production release. - # PTI is following [semver](https://semver.org/) versioning and we are using - # the SOVERSION to denote backward compatibility. - if ("${PROJECT_VERSION}" VERSION_GREATER_EQUAL "1.0.0") - if("${PROJ_SOVERSION}" STREQUAL "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}") - message(AUTHOR_WARNING "${PROJECT_NAME} currently has the SOVERSION: " - "${PROJ_SOVERSION}. After the first major release, ${PROJECT_NAME}" - " should have the SOVERSION: ${PROJECT_VERSION_MAJOR}.") - endif() - endif() -endmacro() - -macro(get_itt) - if (NOT TARGET ittapi::ittnotify OR NOT TARGET ittapi::headers) - include(FetchContent) - FetchContent_Declare( - ittapi - GIT_REPOSITORY ${PTI_ITTAPI_REPOSITORY} - GIT_TAG ${PTI_ITTAPI_COMMIT} - ) - - set(ITT_API_INSTALL OFF CACHE BOOL "ITT is statically linked - avoid install" FORCE) - FetchContent_MakeAvailable(ittapi) - - target_compile_options(ittnotify PRIVATE - $<$:-Wno-strict-prototypes> - $<$:-Wno-strict-prototypes> - $<$:-Wno-pedantic> - ) - - target_compile_options(jitprofiling PRIVATE - $<$:-Wno-strict-prototypes> - $<$:-Wno-strict-prototypes> - $<$:-Wno-pedantic> - ) - - # Allow rolling back to older versions of ITT without breaking the build. - # One can remove later. - if (TARGET ittnotify AND NOT TARGET ittapi::ittnotify) - add_library(ittapi::ittnotify ALIAS ittnotify) - endif() - - if (NOT TARGET ittapi::headers) - add_library(ittapi::headers INTERFACE IMPORTED) - set_target_properties( - ittapi::headers - PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${ittapi_SOURCE_DIR}/include;${ittapi_SOURCE_DIR}/src/ittnotify") - endif() - endif() -endmacro() - -macro(RemoveNDebugFlag) - if(CMAKE_CXX_COMPILER_ID MATCHES "IntelLLVM" OR CMAKE_CXX_COMPILER_ID MATCHES - "Clang") - # One must make sure -DNDEBUG is not set if using XPTI filename/linenumber - # https://stackoverflow.com/questions/22140520/how-to-enable-assert-in-cmake-release-mode - string(REPLACE "-DNDEBUG" "" CMAKE_CXX_FLAGS_RELEASE - "${CMAKE_CXX_FLAGS_RELEASE}") - string(REPLACE "-DNDEBUG" "" CMAKE_CXX_FLAGS_RELWITHDEBINFO - "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}") - endif() -endmacro() - -macro(ProjectIsTopLevel) - if(NOT DEFINED PROJECT_IS_TOP_LEVEL) - set(PROJECT_IS_TOP_LEVEL FALSE) - get_property(PTI_PROJ_PARENT DIRECTORY PROPERTY PARENT_DIRECTORY) - if(PTI_PROJ_PARENT STREQUAL "") - set(PROJECT_IS_TOP_LEVEL TRUE) - endif() - endif() -endmacro() - -macro(AddApiGenTarget L0_GEN_SCRIPT GEN_FILE_NAME L0_TARGET) - RequirePythonInterp() - - # Use the target that links level zero to find the level zero library - if(TARGET LevelZero::level-zero) - get_target_property(L0_TARGET_PATH ${L0_TARGET} INTERFACE_INCLUDE_DIRECTORIES) - include(CMakePrintHelpers) - cmake_print_variables(PTI_LEVELZERO_VERSION PTI_LEVELZERO_COMMIT L0_TARGET_PATH) - endif() - - # HINTS before PATHS - find_path(L0_INC_PATH - NAMES level_zero/ze_api.h - HINTS ${L0_TARGET_PATH} - PATHS ENV CPATH) - if (NOT L0_INC_PATH) - message(FATAL_ERROR - "Level Zero headers path is not found.\n" - "You may need to install oneAPI Level Zero Driver to fix this issue.") - else() - message(STATUS "Level Zero headers are found at ${L0_INC_PATH}") - endif() - - set(L0_GEN_INC_PATH "${PROJECT_BINARY_DIR}") - if (NOT TARGET unified-runtime::loader) - find_package(unified-runtime) - endif() - - # Temporary until we remove UR build dependency. - set(UR_HEADER_PATH "${PROJECT_SOURCE_DIR}/third-party/unified-runtime/include/unified-runtime/ur_api.h") - if (TARGET unified-runtime::loader) - get_target_property(UR_HEADER_PATH unified-runtime::loader INTERFACE_INCLUDE_DIRECTORIES) - endif() - - string(CONCAT PTI_LEVELZERO_COMMIT_INFO "commit: " ${PTI_LEVELZERO_COMMIT} " - v" ${PTI_LEVELZERO_VERSION}) - add_custom_target(generate-ids - DEPENDS ${L0_GEN_INC_PATH}/${GEN_FILE_NAME} - COMMAND "${PYTHON_EXECUTABLE}" ${L0_GEN_SCRIPT} - ${L0_GEN_INC_PATH} "${L0_INC_PATH}/level_zero" - "${PROJECT_BINARY_DIR}" "${PROJECT_SOURCE_DIR}/include/pti" ${UR_HEADER_PATH} "ON" ${PTI_LEVELZERO_COMMIT_INFO}) -endmacro() - -macro(AddFormatTarget) - find_program(CLANG_FORMAT_EXE clang-format) - find_program(RUFF_FORMAT_EXE ruff) - - add_custom_target(format) - add_custom_target(format-chk) - - cmake_policy(PUSH) - cmake_policy(SET CMP0009 NEW) - file(GLOB_RECURSE cf_src_files CONFIGURE_DEPENDS "${PROJECT_SOURCE_DIR}/src/*.cc" - "${PROJECT_SOURCE_DIR}/src/*.h" - "${PROJECT_SOURCE_DIR}/src/**/*.h" - "${PROJECT_SOURCE_DIR}/src/**/*.cc" - "${PROJECT_SOURCE_DIR}/test/*.cc" - "${PROJECT_SOURCE_DIR}/test/*.h" - "${PROJECT_SOURCE_DIR}/test/**/*.h" - "${PROJECT_SOURCE_DIR}/test/**/*.cc" - "${PROJECT_SOURCE_DIR}/samples/*.cc" - "${PROJECT_SOURCE_DIR}/samples/*.h" - "${PROJECT_SOURCE_DIR}/samples/**/*.h" - "${PROJECT_SOURCE_DIR}/samples/**/*.cc" - "${PROJECT_SOURCE_DIR}/samples/**/*.c") - - list(FILTER cf_src_files EXCLUDE REGEX - "^${PROJECT_SOURCE_DIR}/(build|samples/(dlworkload|iso3d))") - - add_custom_target(format-cpp - COMMAND ${CLANG_FORMAT_EXE} -i ${cf_src_files} - VERBATIM COMMAND_EXPAND_LISTS USES_TERMINAL) - - add_custom_target(format-cpp-chk - COMMAND ${CLANG_FORMAT_EXE} --dry-run --Werror ${cf_src_files} - VERBATIM COMMAND_EXPAND_LISTS USES_TERMINAL) - - add_dependencies(format format-cpp) - add_dependencies(format-chk format-cpp-chk) - - if(RUFF_FORMAT_EXE) - list(APPEND py_src_dirs "${PROJECT_SOURCE_DIR}/cmake" - "${PROJECT_SOURCE_DIR}/src" - "${PROJECT_SOURCE_DIR}/test" - "${PROJECT_SOURCE_DIR}/samples") - file(GLOB py_src_dirs_cur "${PROJECT_SOURCE_DIR}/*.py") - set(py_src_dirs ${py_src_dirs} ${py_src_dirs_cur}) - add_custom_target(format-py - COMMAND ${RUFF_FORMAT_EXE} format ${py_src_dirs} - VERBATIM COMMAND_EXPAND_LISTS USES_TERMINAL) - - add_custom_target(format-py-chk - COMMAND ${RUFF_FORMAT_EXE} format --check ${py_src_dirs} - VERBATIM COMMAND_EXPAND_LISTS USES_TERMINAL) - - add_dependencies(format format-py) - add_dependencies(format-chk format-py-chk) - unset(py_src_dirs) - unset(py_src_dirs_cur) - else() - message(STATUS "ruff not found. Python code cannot be formatted.") - endif() - cmake_policy(POP) -endmacro() - -macro(AddProjectVersionInfo TARGET) - if (WIN32) - set(PTI_VERSIONINFO_RC "${PROJECT_BINARY_DIR}/$/${TARGET}_versioninfo.rc") - set(PTI_VERSIONINFO_RC_IN "${PROJECT_BINARY_DIR}/${TARGET}_versioninfo.rc.in") - set(PTI_VERSIONINFO_RC_IN_INIT "${PROJECT_SOURCE_DIR}/cmake/Modules/pti_versioninfo.rc.in") - - set(INTEL_LIC_PATH "${PTI_CMAKE_MACRO_DIR}/../LICENSE") - - if (EXISTS "${INTEL_LIC_PATH}") - file(STRINGS "${INTEL_LIC_PATH}" INTEL_LICENSE_FILE_STRINGS) - foreach(PTI_STRING ${INTEL_LICENSE_FILE_STRINGS}) - string(REGEX MATCH "^Copyright.*" PTI_COPYRIGHT "${PTI_STRING}") - if (PTI_COPYRIGHT) - break() - endif() - endforeach() - endif() - - if(NOT PTI_COPYRIGHT) - message(WARNING "Copyright file not found, Windows versioninfo will be incomplete") - set(PTI_COPYRIGHT "Copyright (C) Intel Corporation") - endif() - - set(PTI_VERSION_TWEAK "${PROJECT_VERSION_TWEAK}") - if(NOT PTI_VERSION_TWEAK) - set(PTI_VERSION_TWEAK 0) - endif() - - set(TARGET_NAME ${TARGET}) - - # https://discourse.cmake.org/t/configuring-a-file-that-has-both-substitution-and-generator-expressions/3064/2 - configure_file(${PTI_VERSIONINFO_RC_IN_INIT} ${PTI_VERSIONINFO_RC_IN} @ONLY NEWLINE_STYLE CRLF) - file( - GENERATE - OUTPUT ${PTI_VERSIONINFO_RC} - INPUT ${PTI_VERSIONINFO_RC_IN} - NEWLINE_STYLE CRLF - ) - - target_sources(${TARGET} PRIVATE ${PTI_VERSIONINFO_RC}) - endif() -endmacro() - -# -# Check whether to use experimental/filesystem or filesystem. -# -# defines `PTI_EXPERIMENTAL_FILESYSTEM` if the platform does not -# support std::filesystem usage. -# sets `FS_LIB` with proper library to link (empty if not needed). -# -macro(CheckExperimentalFilesystem) - if(NOT DEFINED PTI_EXPERIMENTAL_FILESYSTEM AND NOT DEFINED FS_LIB) - set(FS_LIB "") - cmake_policy(PUSH) - cmake_policy(SET CMP0067 NEW) - include(CMakePushCheckState) - cmake_push_check_state() - cmake_reset_check_state() - include(CheckCXXSourceCompiles) - # Check normal case - set(code - "#include - int main() - { - return std::filesystem::exists(std::filesystem::temp_directory_path()); - }") - set(CMAKE_REQUIRED_LIBRARIES ${FS_LIB}) - check_cxx_source_compiles("${code}" COMPILES_STD_FILESYSTEM) - - if(NOT COMPILES_STD_FILESYSTEM) - cmake_reset_check_state() - - # Check experimental filesystem case - set(code - "#include - int main() - { - return std::experimental::filesystem::exists(std::experimental::filesystem::temp_directory_path()); - }") - set(CMAKE_REQUIRED_LIBRARIES ${FS_LIB}) - check_cxx_source_compiles("${code}" COMPILES_STD_EXPERIMENTAL_FILESYSTEM) - endif() - - # Check experimental filesystem glib case - if(NOT COMPILES_STD_FILESYSTEM AND NOT COMPILES_STD_EXPERIMENTAL_FILESYSTEM) - cmake_reset_check_state() - set(FS_LIB stdc++fs) - set(CMAKE_REQUIRED_LIBRARIES ${FS_LIB}) - check_cxx_source_compiles("${code}" - COMPILES_STD_EXPERIMENTAL_FILESYSTEM_LIBSTDCXXFS) - if(COMPILES_STD_EXPERIMENTAL_FILESYSTEM_LIBSTDCXXFS) - set(COMPILES_STD_EXPERIMENTAL_FILESYSTEM TRUE) - endif() - endif() - - # Check experimental filesystem LLVM case - if(NOT COMPILES_STD_FILESYSTEM AND NOT COMPILES_STD_EXPERIMENTAL_FILESYSTEM_LIBSTDCXXFS) - cmake_reset_check_state() - set(FS_LIB c++fs) - set(CMAKE_REQUIRED_LIBRARIES ${FS_LIB}) - check_cxx_source_compiles("${code}" - COMPILES_STD_EXPERIMENTAL_FILESYSTEM_LIBCXXFS) - if(COMPILES_STD_EXPERIMENTAL_FILESYSTEM_LIBCXXFS) - set(COMPILES_STD_EXPERIMENTAL_FILESYSTEM TRUE) - endif() - endif() - - cmake_pop_check_state() - cmake_policy(POP) - - if(NOT COMPILES_STD_FILESYSTEM) - if(NOT COMPILES_STD_EXPERIMENTAL_FILESYSTEM) - message(FATAL_ERROR "C++17 filesystem support is required") - endif() - set(PTI_EXPERIMENTAL_FILESYSTEM ON) - else() - set(FS_LIB "") # Clear if we have std::filesystem - unset(PTI_EXPERIMENTAL_FILESYSTEM) - endif() - endif() -endmacro() - -macro(AddVersionlessLinkFile MY_TARGET) - add_custom_command(TARGET ${MY_TARGET} POST_BUILD - COMMAND ${CMAKE_COMMAND} -E copy $ - $/${CMAKE_SHARED_LIBRARY_PREFIX}${MY_TARGET}$<$:$<$:d>>${CMAKE_LINK_LIBRARY_SUFFIX} - ) -endmacro() - -function(GetCurrentGitCommit COMMIT_OUTPUT_VAR) - set(_OUT_TEMP "") - set(_GIT_RESULT_TEMP 1) - if (NOT Git_FOUND) - find_package(Git) - endif() - if(Git_FOUND) - execute_process( - COMMAND "${GIT_EXECUTABLE}" rev-parse HEAD - OUTPUT_VARIABLE _OUT_TEMP - RESULT_VARIABLE _GIT_RESULT_TEMP - ERROR_QUIET - OUTPUT_STRIP_TRAILING_WHITESPACE - ) - if(_GIT_RESULT_TEMP EQUAL 0) - set(${COMMIT_OUTPUT_VAR} "${_OUT_TEMP}" PARENT_SCOPE) - endif() - endif() -endfunction() - -# DetectSystemLevelZeroMetricApi -# -# Detects whether the system-installed Level Zero loader exports both on-demand -# metric enable/disable symbols (zetDeviceEnableMetricsExp and -# zetDeviceDisableMetricsExp). Sets HAVE_ZET_DEVICE_METRIC_API to TRUE only if -# both are present, FALSE otherwise. A single variable is used because both -# symbols must be present for the feature to work — checking one is not enough. -# -# Always probes the SYSTEM loader, not the one potentially built from FetchContent -# into _deps. The fetched loader is always a recent version that exports the -# symbols, but the runtime driver may not — probing the fetched binary would give -# a false positive. -# -# NO_CMAKE_PATH and NO_CMAKE_ENVIRONMENT_PATH prevent accidentally finding the -# FetchContent copy if CMAKE_PREFIX_PATH points into _deps. -# -# Platform notes: -# Linux: finds libze_loader.so in system lib dirs (/usr/lib, /usr/lib64, etc.) -# Windows: finds ze_loader.dll in %SystemRoot%\System32 (installed by GPU driver). -# CMAKE_FIND_LIBRARY_SUFFIXES is overridden to .dll since find_library -# defaults to .lib on Windows. -macro(DetectSystemLevelZeroMetricApi) - if(WIN32) - # find_library on Windows appends CMAKE_FIND_LIBRARY_SUFFIXES (.lib by default). - # Override to .dll so we find ze_loader.dll in System32 as installed by the GPU driver. - set(_saved_suffixes ${CMAKE_FIND_LIBRARY_SUFFIXES}) - set(CMAKE_FIND_LIBRARY_SUFFIXES ".dll") - find_library(_system_ze_loader - NAMES ze_loader - PATHS $ENV{SystemRoot}/System32 - NO_DEFAULT_PATH - ) - set(CMAKE_FIND_LIBRARY_SUFFIXES ${_saved_suffixes}) - unset(_saved_suffixes) - else() - find_library(_system_ze_loader - NAMES ze_loader - NO_CMAKE_PATH - NO_CMAKE_ENVIRONMENT_PATH - ) - endif() - - if(_system_ze_loader) - if(WIN32) - # check_library_exists cannot link against a DLL; use dumpbin /EXPORTS instead - find_program(_dumpbin dumpbin) - if(_dumpbin) - execute_process( - COMMAND ${_dumpbin} /EXPORTS ${_system_ze_loader} - OUTPUT_VARIABLE _dumpbin_output - ERROR_VARIABLE _dumpbin_error - RESULT_VARIABLE _dumpbin_result - OUTPUT_STRIP_TRAILING_WHITESPACE - ) - if(NOT _dumpbin_result EQUAL 0) - message(WARNING "Level Zero: dumpbin failed (exit ${_dumpbin_result}): ${_dumpbin_error} -- assuming APIs not supported") - set(_symbols_found FALSE) - else() - string(FIND "${_dumpbin_output}" "zetDeviceEnableMetricsExp" _have_ze_enable) - string(FIND "${_dumpbin_output}" "zetDeviceDisableMetricsExp" _have_ze_disable) - if(NOT _have_ze_enable EQUAL -1 AND NOT _have_ze_disable EQUAL -1) - set(_symbols_found TRUE) - else() - set(_symbols_found FALSE) - endif() - endif() - unset(_dumpbin_output) - unset(_dumpbin_error) - unset(_dumpbin_result) - else() - message(WARNING "Level Zero: dumpbin not found -- cannot check DLL exports, assuming APIs not supported") - set(_symbols_found FALSE) - endif() - unset(_dumpbin CACHE) - else() - include(CheckLibraryExists) - check_library_exists("${_system_ze_loader}" zetDeviceEnableMetricsExp "" - _have_ze_enable) - check_library_exists("${_system_ze_loader}" zetDeviceDisableMetricsExp "" - _have_ze_disable) - if(_have_ze_enable AND _have_ze_disable) - set(_symbols_found TRUE) - else() - set(_symbols_found FALSE) - endif() - unset(_have_ze_enable CACHE) - unset(_have_ze_enable) - unset(_have_ze_disable CACHE) - unset(_have_ze_disable) - endif() - - if(_symbols_found) - set(HAVE_ZET_DEVICE_METRIC_API TRUE CACHE BOOL "" FORCE) - message(STATUS "Level Zero: zetDeviceEnableMetricsExp/zetDeviceDisableMetricsExp found in system loader -- on-demand metric enable supported") - else() - set(HAVE_ZET_DEVICE_METRIC_API FALSE CACHE BOOL "" FORCE) - message(STATUS "Level Zero: zetDeviceEnableMetricsExp/zetDeviceDisableMetricsExp NOT found in system loader -- ZET_ENABLE_METRICS=1 required at runtime") - endif() - unset(_symbols_found) - else() - set(HAVE_ZET_DEVICE_METRIC_API FALSE CACHE BOOL "" FORCE) - message(STATUS "Level Zero: system loader not found -- assuming ZET_ENABLE_METRICS=1 required at runtime") - endif() - unset(_system_ze_loader CACHE) - unset(_system_ze_loader) -endmacro() - -function(PtiCheckLinkerFlag FLAG_NAME FLAG_VALUE) - if(DEFINED PTI_${FLAG_NAME}) - return() - endif() - include(CMakePushCheckState) - cmake_push_check_state(RESET) - if(CMAKE_CXX_COMPILER_FRONTEND_VARIANT STREQUAL "MSVC") - set(CMAKE_REQUIRED_FLAGS "/WX") - else() - set(CMAKE_REQUIRED_FLAGS "-Werror") - endif() - set(_link_option "${FLAG_VALUE}") - set(CMAKE_REQUIRED_LINK_OPTIONS "${_link_option}") - include(CheckCXXSourceCompiles) - set(_code - "int main() - { - return 0; - }") - check_cxx_source_compiles("${_code}" PTI_HAVE_${FLAG_NAME}) - cmake_pop_check_state() - if(PTI_HAVE_${FLAG_NAME}) - set(PTI_${FLAG_NAME} "${_link_option}" CACHE INTERNAL "") - else() - set(PTI_${FLAG_NAME} "" CACHE INTERNAL "") - endif() -endfunction() - -function(PtiCheckVersionScript) - if (NOT DEFINED PTI_VERSION_SCRIPT) - # Avoid silently failing if map file is not found or corrupted. - set(_map_file "${PROJECT_BINARY_DIR}/pti_fake_version_script_check.map") - file(WRITE "${_map_file}" "{ local: *; };\n") - PtiCheckLinkerFlag(VERSION_SCRIPT "LINKER:--version-script,${_map_file}") - endif() -endfunction() - -function(PtiAddVersionScript TARGET MAP_FILE) - PtiCheckVersionScript() - if(PTI_VERSION_SCRIPT) - target_link_options(${TARGET} PRIVATE "LINKER:--version-script,${MAP_FILE}") - set_property(TARGET ${TARGET} APPEND PROPERTY LINK_DEPENDS "${MAP_FILE}") - endif() -endfunction() diff --git a/sdk/cmake/Modules/pti_versioninfo.rc.in b/sdk/cmake/Modules/pti_versioninfo.rc.in deleted file mode 100644 index d5781ed8..00000000 --- a/sdk/cmake/Modules/pti_versioninfo.rc.in +++ /dev/null @@ -1,58 +0,0 @@ -#include - -#define VER_COMMENTS_STR "@PROJECT_HOMEPAGE_URL@ Commit: @PTI_COMMIT_HASH@\0" - -#define VER_COMPANY_NAME_STR "Intel Corporation\0" - -#define VER_PRODUCT_DESCRIPTION_STR "@PROJECT_DESCRIPTION@\0" - -#define VER_INTERNAL_NAME_STR "@PROJECT_NAME@\0" - -#define VER_LEGAL_COPYRIGHT_STR "@PTI_COPYRIGHT@\0" - -#define VER_ORIGINAL_FILENAME_STR "$\0" - -#define VER_PRODUCT_NAME_STR "Profiling Tools Interface\0" - -#define VER_FILEVERSION @PROJECT_VERSION_MAJOR@,@PROJECT_VERSION_MINOR@,@PROJECT_VERSION_PATCH@,@PTI_VERSION_TWEAK@ -#define VER_FILEVERSION_STR "@PROJECT_VERSION_MAJOR@.@PROJECT_VERSION_MINOR@.@PROJECT_VERSION_PATCH@\0" - - -#define VER_PRODUCTVERSION @PROJECT_VERSION_MAJOR@,@PROJECT_VERSION_MINOR@,@PROJECT_VERSION_PATCH@,@PTI_VERSION_TWEAK@ -#define VER_PRODUCTVERSION_STR "@PROJECT_VERSION_MAJOR@.@PROJECT_VERSION_MINOR@.@PROJECT_VERSION_PATCH@\0" - -#ifdef _DEBUG -#define VER_DEBUG VS_FF_DEBUG -#else -#define VER_DEBUG 0 -#endif - -VS_VERSION_INFO VERSIONINFO - FILEVERSION VER_FILEVERSION - PRODUCTVERSION VER_PRODUCTVERSION - FILEFLAGSMASK VS_FFI_FILEFLAGSMASK - FILEFLAGS VER_DEBUG - FILEOS VOS_NT_WINDOWS32 - FILETYPE VFT_DLL - FILESUBTYPE VFT2_UNKNOWN -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904b0" - BEGIN - VALUE "Comments", VER_COMMENTS_STR - VALUE "CompanyName", VER_COMPANY_NAME_STR - VALUE "FileDescription", VER_PRODUCT_DESCRIPTION_STR - VALUE "FileVersion", VER_FILEVERSION_STR - VALUE "InternalName", VER_INTERNAL_NAME_STR - VALUE "LegalCopyright", VER_LEGAL_COPYRIGHT_STR - VALUE "OriginalFilename", VER_ORIGINAL_FILENAME_STR - VALUE "ProductName", VER_PRODUCT_NAME_STR - VALUE "ProductVersion", VER_PRODUCTVERSION_STR - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1200 - END -END diff --git a/sdk/cmake/bom_line.bash b/sdk/cmake/bom_line.bash deleted file mode 100755 index 8e82f34a..00000000 --- a/sdk/cmake/bom_line.bash +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash -BOM_DIR=$1 -echo BOM_DIR $BOM_DIR -TGT_BOM=$2 -echo TGT_BOM $TGT_BOM -INST_DIR=$3 -echo INST_DIR $INST_DIR -BRK_TOKEN=$4 -echo BRK_TOKEN $BRK_TOKEN -TGT_FILE=$5 -echo TGT_FILE $TGT_FILE - -[ "$INST_DIR" = "NULL" ] && INST_DIR="" - - -[[ -d ${BOM_DIR} ]] || mkdir ${BOM_DIR} -echo ALL $@ - -STG1=${TGT_FILE##*/${BRK_TOKEN}/} -STRIPPED_NAME=${STG1#$BRK_TOKEN/} -echo STG1= ${STG1} STRIPPED_NAME ${STRIPPED_NAME} - -if [[ -L "$TGT_FILE" ]]; then - echo ""$':'"INS"${INST_DIR}/${STRIPPED_NAME}$':'CKSUM$':'ONE$'::'INT$':'755$':'$(readlink $TGT_FILE) >> ${TGT_BOM} -else - echo "DEL"/${STRIPPED_NAME}$':'"INS"${INST_DIR}/${STRIPPED_NAME}$':'CKSUM$':'ONE$':'$':'INT$':'$(stat -c '%a' ${TGT_FILE}) >> ${TGT_BOM} -fi diff --git a/sdk/cmake/bom_line_win.bat b/sdk/cmake/bom_line_win.bat deleted file mode 100644 index 885eb207..00000000 --- a/sdk/cmake/bom_line_win.bat +++ /dev/null @@ -1 +0,0 @@ -bash cmake\bom_line.bash %* diff --git a/sdk/cmake/bom_macro.cmake b/sdk/cmake/bom_macro.cmake deleted file mode 100644 index 8f9bde45..00000000 --- a/sdk/cmake/bom_macro.cmake +++ /dev/null @@ -1,21 +0,0 @@ -macro(bomline bomDir class dirPrefix tgtMatch) - install(CODE " - file( - GLOB_RECURSE CMAKE_FILES_LIST - ${tgtMatch} - ) - message(STATUS \"BEFORE CMAKE\" ${class}) - foreach(FILE \${CMAKE_FILES_LIST}) - message(STATUS \"Installed file1: \${FILE}\") - if (UNIX) - execute_process(COMMAND cmake/bom_line.bash ${bomDir} ${class} ${dirPrefix} \${CMAKE_INSTALL_PREFIX} \${FILE}) - else() - execute_process(COMMAND [[cmake\\bom_line_win.bat]] ${bomDir} ${class} ${dirPrefix} \${CMAKE_INSTALL_PREFIX} \${FILE}) - endif() - endforeach() - message(STATUS \"OUTSIDE CMAKE\" ${class}) - " - COMPONENT Pti_Bom) -endmacro() - - diff --git a/sdk/cmake/coverage.cmake b/sdk/cmake/coverage.cmake deleted file mode 100644 index 05fc639e..00000000 --- a/sdk/cmake/coverage.cmake +++ /dev/null @@ -1,128 +0,0 @@ -RequirePythonInterp() - -if(DEFINED PTI_INSTALL) - set(PTI_INSTALL_COVERAGE - ${PTI_INSTALL} - CACHE - BOOL - "Option to install coverage artifacts.") -else() - set(PTI_INSTALL_COVERAGE - ON - CACHE - BOOL - "Option to install coverage artifacts.") -endif() - -set(DEFAULT_PROFDATA_MERGE_FILENAME - "pti-cov.profdata" - CACHE - STRING - "Default filename of merged data (i.e., output from llvm-profdata)") - -# -# Source coverage file structure -# -# -# //coverage -# //coverage/raw (raw data generated from tests) -# //coverage/html (html report) -# //coverage/*.info (exported lcov for 3rd party integration) -# //coverage/*.profdata (merged raw data use to generate output) -# - -if(NOT PTI_COVERAGE_DIR) - set(PTI_COVERAGE_DIR ${PROJECT_BINARY_DIR}/coverage) - set(PTI_COVERAGE_RAW_DIR ${PTI_COVERAGE_DIR}/raw) -endif() - -if(NOT PTI_PROFDATA_MERGE_FILENAME) - set(PTI_PROFDATA_MERGE_FILENAME ${DEFAULT_PROFDATA_MERGE_FILENAME}) -endif() - -set(PTI_PROFDATA_MERGE_OUTPUT - ${PTI_COVERAGE_DIR}/${PTI_PROFDATA_MERGE_FILENAME}) - -set(THIRD_PARTY_SRC_DIR ".*_deps*") - -if(FETCHCONTENT_BASE_DIR) - set(THIRD_PARTY_SRC_DIR "${THIRD_PARTY_SRC_DIR}|${FETCHCONTENT_BASE_DIR}/*") - file(TO_NATIVE_PATH "${THIRD_PARTY_SRC_DIR}" THIRD_PARTY_SRC_DIR) -endif() - -# CMPLR_ROOT -> prefer Intel oneAPI compiler bundled llvm -if(NOT LLVM_PROFDATA_PROG) - find_program( - LLVM_PROFDATA_PROG llvm-profdata - HINTS ENV CMPLR_ROOT - PATH_SUFFIXES bin bin/compiler) -endif() - -if(NOT LLVM_COV_PROG) - find_program( - LLVM_COV_PROG llvm-cov - HINTS ENV CMPLR_ROOT - PATH_SUFFIXES bin bin/compiler) -endif() - -if(NOT LLVM_PROFDATA_PROG) - return() -endif() - -if(NOT LLVM_COV_PROG) - return() -endif() - -add_custom_command( - OUTPUT ${PTI_PROFDATA_MERGE_OUTPUT} - COMMAND ${LLVM_PROFDATA_PROG} merge -output=${PTI_PROFDATA_MERGE_OUTPUT} - ${PTI_COVERAGE_RAW_DIR}/*.profraw - DEPENDS ${PTI_COVERAGE_RAW_DIR}) - -set(CODE_COVERAGE_BASE_CMD - ${Python_EXECUTABLE} - ${PROJECT_SOURCE_DIR}/cmake/coverage_report.py - generate - --llvm-cov - ${LLVM_COV_PROG} - --objects - ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} - ${CMAKE_LIBRARY_OUTPUT_DIRECTORY} - "$" - --data - ${PTI_PROFDATA_MERGE_OUTPUT} - --sources - ${PROJECT_SOURCE_DIR}/include - ${PROJECT_SOURCE_DIR}/src - ${PROJECT_BINARY_DIR} - --extra=-ignore-filename-regex=${THIRD_PARTY_SRC_DIR}) - -add_custom_target( - coverage_summary - COMMAND ${CODE_COVERAGE_BASE_CMD} --summary - DEPENDS ${PTI_PROFDATA_MERGE_OUTPUT} - COMMENT "Generate coverage summary" - VERBATIM) - -add_custom_target( - coverage_report - COMMAND ${CODE_COVERAGE_BASE_CMD} --lcov ${PTI_COVERAGE_DIR}/coverage.info - COMMAND ${CODE_COVERAGE_BASE_CMD} --json ${PTI_COVERAGE_DIR}/coverage.json - COMMAND ${CODE_COVERAGE_BASE_CMD} --output-dir ${PTI_COVERAGE_DIR}/html - DEPENDS ${PTI_PROFDATA_MERGE_OUTPUT} - COMMENT "Generate HTML coverage report along with lcov and JSON summary export data." - VERBATIM) - -if(PTI_INSTALL_COVERAGE) - install( - DIRECTORY "${PTI_COVERAGE_DIR}/" - CONFIGURATIONS Coverage - DESTINATION coverage - COMPONENT Pti_Coverage_Data) - - install( - DIRECTORY "${PTI_COVERAGE_DIR}/html" - CONFIGURATIONS Coverage - DESTINATION ${CMAKE_INSTALL_DOCDIR}/coverage - COMPONENT Pti_Coverage_HTML) -endif() diff --git a/sdk/cmake/coverage_report.py b/sdk/cmake/coverage_report.py deleted file mode 100644 index 07f574a3..00000000 --- a/sdk/cmake/coverage_report.py +++ /dev/null @@ -1,308 +0,0 @@ -# ============================================================== -# Copyright (C) Intel Corporation -# -# SPDX-License-Identifier: MIT -# ============================================================= - -""" -Script for generating coverage reports with LLVM's source-based code coverage. - -https://clang.llvm.org/docs/SourceBasedCodeCoverage.html - -The motivation for this script is providing a wrapper for llvm-cov. This -utility is cumbersome to use with multiple binaries, e.g., if your project has - many test binaries, one must pass `--object ` (without globs) -into llvm-cov. - -Before using this script, make sure you run the `llvm-profdata` merge tool and -get a profdata file. Also, I would generally recommend aggregating binaries -into a single directory. -""" - -import argparse -import pathlib -import subprocess - -DEFAULT_LLVM_COV = "llvm-cov" -# These are most likely not binaries w/ coverage data -DEFAULT_OBJECT_EXTENSION_EXCLUSION = [ - ".cc", - ".cpp", - ".cmake", - ".txt", - ".cxx", - ".h", - ".in", - ".hpp", - ".spv", - ".a", - ".cl", - ".pdb", - ".lib", - ".profraw", - ".profdata", -] -DEFAULT_OUTPUT_DIR = pathlib.Path("./coverage") -DEFAULT_COVERAGE_DATA_FILE = pathlib.Path("./cov.profdata") -DEFAULT_LCOV_EXPORT_FILE = pathlib.Path("./cov.info") - - -def gen_object_list(obj_arg, extension_filter): - """Generate list of objects to pass to llvm-cov - - obj_arg - user arg with either file (object) or directory with objects - extension_filter - extensions to ignore. - """ - - obj_list = [] - - for obj in obj_arg: - if not obj.exists(): - continue - if obj.is_file() and obj.suffix not in extension_filter: - obj_list.append(obj) - if obj.is_dir(): - # Recursive support? - obj_list.extend( - [ - dir_file - for dir_file in obj.iterdir() - if dir_file.exists() - and dir_file.is_file() - and dir_file.suffix not in extension_filter - ] - ) - - return obj_list - - -def base_llvm_cmd(cov_cmd, subcommand, merge_data, objects, sources, extra): - """Return common llvm-cov command as list""" - - cmd = [] - cmd.append(f"{cov_cmd!s}") - cmd.append(subcommand) - cmd.append(f"--instr-profile={merge_data!s}") - cmd.extend([f"--object={my_obj!s}" for my_obj in objects]) - - if sources is not None: - cmd.append("--sources") - cmd.extend([f"{sources_dir!s}" for sources_dir in sources]) - - if extra is not None: - cmd.extend(extra.split(";")) - - return cmd - - -class LlvmCovHelper: - """ - Helper class to generate coverage reports using llvm-cov. - - This class provides methods to generate HTML coverage reports, - summarize coverage, and export coverage data in lcov format. - """ - - def __init__( - self, cov_cmd, merge_data, objects, sources=None, extra=None, verbose=True - ): - self.verbose = verbose - self.show_cmd = base_llvm_cmd( - cov_cmd, "show", merge_data, objects, sources, extra - ) - self.export_cmd = base_llvm_cmd( - cov_cmd, "export", merge_data, objects, sources, extra - ) - self.report_cmd = base_llvm_cmd( - cov_cmd, "report", merge_data, objects, sources, extra - ) - - def __run_cmd(self, cmd): - """Helper function to run llvm-cov command with verbosity""" - - if self.verbose: - print(*cmd) - - subprocess.run(cmd, check=True) - - def __export_to_file(self, cmd, file_name): - """Helper function to export llvm-cov output to file""" - - if self.verbose: - print(*cmd) - - exported_data = subprocess.run( - cmd, - stdout=subprocess.PIPE, - universal_newlines=True, - check=True, - ) - - with file_name.open("w") as export_file: - export_file.write(exported_data.stdout) - - def html(self, outputdir): - """Generate html with source-based coverage""" - - html_cmd = self.show_cmd + ["--format=html"] + [f"--output-dir={outputdir!s}"] - - self.__run_cmd(html_cmd) - - def summary(self): - """Generate a console summary with source-based coverage""" - - self.__run_cmd(self.report_cmd) - - def export_lcov(self, file_name): - """Export source-based coverage data into lcov format.""" - - lcov_cmd = self.export_cmd + ["--format=lcov"] - - self.__export_to_file(lcov_cmd, file_name) - - def export_json(self, file_name): - """Export source-based coverage data into JSON format (summary only).""" - - json_cmd = self.export_cmd + ["--format=text", "--summary-only"] - - self.__export_to_file(json_cmd, file_name) - - -def generate_subcommand(args): - """Coverage report generation subcommand entry""" - - obj_list = gen_object_list(args.objects, args.exclude) - - coverage_generation = LlvmCovHelper( - args.llvm_cov, args.data, obj_list, args.sources, args.extra, args.verbose - ) - - if args.summary: - coverage_generation.summary() - return - - if args.lcov: - coverage_generation.export_lcov(args.lcov) - return - - if args.json: - coverage_generation.export_json(args.json) - return - - coverage_generation.html(args.output_dir) - - -def main(): - """ - Entry point to the program. - - Run with --help for detailed usage information - """ - - parser = argparse.ArgumentParser( - description="Utility for working with coverage reports from llvm-cov." - ) - - subparsers = parser.add_subparsers(dest="command") - - generate_parser = subparsers.add_parser( - "generate", help="Generate coverage reports." - ) - - generate_parser.add_argument( - "--llvm-cov", - type=pathlib.Path, - default=DEFAULT_LLVM_COV, - help=f"Default llvm-cov command. Defaults to {DEFAULT_LLVM_COV}", - ) - - generate_parser.add_argument( - "--objects", - nargs="+", - required=True, - type=pathlib.Path, - help=( - "Objects to generate report with (pass into llvm-cov..)." - " Can either be a directory or binary file." - ), - ) - - generate_parser.add_argument( - "--data", - type=pathlib.Path, - default=DEFAULT_COVERAGE_DATA_FILE, - help=( - "Merged coverage data (profdata format)." - f" Defaults to {DEFAULT_COVERAGE_DATA_FILE}" - ), - ) - generate_parser.add_argument( - "--exclude", - nargs="+", - default=DEFAULT_OBJECT_EXTENSION_EXCLUSION, - help="List of extensions to exclude from objects.", - ) - generate_parser.add_argument( - "--lcov", - type=pathlib.Path, - required=False, - help=( - "File in lcov format to export coverage data into" - " (e.g. coverage.info file one can pass into `genhtml`)." - ), - ) - - generate_parser.add_argument( - "--json", - type=pathlib.Path, - required=False, - help=( - "JSON file to export coverage summary into (i.e., results of" - " llvm-cov export with --summary-only)." - ), - ) - - generate_parser.add_argument( - "--summary", - action="store_true", - help="Generate coverage summary Report.", - ) - - generate_parser.add_argument( - "--sources", - nargs="+", - type=pathlib.Path, - help="Source code to generate coverage data.", - ) - - generate_parser.add_argument( - "--output-dir", - type=pathlib.Path, - default=DEFAULT_OUTPUT_DIR, - help="Default output directory for html reports (default: coverage).", - ) - - generate_parser.add_argument( - "--extra", - type=str, - help=( - "Semi-colon separated list of extra args to pass to llvm-cov." - " Must use '=' instead of ' ', e.g., --extra=\"-args\"." - ), - ) - - generate_parser.add_argument( - "-v", - "--verbose", - action="store_true", - help="Verbose output.", - ) - - args = parser.parse_args() - - if args.command == "generate": - generate_subcommand(args) - - -if __name__ == "__main__": - main() diff --git a/sdk/cmake/dependency_pins.cmake b/sdk/cmake/dependency_pins.cmake deleted file mode 100644 index 6fe86194..00000000 --- a/sdk/cmake/dependency_pins.cmake +++ /dev/null @@ -1,27 +0,0 @@ -#============================================================== -# Copyright (C) Intel Corporation -# -# SPDX-License-Identifier: MIT -# ============================================================= - -# Contains pinned versions for each dependency used in the project. -# PTI__ -set(PTI_FMT_REPOSITORY https://github.com/fmtlib/fmt) -set(PTI_FMT_VERSION 12.1.0) -set(PTI_FMT_COMMIT 407c905e45ad75fc29bf0f9bb7c5c2fd3475976f) - -set(PTI_SPDLOG_REPOSITORY https://github.com/gabime/spdlog) -set(PTI_SPDLOG_VERSION 1.17.0) -set(PTI_SPDLOG_COMMIT 79524ddd08a4ec981b7fea76afd08ee05f83755d) - -set(PTI_GOOGLETEST_REPOSITORY https://github.com/google/googletest) -set(PTI_GOOGLETEST_VERSION 1.17.0) -set(PTI_GOOGLETEST_COMMIT 52eb8108c5bdec04579160ae17225d66034bd723) - -set(PTI_LEVELZERO_REPOSITORY https://github.com/oneapi-src/level-zero.git) -set(PTI_LEVELZERO_VERSION 1.32.0) -set(PTI_LEVELZERO_COMMIT d3b3efbdaa27a0aef9a9812cc8fa4260557c1e7c) - -set(PTI_ITTAPI_REPOSITORY https://github.com/intel/ittapi.git) -set(PTI_ITTAPI_VERSION 3.26.8) -set(PTI_ITTAPI_COMMIT 2369c7eb60bbe5db9f0996b0366c68c4c0950100) diff --git a/sdk/cmake/docs.cmake b/sdk/cmake/docs.cmake deleted file mode 100644 index cfe675d9..00000000 --- a/sdk/cmake/docs.cmake +++ /dev/null @@ -1,80 +0,0 @@ -# Find Doxygen -find_package(Doxygen) - -if(NOT Doxygen_FOUND) - message(STATUS "Doxygen not found - documentation targets will not be available") - return() -endif() - -# Find Sphinx -find_program(SPHINX_BUILD sphinx-build) - -if(NOT SPHINX_BUILD) - message(STATUS "Sphinx not found - documentation targets will not be available") - return() -endif() - -# Set documentation directories -set(PTI_DOCS_SOURCE_DIR "${PROJECT_SOURCE_DIR}/docs") -set(PTI_DOXYGEN_SOURCE_DIR "${PTI_DOCS_SOURCE_DIR}/doxygen") -set(PTI_SPHINX_SOURCE_DIR "${PTI_DOCS_SOURCE_DIR}/sphinx") -set(PTI_DOCS_OUTPUT_DIR "${PROJECT_BINARY_DIR}/docs") -set(PTI_DOXYGEN_OUTPUT_DIR "${PTI_DOCS_OUTPUT_DIR}/doxygen") -set(PTI_SPHINX_OUTPUT_DIR "${PTI_DOCS_OUTPUT_DIR}/sphinx/build/html") - -# Documentation output files -set(PTI_DOXYGEN_INDEX "${PTI_DOXYGEN_OUTPUT_DIR}/html/index.html") -set(PTI_SPHINX_INDEX "${PTI_SPHINX_OUTPUT_DIR}/index.html") - -# Collect source files for dependency tracking -file(GLOB_RECURSE PTI_HEADERS "${PROJECT_SOURCE_DIR}/include/*.h") -file(GLOB_RECURSE SPHINX_SOURCES "${PTI_SPHINX_SOURCE_DIR}/source/*.rst") - -# Configure Doxyfile with CMake-controlled output directory -configure_file( - ${PTI_DOXYGEN_SOURCE_DIR}/Doxyfile.in - ${PROJECT_BINARY_DIR}/Doxyfile - @ONLY) - -# Custom command to build Doxygen documentation -add_custom_command( - OUTPUT ${PTI_DOXYGEN_INDEX} - COMMAND ${CMAKE_COMMAND} -E make_directory ${PTI_DOXYGEN_OUTPUT_DIR} - COMMAND ${DOXYGEN_EXECUTABLE} ${PROJECT_BINARY_DIR}/Doxyfile - WORKING_DIRECTORY ${PTI_DOXYGEN_SOURCE_DIR} - DEPENDS ${PROJECT_BINARY_DIR}/Doxyfile - ${PTI_DOXYGEN_SOURCE_DIR}/Doxyfile.in - ${PTI_HEADERS} - COMMENT "Generate Doxygen documentation" - VERBATIM) - -# Custom target for Doxygen -add_custom_target( - docs_doxygen - DEPENDS ${PTI_DOXYGEN_INDEX} - COMMENT "Build Doxygen documentation") - -# Custom command to build Sphinx documentation -add_custom_command( - OUTPUT ${PTI_SPHINX_INDEX} - COMMAND ${SPHINX_BUILD} -b html - -D breathe_projects.ptilib=${PTI_DOXYGEN_OUTPUT_DIR}/xml - ${PTI_SPHINX_SOURCE_DIR}/source ${PTI_SPHINX_OUTPUT_DIR} - WORKING_DIRECTORY ${PTI_SPHINX_SOURCE_DIR} - DEPENDS ${PTI_DOXYGEN_INDEX} - ${SPHINX_SOURCES} - ${PTI_SPHINX_SOURCE_DIR}/source/conf.py - COMMENT "Generate Sphinx documentation" - VERBATIM) - -# Custom target for Sphinx (depends on Doxygen output file) -add_custom_target( - docs_sphinx - DEPENDS ${PTI_SPHINX_INDEX} - COMMENT "Build Sphinx documentation") - -# Convenience target to build all documentation -add_custom_target( - docs - DEPENDS docs_sphinx - COMMENT "Build all documentation (Doxygen + Sphinx)") diff --git a/sdk/cmake/levelzero.cmake b/sdk/cmake/levelzero.cmake deleted file mode 100644 index 84849e84..00000000 --- a/sdk/cmake/levelzero.cmake +++ /dev/null @@ -1,138 +0,0 @@ -#============================================================== -# Copyright (C) Intel Corporation -# -# SPDX-License-Identifier: MIT -# ============================================================= - -include_guard(GLOBAL) - -include(${CMAKE_CURRENT_LIST_DIR}/dependency_pins.cmake) - -macro(GetLevelZero) - if (NOT TARGET LevelZero::level-zero) - # Need zelEnableTracingLayer - message("-- Fetching L0: ${PTI_LEVELZERO_VERSION}") - string(REPLACE "." ";" LZ_TMP_LIST ${PTI_LEVELZERO_VERSION}) - list(GET LZ_TMP_LIST 2 LZ_VER_PATCH) - set(LZ_BASE_DIR ${CMAKE_CURRENT_BINARY_DIR}/_deps) - - if(FETCHCONTENT_BASE_DIR) - set(LZ_BASE_DIR ${FETCHCONTENT_BASE_DIR}) - endif() - - if (NOT Git_FOUND) - find_package(Git REQUIRED) - endif() - - include(FetchContent) - FetchContent_Declare( - LevelZero - GIT_REPOSITORY ${PTI_LEVELZERO_REPOSITORY} - GIT_TAG ${PTI_LEVELZERO_COMMIT} - ) - # Prevent content from automatically being installed with PTI - FetchContent_GetProperties(LevelZero) - if(NOT levelzero_POPULATED) - FetchContent_Populate(LevelZero) - # Add patch to L0 build - file(WRITE "${levelzero_SOURCE_DIR}/VERSION_PATCH" ${LZ_VER_PATCH}) - add_subdirectory(${levelzero_SOURCE_DIR} ${levelzero_BINARY_DIR} EXCLUDE_FROM_ALL) - endif() - - get_target_property(PTI_ZE_LOADER_RUNTIME_DIR ze_loader RUNTIME_OUTPUT_DIRECTORY) - - # Create new target to treat level zero loader as an external dependency. - # This prevents it from being added to the export set. - # (Basically treat as if including via find_package) - add_library(pti_ze_loader INTERFACE IMPORTED) - add_dependencies(pti_ze_loader ze_tracing_layer ze_validation_layer) - - set(PTI_LZ_COMPILE_OPTIONS - $<$: - -Wno-error - -Wno-unused-parameter - -Wno-unused-function - -Wno-cast-function-type-mismatch - -Wno-extra-semi - $<$,19.0.0>:-Wno-variadic-macro-arguments-omitted> - > - $<$: - /wd6285 /wd6246 /wd6031 /wd6386 - $<$:/wd4702 /wd6385 /wd6386> - > - $<$: - -Wno-error - -Wno-unused-parameter - $<$,8.0.0>:-Wno-extra-semi> - $<$,4.8.0>:-Wno-pedantic> - > - $<$: - -Wno-error - -Wno-unused-parameter - -Wno-unused-function - $<$,3.0.0>:-Wno-extra-semi> - $<$,19.0.0>:-Wno-variadic-macro-arguments-omitted> - > - ) - - # Silence Warnings from Level Zero Loader. Allows us to better detect PTI - # warnings and errors. - set_target_properties(ze_loader ze_tracing_layer ze_null ze_validation_layer level_zero_utils - PROPERTIES - COMPILE_OPTIONS "${PTI_LZ_COMPILE_OPTIONS}" - RUNTIME_OUTPUT_DIRECTORY "${PTI_ZE_LOADER_RUNTIME_DIR}/loader") - - # Pull Headers out of source tree and add them to level_zero/ - # This allows us to keep the normal way to include level zero - file(GLOB_RECURSE L0_DL_HEADERS - LIST_DIRECTORIES TRUE - "${levelzero_SOURCE_DIR}/include/*") - - file(COPY ${L0_DL_HEADERS} - DESTINATION - ${LZ_BASE_DIR}/levelzero-headers/include/level_zero/) - - # Add new header path to our new target - find_path(LZ_INCLUDE_DIR - NAMES level_zero/ze_api.h - HINTS ${LZ_BASE_DIR}/levelzero-headers - PATH_SUFFIXES include - NO_PACKAGE_ROOT_PATH - NO_CMAKE_PATH - NO_CMAKE_ENVIRONMENT_PATH - NO_SYSTEM_ENVIRONMENT_PATH - NO_CMAKE_SYSTEM_PATH - NO_CMAKE_FIND_ROOT_PATH - ) - - set_target_properties(pti_ze_loader PROPERTIES - INTERFACE_INCLUDE_DIRECTORIES ${LZ_INCLUDE_DIR}) - - target_link_libraries(pti_ze_loader INTERFACE - $) - add_library(LevelZero::level-zero ALIAS pti_ze_loader) - add_library(LevelZero::headers INTERFACE IMPORTED) - set_target_properties( - LevelZero::headers - PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${LZ_INCLUDE_DIR}") - endif() -endmacro() - -macro(GetLevelZeroExtensions) - if (NOT TARGET LevelZero::level-zero-ext) - add_library(level-zero-ext INTERFACE) - add_library(LevelZero::level-zero-ext ALIAS level-zero-ext) - - target_include_directories(level-zero-ext SYSTEM INTERFACE - $) - - target_link_libraries(level-zero-ext INTERFACE LevelZero::headers) - endif() -endmacro() - -if(NOT TARGET LevelZero::level-zero) - find_package(LevelZero ${PTI_LEVELZERO_VERSION}) -endif() - -GetLevelZero() -GetLevelZeroExtensions() diff --git a/sdk/cmake/packaging.cmake b/sdk/cmake/packaging.cmake deleted file mode 100644 index 4feac64f..00000000 --- a/sdk/cmake/packaging.cmake +++ /dev/null @@ -1,95 +0,0 @@ -if(NOT PTI_PROJECT_LICENSE_FILE) - if(EXISTS "${PROJECT_SOURCE_DIR}/../LICENSE") - set(PTI_PROJECT_LICENSE_FILE "${PROJECT_SOURCE_DIR}/../LICENSE") - endif() -endif() - -#################### Generic CPack Configuration #################### -include(ProcessorCount) -ProcessorCount(NPROC) -set(CPACK_THREADS ${NPROC}) - -# TODO: Figure out whether this is desired or not. We have not stripped symbols -# in the past, so for now, this will be kept OFF. Note, leaving this ON is -# incompatible with CPACK_DEBIAN_RUNTIME_DEBUGINFO_PACKAGE and -# CPACK_RPM_RUNTIME_DEBUGINFO_PACKAGE. -set(CPACK_STRIP_FILES OFF) - -set(CPACK_PACKAGE_NAME "${PROJECT_NAME}") -set(CPACK_PACKAGE_VERSION "${PROJECT_VERSION}") -set(CPACK_PACKAGE_VERSION_MAJOR "${PROJECT_VERSION_MAJOR}") -set(CPACK_PACKAGE_VERSION_MINOR "${PROJECT_VERSION_MINOR}") -set(CPACK_PACKAGE_VERSION_PATCH "${PROJECT_VERSION_PATCH}") -set(CPACK_PACKAGE_VENDOR "Intel Corporation") -set(CPACK_PACKAGE_CONTACT "${PROJECT_HOMEPAGE_URL}") -set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${PROJECT_DESCRIPTION}") -set(CPACK_PACKAGE_DESCRIPTION - "${CPACK_PACKAGE_DESCRIPTION_SUMMARY}. Library for Intel trace and profiling.") -set(CPACK_PACKAGE_HOMEPAGE_URL "${PROJECT_HOMEPAGE_URL}") -set(CPACK_PACKAGE_CHECKSUM SHA256) -if (PTI_PROJECT_LICENSE_FILE) - set(CPACK_RESOURCE_FILE_LICENSE "${PTI_PROJECT_LICENSE_FILE}") -endif() -set(CPACK_RESOURCE_FILE_README "${PROJECT_SOURCE_DIR}/README.md") -set(CPACK_RESOURCE_FILE_WELCOME "${CPACK_RESOURCE_FILE_README}") - -set(CPACK_SOURCE_IGNORE_FILES ${CMAKE_CURRENT_BINARY_DIR} .git .cache venv .venv) - -#################### DEBIAN CPack Configuration #################### -set(CPACK_DEB_COMPONENT_INSTALL ON) -set(CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS ON) -set(CPACK_DEBIAN_PACKAGE_NAME "${CPACK_PACKAGE_NAME}") -set(CPACK_DEBIAN_RUNTIME_DEBUGINFO_PACKAGE ON) -set(CPACK_DEBIAN_RUNTIME_PACKAGE_NAME "${CPACK_PACKAGE_NAME}") -set(CPACK_DEBIAN_DEVELOPMENT_PACKAGE_NAME "${CPACK_PACKAGE_NAME}-dev") -set(CPACK_DEBIAN_FILE_NAME DEB-DEFAULT) -set(CPACK_DEBIAN_DEVELOPMENT_PACKAGE_DEPENDS - "${CPACK_PACKAGE_NAME} (=${CPACK_PACKAGE_VERSION})") - -#################### RPM CPack Configuration #################### -set(CPACK_RPM_COMPONENT_INSTALL ON) -set(CPACK_RPM_PACKAGE_NAME "${CPACK_PACKAGE_NAME}") -set(CPACK_RPM_RUNTIME_DEBUGINFO_PACKAGE ON) -set(CPACK_RPM_RUNTIME_PACKAGE_NAME "${CPACK_PACKAGE_NAME}") -set(CPACK_RPM_DEVELOPMENT_PACKAGE_NAME "${CPACK_PACKAGE_NAME}-devel") -set(CPACK_RPM_FILE_NAME RPM-DEFAULT) -set(CPACK_RPM_MAIN_COMPONENT Runtime) -if (CPACK_RESOURCE_FILE_LICENSE) - set(CPACK_RPM_PACKAGE_LICENSE "${CPACK_RESOURCE_FILE_LICENSE}") -endif() -set(CPACK_RPM_RUNTIME_PACKAGE_AUTOREQPROV ON) -set(CPACK_RPM_DEVELOPMENT_PACKAGE_AUTOREQPROV ON) -set(CPACK_RPM_DEVELOPMENT_PACKAGE_REQUIRES "${CPACK_PACKAGE_NAME} = ${CPACK_PACKAGE_VERSION}") - -include(CPack) # After CPACK_* - -cpack_add_component( - Pti_Runtime - DISPLAY_NAME "Libraries" - DESCRIPTION "Libraries used to link" - GROUP Runtime -) - -cpack_add_component( - Pti_Development - DISPLAY_NAME "Development" - DESCRIPTION "Header files + configuration files" - GROUP Development - DEPENDS Pti_Runtime -) - -cpack_add_component( - Pti_Doc - DISPLAY_NAME "Documentation" - DESCRIPTION "Documentation related files" - GROUP Doc - DEPENDS Pti_Runtime -) - -cpack_add_component( - Pti_oneAPI - DISPLAY_NAME "oneAPI-specifics" - DESCRIPTION "files related to oneAPI installation" - GROUP oneAPI - DEPENDS Pti_Runtime -) diff --git a/sdk/cmake/tags/lin_conda_tags.txt b/sdk/cmake/tags/lin_conda_tags.txt deleted file mode 100644 index 1f212fe9..00000000 --- a/sdk/cmake/tags/lin_conda_tags.txt +++ /dev/null @@ -1 +0,0 @@ -path_to_components = diff --git a/sdk/cmake/tags/lin_def_tags.txt b/sdk/cmake/tags/lin_def_tags.txt deleted file mode 100644 index 1f212fe9..00000000 --- a/sdk/cmake/tags/lin_def_tags.txt +++ /dev/null @@ -1 +0,0 @@ -path_to_components = diff --git a/sdk/cmake/tags/lin_pip_tags.txt b/sdk/cmake/tags/lin_pip_tags.txt deleted file mode 100644 index 1f212fe9..00000000 --- a/sdk/cmake/tags/lin_pip_tags.txt +++ /dev/null @@ -1 +0,0 @@ -path_to_components = diff --git a/sdk/cmake/tags/win_conda_tags.txt b/sdk/cmake/tags/win_conda_tags.txt deleted file mode 100644 index 1f212fe9..00000000 --- a/sdk/cmake/tags/win_conda_tags.txt +++ /dev/null @@ -1 +0,0 @@ -path_to_components = diff --git a/sdk/cmake/tags/win_def_tags.txt b/sdk/cmake/tags/win_def_tags.txt deleted file mode 100644 index 1f212fe9..00000000 --- a/sdk/cmake/tags/win_def_tags.txt +++ /dev/null @@ -1 +0,0 @@ -path_to_components = diff --git a/sdk/cmake/tags/win_pip_tags.txt b/sdk/cmake/tags/win_pip_tags.txt deleted file mode 100644 index a8834484..00000000 --- a/sdk/cmake/tags/win_pip_tags.txt +++ /dev/null @@ -1 +0,0 @@ -path_to_components = /Library diff --git a/sdk/cmake/toolchains/clang_toolchain.cmake b/sdk/cmake/toolchains/clang_toolchain.cmake deleted file mode 100644 index 2f95dfea..00000000 --- a/sdk/cmake/toolchains/clang_toolchain.cmake +++ /dev/null @@ -1,7 +0,0 @@ -set(CMAKE_C_COMPILER "clang") -set(CMAKE_CXX_COMPILER "clang++") - -find_program(CLANGXX_PATH NAMES clang++) -get_filename_component(_bin_dir ${CLANGXX_PATH} DIRECTORY) -get_filename_component(_prefix "${_bin_dir}" DIRECTORY) -list(PREPEND CMAKE_PREFIX_PATH "${_prefix}") diff --git a/sdk/cmake/toolchains/dpclang_toolchain.cmake b/sdk/cmake/toolchains/dpclang_toolchain.cmake deleted file mode 100644 index 02dd407b..00000000 --- a/sdk/cmake/toolchains/dpclang_toolchain.cmake +++ /dev/null @@ -1,7 +0,0 @@ -set(CMAKE_C_COMPILER "dpclang") -set(CMAKE_CXX_COMPILER "dpclang++") - -find_program(DPCLANGXX_PATH NAMES dpclang++) -get_filename_component(_bin_dir ${DPCLANGXX_PATH} DIRECTORY) -get_filename_component(_prefix "${_bin_dir}" DIRECTORY) -list(PREPEND CMAKE_PREFIX_PATH "${_prefix}") diff --git a/sdk/cmake/toolchains/icpx_asan_toolchain.cmake b/sdk/cmake/toolchains/icpx_asan_toolchain.cmake deleted file mode 100644 index 93850e38..00000000 --- a/sdk/cmake/toolchains/icpx_asan_toolchain.cmake +++ /dev/null @@ -1,14 +0,0 @@ -if (UNIX) - set(CMAKE_C_COMPILER icx) - set(CMAKE_CXX_COMPILER icpx) -endif() - -if (WIN32) - set(CMAKE_C_COMPILER icx) - set(CMAKE_CXX_COMPILER icx) -endif() - -set(CMAKE_CXX_FLAGS_DEBUG_INIT "-Xarch_host -fsanitize=address -Xarch_host -fsanitize=undefined -fno-omit-frame-pointer -fno-optimize-sibling-calls") -set(CMAKE_C_FLAGS_DEBUG_INIT "-Xarch_host -fsanitize=address -Xarch_host -fsanitize=undefined") - -set(PTI_SANITIZER ON CACHE BOOL "Build uses sanitizers") diff --git a/sdk/cmake/toolchains/icpx_fuzz_toolchain.cmake b/sdk/cmake/toolchains/icpx_fuzz_toolchain.cmake deleted file mode 100644 index 39f4932a..00000000 --- a/sdk/cmake/toolchains/icpx_fuzz_toolchain.cmake +++ /dev/null @@ -1,41 +0,0 @@ -if(UNIX) - set(CMAKE_C_COMPILER icx) - set(CMAKE_CXX_COMPILER icpx) - - # Work around for not having libubsan on some platforms. - find_library( - Ubsan_LIBRARY - NAMES ubsan libubsan.so.1 - HINTS ENV LIBRARY_PATH - PATHS ${CMAKE_LIBRARY_PATH} - ENV LD_LIBRARY_PATH - /usr/lib/x86_64-linux-gnu - /usr/lib64 - /usr/lib - PATH_SUFFIXES lib - lib/${CMAKE_LIBRARY_ARCHITECTURE} - lib/x86_64-linux-gnu - lib64 - lib64/${CMAKE_LIBRARY_ARCHITECTURE} - lib64/x86_64-linux-gnu - NO_CMAKE_FIND_ROOT_PATH - ) - - if (Ubsan_LIBRARY) - # This seems related? https://github.com/google/oss-fuzz/issues/713 - set(CMAKE_C_STANDARD_LIBRARIES "-lubsan") - endif() -endif() - -if(WIN32) - set(CMAKE_C_COMPILER icx) - set(CMAKE_CXX_COMPILER icx) -endif() - -set(CMAKE_CXX_FLAGS_DEBUG_INIT - "-Xarch_host -fsanitize=address -Xarch_host -fsanitize=undefined -fno-omit-frame-pointer -fno-optimize-sibling-calls -fsanitize-ignorelist=${PROJECT_SOURCE_DIR}/test/fuzz/ubsan-ignore.txt" -) -set(CMAKE_C_FLAGS_DEBUG_INIT - "-Xarch_host -fsanitize=address -Xarch_host -fsanitize=undefined") - -set(PTI_SANITIZER ON CACHE BOOL "Build uses sanitizers") diff --git a/sdk/cmake/toolchains/icpx_toolchain.cmake b/sdk/cmake/toolchains/icpx_toolchain.cmake deleted file mode 100644 index 493e927d..00000000 --- a/sdk/cmake/toolchains/icpx_toolchain.cmake +++ /dev/null @@ -1,9 +0,0 @@ -if (UNIX) - set(CMAKE_C_COMPILER icx) - set(CMAKE_CXX_COMPILER icpx) -endif() - -if (WIN32) - set(CMAKE_C_COMPILER icx) - set(CMAKE_CXX_COMPILER icx) -endif() diff --git a/sdk/cmake/toolchains/icpx_tsan_toolchain.cmake b/sdk/cmake/toolchains/icpx_tsan_toolchain.cmake deleted file mode 100644 index 3ce5ff43..00000000 --- a/sdk/cmake/toolchains/icpx_tsan_toolchain.cmake +++ /dev/null @@ -1,14 +0,0 @@ -if (UNIX) - set(CMAKE_C_COMPILER icx) - set(CMAKE_CXX_COMPILER icpx) -endif() - -if (WIN32) - set(CMAKE_C_COMPILER icx) - set(CMAKE_CXX_COMPILER icx) -endif() - -set(CMAKE_CXX_FLAGS_DEBUG_INIT "-fno-omit-frame-pointer -Xarch_host -fsanitize=thread -fsanitize-ignorelist=${CMAKE_CURRENT_LIST_DIR}/tsan-ignore.txt -fsanitize-recover=all") -set(CMAKE_C_FLAGS_DEBUG_INIT " -fno-omit-frame-pointer -Xarch_host -fsanitize=thread -fsanitize-recover=all") - -set(PTI_SANITIZER ON CACHE BOOL "Build uses sanitizers") diff --git a/sdk/cmake/toolchains/scikit-build.cmake b/sdk/cmake/toolchains/scikit-build.cmake deleted file mode 100644 index af7a9930..00000000 --- a/sdk/cmake/toolchains/scikit-build.cmake +++ /dev/null @@ -1,15 +0,0 @@ -if (UNIX) - set(CMAKE_C_COMPILER icx) - set(CMAKE_CXX_COMPILER icpx) -endif() - -if (WIN32) - set(CMAKE_C_COMPILER icx) - set(CMAKE_CXX_COMPILER icx) -endif() - -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 "") diff --git a/sdk/cmake/toolchains/tsan-ignore.txt b/sdk/cmake/toolchains/tsan-ignore.txt deleted file mode 100644 index f84ac47f..00000000 --- a/sdk/cmake/toolchains/tsan-ignore.txt +++ /dev/null @@ -1,5 +0,0 @@ -# Functions excluded from ThreadSanitizer (TSan) instrumentation. -# Exclude ZeCollector methods that access GPU memory/timestamps -fun:*ZeCollector*ProcessCallTimestamp* -fun:*ZeCollector*ProcessCallCommand* -fun:*ZeCollector*ProcessCalls* diff --git a/sdk/docker/docker.mk b/sdk/docker/docker.mk deleted file mode 100644 index 0f8a2ec0..00000000 --- a/sdk/docker/docker.mk +++ /dev/null @@ -1,93 +0,0 @@ -USE_BUILDKIT := 1 - -REL_UBUNTU_24:= ubuntu-24-04 -REL_UBUNTU_24_CLIENT:= ubuntu-24-04-client -REL_UBUNTU_26_CLIENT:= ubuntu-26-04-client - -REL_ROCKY:= rocky-8 -SERVER_TARGETS:= ${REL_UBUNTU_24} ${REL_ROCKY} -CLIENT_TARGETS:= ${REL_UBUNTU_24_CLIENT} ${REL_UBUNTU_26_CLIENT} -.PHONY:${SERVER_TARGETS} ${CLIENT_TARGETS} - -ONEAPI_VER=2026.1 - -targets: ${SERVER_TARGETS} ${CLIENT_TARGETS} - @echo BUILT ${SERVER_TARGETS} ${CLIENT_TARGETS} - -OS_TARGETS_MIN:=$(foreach os, ${SERVER_TARGETS} ${CLIENT_TARGETS} , min_os_${os}) - -.PHONY: min_os_all -min_os_all: ${OS_TARGETS_MIN} - -VER_UBUNTU_24:=10 -VER_UBUNTU_24_CLIENT:=10 -VER_UBUNTU_26_CLIENT:=10 -VER_ROCKY:=10 -define getOsVer - $(if $(filter $1, ${REL_UBUNTU_24}),${VER_UBUNTU_24},\ - $(if $(filter $1, ${REL_UBUNTU_24_CLIENT}),${VER_UBUNTU_24_CLIENT},\ - $(if $(filter $1, ${REL_UBUNTU_26_CLIENT}),${VER_UBUNTU_26_CLIENT},\ - $(if $(filter $1, ${REL_ROCKY}),${VER_ROCKY},\ - $(error "Undefined target $1 in getOsVer function") \ - )))) -endef - -define ERROR_MESSAGE_PTI_CONTAINER -PTI_CONTAINER_NAME variable must be defined. -It is the name for the container we are building for PTI. -The invocation should be: -PTI_CONTAINER_NAME=NAME make -f docker.mk - -endef - -ifndef PTI_CONTAINER_NAME -$(error $(ERROR_MESSAGE_PTI_CONTAINER)) -endif - -define WARNING_MESSAGE_PROXY -PROXY is not set. -If you wish to set the proxy for the docker build - -PROXY='http_proxy=YOUR_PROXY_ADDRESS,https_proxy=YOUR_PROXY_ADDRESS ' PTI_CONTAINER_NAME=NAME_OF_IMAGE make -f docker.mk - - -endef - -ifndef PROXY -$(warning $(WARNING_MESSAGE_PROXY)) -endif - -.PHONY: help -help: - @echo Possible invocations are - @echo PTI_CONTAINER_NAME= PROXY='' make -f docker.mk ubuntu-24-04 - @echo PTI_CONTAINER_NAME= PROXY='' make -f docker.mk ubuntu-24-04-client - @echo PTI_CONTAINER_NAME= PROXY='' make -f docker.mk ubuntu-26-04-client - @echo PTI_CONTAINER_NAME= PROXY='' make -f docker.mk - - -PARSED_PROXY:=$(shell IFS=','; for i in $${PROXY}; do echo -n " --build-arg " $$i; done) - -# Rule to build the minimal OS image for each target. -# This builds a Docker image using the min_os.Dockerfile for the given OS. -# This allows invocations like this one: -# PROXY='http_proxy=XX,https_proxy=YY' PTI_CONTAINER_NAME=pti_container make -f docker.mk min_os_ubuntu-24-04 -min_os_%: - @echo Building $@ - @DOCKER_BUILDKIT=${USE_BUILDKIT} docker build \ - --file $(patsubst min_os_%,%,$@)/min_os.Dockerfile ${PARSED_PROXY} \ - --tag ""${PTI_CONTAINER_NAME}_min_os:$(strip $(call getOsVer, $(patsubst min_os_%,%, $@)))-$(patsubst min_os_%,%, $@)"" . - -# For each OS target, define a rule that depends on its minimal OS image. -# Then build the full image using bldrun.Dockerfile, passing the minimal image as a build argument. -# Also prints proxy settings and tags the resulting image with version and oneAPI version. -# This allows invocations like this one: -# PROXY='http_proxy=XX,https_proxy=YY' PTI_CONTAINER_NAME=pti_container make -f docker.mk ubuntu-24-04 -$(foreach os,$(SERVER_TARGETS) $(CLIENT_TARGETS),$(eval $(os): min_os_$(os) ;\ - @echo "Building $(os) from min_os_$(os)" ; \ - echo "Proxy setting:" ${PARSED_PROXY} ; \ - DOCKER_BUILDKIT=${USE_BUILDKIT} docker build \ - --file $(os)/bldrun.Dockerfile ${PARSED_PROXY} \ - --build-arg MIN_OS_CONTAINER=""${PTI_CONTAINER_NAME}_min_os:$(strip $(call getOsVer, $(os)))-$(os)"" \ - --tag ""${PTI_CONTAINER_NAME}:$(strip $(call getOsVer, $(os)))-$(os)_${ONEAPI_VER}"" . \ -)) diff --git a/sdk/docker/rocky-8/bldrun.Dockerfile b/sdk/docker/rocky-8/bldrun.Dockerfile deleted file mode 100644 index 09db5ca0..00000000 --- a/sdk/docker/rocky-8/bldrun.Dockerfile +++ /dev/null @@ -1,52 +0,0 @@ -# syntax=docker/dockerfile:1.3 - -ARG MIN_OS_CONTAINER -FROM ${MIN_OS_CONTAINER} - -SHELL ["/bin/bash", "-o", "pipefail", "-c"] - -WORKDIR /tmp - -USER root - -# -# Install the essential packages from oneAPI to build pti -# instead of intel-oneapi-base-toolkit -# -RUN echo '[oneAPI]' > /etc/yum.repos.d/oneAPI.repo; \ - echo 'name=Intel® oneAPI repository' >> /etc/yum.repos.d/oneAPI.repo; \ - echo 'baseurl=https://yum.repos.intel.com/oneapi' >> /etc/yum.repos.d/oneAPI.repo; \ - echo 'enabled=1' >> /etc/yum.repos.d/oneAPI.repo; \ - echo 'gpgcheck=1' >> /etc/yum.repos.d/oneAPI.repo; \ - echo 'repo_gpgcheck=1' >> /etc/yum.repos.d/oneAPI.repo; \ - echo 'gpgkey=https://yum.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB' >> /etc/yum.repos.d/oneAPI.repo && \ - dnf install -y intel-dpcpp-cpp-compiler-2026.1 \ - intel-oneapi-mkl-devel-2026.1 \ - intel-oneapi-dnnl-devel-2026.0 \ - intel-oneapi-ccl-devel-2022.1 && \ - dnf clean all - -# -# Setup the appropriate repos for GPU -# We must use -f to force the Rocky installation of the Rhel driver -# -RUN wget https://repositories.intel.com/gpu/rhel/8.10/intel-gpu-rhel-8.10.run && \ - chmod +x intel-gpu-rhel-8.10.run && \ - ./intel-gpu-rhel-8.10.run -f -y && \ - rm ./intel-gpu-rhel-8.10.run - -RUN dnf install -y --setopt=tsflags=nodocs \ - intel-opencl intel-media libmfxgen1 libvpl2 \ - level-zero intel-level-zero-gpu mesa-dri-drivers mesa-vulkan-drivers \ - mesa-vdpau-drivers libdrm mesa-libEGL mesa-libgbm mesa-libGL \ - mesa-libxatracker libvpl-tools \ - intel-igc-core intel-igc-cm \ - libva libva-utils intel-gmmlib libmetee intel-gsc intel-ocloc \ - intel-igc-opencl-devel level-zero-devel intel-gsc-devel libmetee-devel \ - level-zero-devel \ - intel-metrics-discovery \ - intel-metrics-discovery-devel \ - intel-metrics-library \ - intel-metrics-library-devel && \ - dnf clean all - diff --git a/sdk/docker/rocky-8/min_os.Dockerfile b/sdk/docker/rocky-8/min_os.Dockerfile deleted file mode 100644 index b1ecf27a..00000000 --- a/sdk/docker/rocky-8/min_os.Dockerfile +++ /dev/null @@ -1,34 +0,0 @@ -# syntax=docker/dockerfile:1.3 - -FROM rockylinux:8.9 - -SHELL ["/bin/bash", "-o", "pipefail", "-c"] - -WORKDIR /tmp - -USER root - -RUN dnf -y --setopt=tsflags=nodocs --nogpgcheck update && \ - dnf install -y --setopt=tsflags=nodocs --nogpgcheck 'dnf-command(config-manager)' && \ - dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm && \ - dnf install -y --setopt=tsflags=nodocs --nogpgcheck dnf-plugins-core && \ - dnf config-manager --set-enabled powertools && \ - dnf -y --setopt=tsflags=nodocs --nogpgcheck update && \ - dnf clean all - -#hadolint ignore=DL3008 -RUN dnf install -y --setopt=tsflags=nodocs \ - gcc-c++ \ - procps-ng \ - cmake \ - wget \ - ninja-build \ - which \ - git \ - vim \ - findutils \ - sudo \ - python3.12 && \ - dnf clean all - -RUN ln -s /usr/bin/python3.12 /usr/bin/python diff --git a/sdk/docker/ubuntu-24-04-client/bldrun.Dockerfile b/sdk/docker/ubuntu-24-04-client/bldrun.Dockerfile deleted file mode 100644 index 30117b21..00000000 --- a/sdk/docker/ubuntu-24-04-client/bldrun.Dockerfile +++ /dev/null @@ -1,34 +0,0 @@ -# syntax=docker/dockerfile:1.3 - -# hadolint ignore=DL3007 - -ARG MIN_OS_CONTAINER -FROM ${MIN_OS_CONTAINER} - -SHELL ["/bin/bash", "-o", "pipefail", "-c"] - -USER root - -RUN apt-get update && \ - apt-get install -y \ - libze-intel-gpu1 libze1 intel-metrics-discovery intel-opencl-icd clinfo intel-gsc \ - intel-media-va-driver-non-free libmfx-gen1 libvpl2 libvpl-tools libva-glx2 va-driver-all vainfo \ - libze-dev intel-ocloc \ - libze-intel-gpu-raytracing \ - intel-metrics-discovery-dev intel-metrics-library intel-metrics-library-dev && \ - apt-get clean -y - -# -# One could install intel-oneapi-base-toolkit-2025.X -# but there are a number of oneapi packages not needed for pti. -# These are the minimum. -# -RUN apt update -y && \ - apt install -y intel-dpcpp-cpp-compiler-2026.1 \ - intel-oneapi-mkl-devel-2026.1 \ - intel-oneapi-dnnl-devel-2026.0 \ - intel-oneapi-ccl-devel-2022.1 && \ - apt-get clean -y - -#RUN update-alternatives --install /usr/local/bin/python python /usr/bin/python3.12 10 - diff --git a/sdk/docker/ubuntu-24-04-client/min_os.Dockerfile b/sdk/docker/ubuntu-24-04-client/min_os.Dockerfile deleted file mode 100644 index 16f1d9ed..00000000 --- a/sdk/docker/ubuntu-24-04-client/min_os.Dockerfile +++ /dev/null @@ -1,51 +0,0 @@ -# syntax=docker/dockerfile:1.4 - -# hadolint ignore=DL3007 - -# This is ubuntu:24.04 -FROM ubuntu:noble - -SHELL ["/bin/bash", "-o", "pipefail", "-c"] - -USER root - -#hadolint ignore=DL3008 -RUN apt-get update -y && \ - apt-get upgrade --no-install-recommends -y && \ - apt-get install --no-install-recommends -y \ - cmake \ - ninja-build \ - ncurses* \ - wget \ - gpg \ - git \ - gpg-agent \ - vim \ - make \ - sudo \ - g++ \ - python3.12 \ - python3-pip \ - python3.12-venv \ - ca-certificates && \ - apt-get clean -y - - -# Setup the appropriate repos for oneAPI -# -RUN wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | \ - gpg --dearmor | \ - tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null && \ - echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | \ - tee /etc/apt/sources.list.d/oneAPI.list - -# -# Setup the appropriate repos for GPU -# -RUN apt-get update && apt-get install -y software-properties-common && \ - add-apt-repository -y ppa:kobuk-team/intel-graphics-testing \ - --component main \ - --component "main/debug" - -RUN update-alternatives --install /usr/local/bin/python python /usr/bin/python3 10 - diff --git a/sdk/docker/ubuntu-24-04/bldrun.Dockerfile b/sdk/docker/ubuntu-24-04/bldrun.Dockerfile deleted file mode 100644 index b3510751..00000000 --- a/sdk/docker/ubuntu-24-04/bldrun.Dockerfile +++ /dev/null @@ -1,37 +0,0 @@ -# syntax=docker/dockerfile:1.3 - -# hadolint ignore=DL3007 - -ARG MIN_OS_CONTAINER -FROM ${MIN_OS_CONTAINER} - -SHELL ["/bin/bash", "-o", "pipefail", "-c"] - -USER root - -RUN apt update -y && \ - apt install -y \ - intel-opencl-icd libze-intel-gpu1 libze1 \ - intel-media-va-driver-non-free libmfx-gen1 libvpl2 \ - libegl-mesa0 libegl1-mesa-dev libgbm1 libgl1-mesa-dev libgl1-mesa-dri \ - libglapi-mesa libgles2-mesa-dev libglx-mesa0 libigdgmm12 libxatracker2 mesa-va-drivers \ - mesa-vdpau-drivers mesa-vulkan-drivers va-driver-all vainfo hwinfo clinfo \ - libigc-dev intel-igc-cm libigdfcl-dev libigfxcmrt-dev libze-dev \ - intel-ocloc \ - intel-metrics-discovery intel-metrics-discovery-dev \ - intel-metrics-library intel-metrics-library-dev && \ - apt-get clean -y - -# -# One coulde install intel-oneapi-base-toolkit-2025.X -# but there are a number of oneapi packages not needed for pti. -# These are the minimum -# -RUN apt update -y && \ - apt install -y intel-dpcpp-cpp-compiler-2026.1 \ - intel-oneapi-mkl-devel-2026.1 \ - intel-oneapi-dnnl-devel-2026.0 \ - intel-oneapi-ccl-devel-2022.1 - -RUN update-alternatives --install /usr/local/bin/python python /usr/bin/python3.12 10 - diff --git a/sdk/docker/ubuntu-24-04/min_os.Dockerfile b/sdk/docker/ubuntu-24-04/min_os.Dockerfile deleted file mode 100644 index 9eea9c4f..00000000 --- a/sdk/docker/ubuntu-24-04/min_os.Dockerfile +++ /dev/null @@ -1,51 +0,0 @@ -# syntax=docker/dockerfile:1.4 - -# hadolint ignore=DL3007 - -# This is ubuntu:24.04 -FROM ubuntu:noble - -SHELL ["/bin/bash", "-o", "pipefail", "-c"] - -USER root - -#hadolint ignore=DL3008 -RUN apt-get update -y && \ - apt-get upgrade --no-install-recommends -y && \ - apt-get install --no-install-recommends -y \ - cmake \ - ninja-build \ - ncurses* \ - wget \ - gpg \ - git \ - gpg-agent \ - vim \ - make \ - sudo \ - g++ \ - python3.12 \ - python3-pip \ - python3.12-venv \ - ca-certificates && \ - apt-get clean -y - - -# Setup the appropriate repos for oneAPI -# -RUN wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | \ - gpg --dearmor | \ - tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null && \ - echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | \ - tee /etc/apt/sources.list.d/oneAPI.list - -# -# Setup the appropriate repos for GPU -# -RUN wget -qO - https://repositories.intel.com/gpu/intel-graphics.key | \ - gpg --yes --dearmor --output /usr/share/keyrings/intel-graphics.gpg && \ - echo "deb [arch=amd64 signed-by=/usr/share/keyrings/intel-graphics.gpg] https://repositories.intel.com/gpu/ubuntu noble unified" | \ - tee /etc/apt/sources.list.d/intel-gpu-noble.list - -RUN update-alternatives --install /usr/local/bin/python python /usr/bin/python3 10 - diff --git a/sdk/docker/ubuntu-26-04-client/bldrun.Dockerfile b/sdk/docker/ubuntu-26-04-client/bldrun.Dockerfile deleted file mode 100644 index ac96052c..00000000 --- a/sdk/docker/ubuntu-26-04-client/bldrun.Dockerfile +++ /dev/null @@ -1,35 +0,0 @@ -# syntax=docker/dockerfile:1.3 - -# hadolint ignore=DL3007 - -ARG MIN_OS_CONTAINER -FROM ${MIN_OS_CONTAINER} - -SHELL ["/bin/bash", "-o", "pipefail", "-c"] - -USER root - -RUN apt-get update && \ - apt-get install -y \ - libze-intel-gpu1 libze1 intel-metrics-discovery intel-opencl-icd clinfo intel-gsc \ - intel-media-va-driver-non-free libmfx-gen1 libvpl2 libvpl-tools libva-glx2 va-driver-all vainfo \ - libze-dev intel-ocloc \ - libze-intel-gpu-raytracing \ - intel-metrics-discovery-dev intel-metrics-library intel-metrics-library-dev && \ - apt-get clean -y - -# -# One could install intel-oneapi-base-toolkit-2025.X -# but there are a number of oneapi packages not needed for pti. -# These are the minimum. -# -RUN apt update -y && \ - apt install -y \ - intel-dpcpp-cpp-compiler-2026.1 \ - intel-oneapi-mkl-devel-2026.1 \ - intel-oneapi-dnnl-devel-2026.0 \ - intel-oneapi-ccl-devel-2022.1 && \ - apt-get clean -y - -RUN update-alternatives --install /usr/local/bin/python python /usr/bin/python3 10 - diff --git a/sdk/docker/ubuntu-26-04-client/min_os.Dockerfile b/sdk/docker/ubuntu-26-04-client/min_os.Dockerfile deleted file mode 100644 index 3a47b7e6..00000000 --- a/sdk/docker/ubuntu-26-04-client/min_os.Dockerfile +++ /dev/null @@ -1,51 +0,0 @@ -# syntax=docker/dockerfile:1.4 - -# hadolint ignore=DL3007 - -# This is ubuntu:26.04 -FROM ubuntu:resolute - -SHELL ["/bin/bash", "-o", "pipefail", "-c"] - -USER root - -#hadolint ignore=DL3008 -RUN apt-get update -y && \ - apt-get upgrade --no-install-recommends -y && \ - apt-get install --no-install-recommends -y \ - cmake \ - ninja-build \ - ncurses* \ - wget \ - gpg \ - git \ - gpg-agent \ - vim \ - make \ - sudo \ - g++ \ - python3 \ - python3-pip \ - python3-venv \ - ca-certificates && \ - apt-get clean -y - - -# Setup the appropriate repos for oneAPI -# -RUN wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | \ - gpg --dearmor | \ - tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null && \ - echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | \ - tee /etc/apt/sources.list.d/oneAPI.list - -# -# Setup the appropriate repos for GPU -# -RUN apt-get update && apt-get install -y software-properties-common && \ - add-apt-repository -y ppa:kobuk-team/intel-graphics-testing \ - --component main \ - --component "main/debug" - -RUN update-alternatives --install /usr/local/bin/python python /usr/bin/python3 10 - diff --git a/sdk/docs/README.md b/sdk/docs/README.md deleted file mode 100644 index ceff329c..00000000 --- a/sdk/docs/README.md +++ /dev/null @@ -1,36 +0,0 @@ -# How to build PTI Library documentation - -Our documentation is written in restructured text markup (.rst) and built using [Sphinx](http://www.sphinx-doc.org/en/master/). - -This document explains how to build PTI Library documentation locally. - -## Prerequisites -``` -apt install doxygen -pip install -r requirements.txt -``` - -## Build documentation - -Do the following to generate HTML output of the documentation: - -1. Clone PTI repository: - -``` -git clone https://github.com/intel/pti-gpu -``` - -2. Go to the `sdk/docs/sphinx` folder: - -``` -cd sdk/docs/sphinx -``` - -3. Run in the command line: - -``` -make html -``` - - -That's it! Your built documentation is located in the ``build/html`` folder. \ No newline at end of file diff --git a/sdk/docs/doxygen/Doxyfile.in b/sdk/docs/doxygen/Doxyfile.in deleted file mode 100644 index 43c73466..00000000 --- a/sdk/docs/doxygen/Doxyfile.in +++ /dev/null @@ -1,2535 +0,0 @@ -# Doxyfile 1.8.17 - -# This file describes the settings to be used by the documentation system -# doxygen (www.doxygen.org) for a project. -# -# All text after a double hash (##) is considered a comment and is placed in -# front of the TAG it is preceding. -# -# All text after a single hash (#) is considered a comment and will be ignored. -# The format is: -# TAG = value [value, ...] -# For lists, items can also be appended using: -# TAG += value [value, ...] -# Values that contain spaces should be placed between quotes (\" \"). - -#--------------------------------------------------------------------------- -# Project related configuration options -#--------------------------------------------------------------------------- - -# This tag specifies the encoding used for all characters in the configuration -# file that follow. The default is UTF-8 which is also the encoding used for all -# text before the first occurrence of this tag. Doxygen uses libiconv (or the -# iconv built into libc) for the transcoding. See -# https://www.gnu.org/software/libiconv/ for the list of possible encodings. -# The default value is: UTF-8. - -DOXYFILE_ENCODING = UTF-8 - -# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by -# double-quotes, unless you are using Doxywizard) that should identify the -# project for which the documentation is generated. This name is used in the -# title of most generated pages and in a few other places. -# The default value is: My Project. - -PROJECT_NAME = "PTI Library" - -# The PROJECT_NUMBER tag can be used to enter a project or revision number. This -# could be handy for archiving the generated documentation or if some version -# control system is used. - -PROJECT_NUMBER = @PROJECT_VERSION@ - -# Using the PROJECT_BRIEF tag one can provide an optional one line description -# for a project that appears at the top of each page and should give viewer a -# quick idea about the purpose of the project. Keep the description short. - -PROJECT_BRIEF = "Profiling Tools Interfaces Library" - -# With the PROJECT_LOGO tag one can specify a logo or an icon that is included -# in the documentation. The maximum height of the logo should not exceed 55 -# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy -# the logo to the output directory. - -PROJECT_LOGO = - -# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path -# into which the generated documentation will be written. If a relative path is -# entered, it will be relative to the location where doxygen was started. If -# left blank the current directory will be used. - -OUTPUT_DIRECTORY = @PTI_DOXYGEN_OUTPUT_DIR@ - -# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub- -# directories (in 2 levels) under the output directory of each output format and -# will distribute the generated files over these directories. Enabling this -# option can be useful when feeding doxygen a huge amount of source files, where -# putting all generated files in the same directory would otherwise causes -# performance problems for the file system. -# The default value is: NO. - -CREATE_SUBDIRS = NO - -# If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII -# characters to appear in the names of generated files. If set to NO, non-ASCII -# characters will be escaped, for example _xE3_x81_x84 will be used for Unicode -# U+3044. -# The default value is: NO. - -ALLOW_UNICODE_NAMES = NO - -# The OUTPUT_LANGUAGE tag is used to specify the language in which all -# documentation generated by doxygen is written. Doxygen will use this -# information to generate all constant output in the proper language. -# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese, -# Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States), -# Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian, -# Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages), -# Korean, Korean-en (Korean with English messages), Latvian, Lithuanian, -# Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian, -# Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish, -# Ukrainian and Vietnamese. -# The default value is: English. - -OUTPUT_LANGUAGE = English - -# The OUTPUT_TEXT_DIRECTION tag is used to specify the direction in which all -# documentation generated by doxygen is written. Doxygen will use this -# information to generate all generated output in the proper direction. -# Possible values are: None, LTR, RTL and Context. -# The default value is: None. - -#OUTPUT_TEXT_DIRECTION = None - -# If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member -# descriptions after the members that are listed in the file and class -# documentation (similar to Javadoc). Set to NO to disable this. -# The default value is: YES. - -BRIEF_MEMBER_DESC = YES - -# If the REPEAT_BRIEF tag is set to YES, doxygen will prepend the brief -# description of a member or function before the detailed description -# -# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the -# brief descriptions will be completely suppressed. -# The default value is: YES. - -REPEAT_BRIEF = YES - -# This tag implements a quasi-intelligent brief description abbreviator that is -# used to form the text in various listings. Each string in this list, if found -# as the leading text of the brief description, will be stripped from the text -# and the result, after processing the whole list, is used as the annotated -# text. Otherwise, the brief description is used as-is. If left blank, the -# following values are used ($name is automatically replaced with the name of -# the entity):The $name class, The $name widget, The $name file, is, provides, -# specifies, contains, represents, a, an and the. - -ABBREVIATE_BRIEF = "The $name class" \ - "The $name widget" \ - "The $name file" \ - is \ - provides \ - specifies \ - contains \ - represents \ - a \ - an \ - the - -# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then -# doxygen will generate a detailed section even if there is only a brief -# description. -# The default value is: NO. - -ALWAYS_DETAILED_SEC = NO - -# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all -# inherited members of a class in the documentation of that class as if those -# members were ordinary class members. Constructors, destructors and assignment -# operators of the base classes will not be shown. -# The default value is: NO. - -INLINE_INHERITED_MEMB = NO - -# If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path -# before files name in the file list and in the header files. If set to NO the -# shortest path that makes the file name unique will be used -# The default value is: YES. - -FULL_PATH_NAMES = NO # YES - -# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path. -# Stripping is only done if one of the specified strings matches the left-hand -# part of the path. The tag can be used to show relative paths in the file list. -# If left blank the directory from which doxygen is run is used as the path to -# strip. -# -# Note that you can specify absolute paths here, but also relative paths, which -# will be relative from the directory where doxygen is started. -# This tag requires that the tag FULL_PATH_NAMES is set to YES. - -STRIP_FROM_PATH = - -# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the -# path mentioned in the documentation of a class, which tells the reader which -# header file to include in order to use a class. If left blank only the name of -# the header file containing the class definition is used. Otherwise one should -# specify the list of include paths that are normally passed to the compiler -# using the -I flag. - -STRIP_FROM_INC_PATH = - -# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but -# less readable) file names. This can be useful is your file systems doesn't -# support long names like on DOS, Mac, or CD-ROM. -# The default value is: NO. - -SHORT_NAMES = NO - -# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the -# first line (until the first dot) of a Javadoc-style comment as the brief -# description. If set to NO, the Javadoc-style will behave just like regular Qt- -# style comments (thus requiring an explicit @brief command for a brief -# description.) -# The default value is: NO. - -JAVADOC_AUTOBRIEF = NO - -# If the JAVADOC_BANNER tag is set to YES then doxygen will interpret a line -# such as -# /*************** -# as being the beginning of a Javadoc-style comment "banner". If set to NO, the -# Javadoc-style will behave just like regular comments and it will not be -# interpreted by doxygen. -# The default value is: NO. - -JAVADOC_BANNER = NO - -# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first -# line (until the first dot) of a Qt-style comment as the brief description. If -# set to NO, the Qt-style will behave just like regular Qt-style comments (thus -# requiring an explicit \brief command for a brief description.) -# The default value is: NO. - -QT_AUTOBRIEF = NO - -# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a -# multi-line C++ special comment block (i.e. a block of //! or /// comments) as -# a brief description. This used to be the default behavior. The new default is -# to treat a multi-line C++ comment block as a detailed description. Set this -# tag to YES if you prefer the old behavior instead. -# -# Note that setting this tag to YES also means that rational rose comments are -# not recognized any more. -# The default value is: NO. - -MULTILINE_CPP_IS_BRIEF = NO - -# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the -# documentation from any documented member that it re-implements. -# The default value is: YES. - -INHERIT_DOCS = YES - -# If the SEPARATE_MEMBER_PAGES tag is set to YES then doxygen will produce a new -# page for each member. If set to NO, the documentation of a member will be part -# of the file/class/namespace that contains it. -# The default value is: NO. - -SEPARATE_MEMBER_PAGES = NO - -# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen -# uses this value to replace tabs by spaces in code fragments. -# Minimum value: 1, maximum value: 16, default value: 4. - -TAB_SIZE = 4 - -# This tag can be used to specify a number of aliases that act as commands in -# the documentation. An alias has the form: -# name=value -# For example adding -# "sideeffect=@par Side Effects:\n" -# will allow you to put the command \sideeffect (or @sideeffect) in the -# documentation, which will result in a user-defined paragraph with heading -# "Side Effects:". You can put \n's in the value part of an alias to insert -# newlines (in the resulting output). You can put ^^ in the value part of an -# alias to insert a newline as if a physical newline was in the original file. -# When you need a literal { or } or , in the value part of an alias you have to -# escape them by means of a backslash (\), this can lead to conflicts with the -# commands \{ and \} for these it is advised to use the version @{ and @} or use -# a double escape (\\{ and \\}) - -ALIASES = - -# This tag can be used to specify a number of word-keyword mappings (TCL only). -# A mapping has the form "name=value". For example adding "class=itcl::class" -# will allow you to use the command class in the itcl::class meaning. - -#TCL_SUBST = - -# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources -# only. Doxygen will then generate output that is more tailored for C. For -# instance, some of the names that are used will be different. The list of all -# members will be omitted, etc. -# The default value is: NO. - -OPTIMIZE_OUTPUT_FOR_C = NO - -# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or -# Python sources only. Doxygen will then generate output that is more tailored -# for that language. For instance, namespaces will be presented as packages, -# qualified scopes will look different, etc. -# The default value is: NO. - -OPTIMIZE_OUTPUT_JAVA = NO - -# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran -# sources. Doxygen will then generate output that is tailored for Fortran. -# The default value is: NO. - -OPTIMIZE_FOR_FORTRAN = NO - -# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL -# sources. Doxygen will then generate output that is tailored for VHDL. -# The default value is: NO. - -OPTIMIZE_OUTPUT_VHDL = NO - -# Set the OPTIMIZE_OUTPUT_SLICE tag to YES if your project consists of Slice -# sources only. Doxygen will then generate output that is more tailored for that -# language. For instance, namespaces will be presented as modules, types will be -# separated into more groups, etc. -# The default value is: NO. - -OPTIMIZE_OUTPUT_SLICE = NO - -# Doxygen selects the parser to use depending on the extension of the files it -# parses. With this tag you can assign which parser to use for a given -# extension. Doxygen has a built-in mapping, but you can override or extend it -# using this tag. The format is ext=language, where ext is a file extension, and -# language is one of the parsers supported by doxygen: IDL, Java, JavaScript, -# Csharp (C#), C, C++, D, PHP, md (Markdown), Objective-C, Python, Slice, -# Fortran (fixed format Fortran: FortranFixed, free formatted Fortran: -# FortranFree, unknown formatted Fortran: Fortran. In the later case the parser -# tries to guess whether the code is fixed or free formatted code, this is the -# default for Fortran type files), VHDL, tcl. For instance to make doxygen treat -# .inc files as Fortran files (default is PHP), and .f files as C (default is -# Fortran), use: inc=Fortran f=C. -# -# Note: For files without extension you can use no_extension as a placeholder. -# -# Note that for custom extensions you also need to set FILE_PATTERNS otherwise -# the files are not read by doxygen. - -EXTENSION_MAPPING = - -# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments -# according to the Markdown format, which allows for more readable -# documentation. See https://daringfireball.net/projects/markdown/ for details. -# The output of markdown processing is further processed by doxygen, so you can -# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in -# case of backward compatibilities issues. -# The default value is: YES. - -MARKDOWN_SUPPORT = YES - -# When the TOC_INCLUDE_HEADINGS tag is set to a non-zero value, all headings up -# to that level are automatically included in the table of contents, even if -# they do not have an id attribute. -# Note: This feature currently applies only to Markdown headings. -# Minimum value: 0, maximum value: 99, default value: 5. -# This tag requires that the tag MARKDOWN_SUPPORT is set to YES. - -TOC_INCLUDE_HEADINGS = 5 - -# When enabled doxygen tries to link words that correspond to documented -# classes, or namespaces to their corresponding documentation. Such a link can -# be prevented in individual cases by putting a % sign in front of the word or -# globally by setting AUTOLINK_SUPPORT to NO. -# The default value is: YES. - -AUTOLINK_SUPPORT = YES - -# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want -# to include (a tag file for) the STL sources as input, then you should set this -# tag to YES in order to let doxygen match functions declarations and -# definitions whose arguments contain STL classes (e.g. func(std::string); -# versus func(std::string) {}). This also make the inheritance and collaboration -# diagrams that involve STL classes more complete and accurate. -# The default value is: NO. - -BUILTIN_STL_SUPPORT = NO - -# If you use Microsoft's C++/CLI language, you should set this option to YES to -# enable parsing support. -# The default value is: NO. - -CPP_CLI_SUPPORT = NO - -# Set the SIP_SUPPORT tag to YES if your project consists of sip (see: -# https://www.riverbankcomputing.com/software/sip/intro) sources only. Doxygen -# will parse them like normal C++ but will assume all classes use public instead -# of private inheritance when no explicit protection keyword is present. -# The default value is: NO. - -SIP_SUPPORT = NO - -# For Microsoft's IDL there are propget and propput attributes to indicate -# getter and setter methods for a property. Setting this option to YES will make -# doxygen to replace the get and set methods by a property in the documentation. -# This will only work if the methods are indeed getting or setting a simple -# type. If this is not the case, or you want to show the methods anyway, you -# should set this option to NO. -# The default value is: YES. - -IDL_PROPERTY_SUPPORT = YES - -# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC -# tag is set to YES then doxygen will reuse the documentation of the first -# member in the group (if any) for the other members of the group. By default -# all members of a group must be documented explicitly. -# The default value is: NO. - -DISTRIBUTE_GROUP_DOC = NO - -# If one adds a struct or class to a group and this option is enabled, then also -# any nested class or struct is added to the same group. By default this option -# is disabled and one has to add nested compounds explicitly via \ingroup. -# The default value is: NO. - -GROUP_NESTED_COMPOUNDS = NO - -# Set the SUBGROUPING tag to YES to allow class member groups of the same type -# (for instance a group of public functions) to be put as a subgroup of that -# type (e.g. under the Public Functions section). Set it to NO to prevent -# subgrouping. Alternatively, this can be done per class using the -# \nosubgrouping command. -# The default value is: YES. - -SUBGROUPING = YES - -# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions -# are shown inside the group in which they are included (e.g. using \ingroup) -# instead of on a separate page (for HTML and Man pages) or section (for LaTeX -# and RTF). -# -# Note that this feature does not work in combination with -# SEPARATE_MEMBER_PAGES. -# The default value is: NO. - -INLINE_GROUPED_CLASSES = NO - -# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions -# with only public data fields or simple typedef fields will be shown inline in -# the documentation of the scope in which they are defined (i.e. file, -# namespace, or group documentation), provided this scope is documented. If set -# to NO, structs, classes, and unions are shown on a separate page (for HTML and -# Man pages) or section (for LaTeX and RTF). -# The default value is: NO. - -INLINE_SIMPLE_STRUCTS = NO - -# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or -# enum is documented as struct, union, or enum with the name of the typedef. So -# typedef struct TypeS {} TypeT, will appear in the documentation as a struct -# with name TypeT. When disabled the typedef will appear as a member of a file, -# namespace, or class. And the struct will be named TypeS. This can typically be -# useful for C code in case the coding convention dictates that all compound -# types are typedef'ed and only the typedef is referenced, never the tag name. -# The default value is: NO. - -TYPEDEF_HIDES_STRUCT = YES - -# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This -# cache is used to resolve symbols given their name and scope. Since this can be -# an expensive process and often the same symbol appears multiple times in the -# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small -# doxygen will become slower. If the cache is too large, memory is wasted. The -# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range -# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536 -# symbols. At the end of a run doxygen will report the cache usage and suggest -# the optimal cache size from a speed point of view. -# Minimum value: 0, maximum value: 9, default value: 0. - -LOOKUP_CACHE_SIZE = 0 - -#--------------------------------------------------------------------------- -# Build related configuration options -#--------------------------------------------------------------------------- - -# If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in -# documentation are documented, even if no documentation was available. Private -# class members and static file members will be hidden unless the -# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES. -# Note: This will also disable the warnings about undocumented members that are -# normally produced when WARNINGS is set to YES. -# The default value is: NO. - -EXTRACT_ALL = YES - -# If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will -# be included in the documentation. -# The default value is: NO. - -EXTRACT_PRIVATE = YES - -# If the EXTRACT_PRIV_VIRTUAL tag is set to YES, documented private virtual -# methods of a class will be included in the documentation. -# The default value is: NO. - -EXTRACT_PRIV_VIRTUAL = NO - -# If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal -# scope will be included in the documentation. -# The default value is: NO. - -EXTRACT_PACKAGE = NO - -# If the EXTRACT_STATIC tag is set to YES, all static members of a file will be -# included in the documentation. -# The default value is: NO. - -EXTRACT_STATIC = YES - -# If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined -# locally in source files will be included in the documentation. If set to NO, -# only classes defined in header files are included. Does not have any effect -# for Java sources. -# The default value is: YES. - -EXTRACT_LOCAL_CLASSES = YES - -# This flag is only useful for Objective-C code. If set to YES, local methods, -# which are defined in the implementation section but not in the interface are -# included in the documentation. If set to NO, only methods in the interface are -# included. -# The default value is: NO. - -EXTRACT_LOCAL_METHODS = NO - -# If this flag is set to YES, the members of anonymous namespaces will be -# extracted and appear in the documentation as a namespace called -# 'anonymous_namespace{file}', where file will be replaced with the base name of -# the file that contains the anonymous namespace. By default anonymous namespace -# are hidden. -# The default value is: NO. - -EXTRACT_ANON_NSPACES = YES - -# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all -# undocumented members inside documented classes or files. If set to NO these -# members will be included in the various overviews, but no documentation -# section is generated. This option has no effect if EXTRACT_ALL is enabled. -# The default value is: NO. - -HIDE_UNDOC_MEMBERS = NO - -# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all -# undocumented classes that are normally visible in the class hierarchy. If set -# to NO, these classes will be included in the various overviews. This option -# has no effect if EXTRACT_ALL is enabled. -# The default value is: NO. - -HIDE_UNDOC_CLASSES = NO - -# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend -# declarations. If set to NO, these declarations will be included in the -# documentation. -# The default value is: NO. - -HIDE_FRIEND_COMPOUNDS = NO - -# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any -# documentation blocks found inside the body of a function. If set to NO, these -# blocks will be appended to the function's detailed documentation block. -# The default value is: NO. - -HIDE_IN_BODY_DOCS = NO - -# The INTERNAL_DOCS tag determines if documentation that is typed after a -# \internal command is included. If the tag is set to NO then the documentation -# will be excluded. Set it to YES to include the internal documentation. -# The default value is: NO. - -INTERNAL_DOCS = NO - -# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file -# names in lower-case letters. If set to YES, upper-case letters are also -# allowed. This is useful if you have classes or files whose names only differ -# in case and if your file system supports case sensitive file names. Windows -# (including Cygwin) ands Mac users are advised to set this option to NO. -# The default value is: system dependent. - -CASE_SENSE_NAMES = YES - -# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with -# their full class and namespace scopes in the documentation. If set to YES, the -# scope will be hidden. -# The default value is: NO. - -HIDE_SCOPE_NAMES = NO - -# If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will -# append additional text to a page's title, such as Class Reference. If set to -# YES the compound reference will be hidden. -# The default value is: NO. - -HIDE_COMPOUND_REFERENCE= NO - -# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of -# the files that are included by a file in the documentation of that file. -# The default value is: YES. - -SHOW_INCLUDE_FILES = YES - -# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each -# grouped member an include statement to the documentation, telling the reader -# which file to include in order to use the member. -# The default value is: NO. - -SHOW_GROUPED_MEMB_INC = NO - -# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include -# files with double quotes in the documentation rather than with sharp brackets. -# The default value is: NO. - -FORCE_LOCAL_INCLUDES = NO - -# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the -# documentation for inline members. -# The default value is: YES. - -INLINE_INFO = YES - -# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the -# (detailed) documentation of file and class members alphabetically by member -# name. If set to NO, the members will appear in declaration order. -# The default value is: YES. - -SORT_MEMBER_DOCS = YES - -# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief -# descriptions of file, namespace and class members alphabetically by member -# name. If set to NO, the members will appear in declaration order. Note that -# this will also influence the order of the classes in the class list. -# The default value is: NO. - -SORT_BRIEF_DOCS = NO - -# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the -# (brief and detailed) documentation of class members so that constructors and -# destructors are listed first. If set to NO the constructors will appear in the -# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS. -# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief -# member documentation. -# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting -# detailed member documentation. -# The default value is: NO. - -SORT_MEMBERS_CTORS_1ST = NO - -# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy -# of group names into alphabetical order. If set to NO the group names will -# appear in their defined order. -# The default value is: NO. - -SORT_GROUP_NAMES = NO - -# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by -# fully-qualified names, including namespaces. If set to NO, the class list will -# be sorted only by class name, not including the namespace part. -# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. -# Note: This option applies only to the class list, not to the alphabetical -# list. -# The default value is: NO. - -SORT_BY_SCOPE_NAME = NO - -# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper -# type resolution of all parameters of a function it will reject a match between -# the prototype and the implementation of a member function even if there is -# only one candidate or it is obvious which candidate to choose by doing a -# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still -# accept a match between prototype and implementation in such cases. -# The default value is: NO. - -STRICT_PROTO_MATCHING = NO - -# The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo -# list. This list is created by putting \todo commands in the documentation. -# The default value is: YES. - -GENERATE_TODOLIST = YES - -# The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test -# list. This list is created by putting \test commands in the documentation. -# The default value is: YES. - -GENERATE_TESTLIST = YES - -# The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug -# list. This list is created by putting \bug commands in the documentation. -# The default value is: YES. - -GENERATE_BUGLIST = YES - -# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO) -# the deprecated list. This list is created by putting \deprecated commands in -# the documentation. -# The default value is: YES. - -GENERATE_DEPRECATEDLIST= YES - -# The ENABLED_SECTIONS tag can be used to enable conditional documentation -# sections, marked by \if ... \endif and \cond -# ... \endcond blocks. - -ENABLED_SECTIONS = - -# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the -# initial value of a variable or macro / define can have for it to appear in the -# documentation. If the initializer consists of more lines than specified here -# it will be hidden. Use a value of 0 to hide initializers completely. The -# appearance of the value of individual variables and macros / defines can be -# controlled using \showinitializer or \hideinitializer command in the -# documentation regardless of this setting. -# Minimum value: 0, maximum value: 10000, default value: 30. - -MAX_INITIALIZER_LINES = 30 - -# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at -# the bottom of the documentation of classes and structs. If set to YES, the -# list will mention the files that were used to generate the documentation. -# The default value is: YES. - -SHOW_USED_FILES = YES - -# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This -# will remove the Files entry from the Quick Index and from the Folder Tree View -# (if specified). -# The default value is: YES. - -SHOW_FILES = YES - -# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces -# page. This will remove the Namespaces entry from the Quick Index and from the -# Folder Tree View (if specified). -# The default value is: YES. - -SHOW_NAMESPACES = NO - -# The FILE_VERSION_FILTER tag can be used to specify a program or script that -# doxygen should invoke to get the current version for each file (typically from -# the version control system). Doxygen will invoke the program by executing (via -# popen()) the command command input-file, where command is the value of the -# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided -# by doxygen. Whatever the program writes to standard output is used as the file -# version. For an example see the documentation. - -FILE_VERSION_FILTER = - -# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed -# by doxygen. The layout file controls the global structure of the generated -# output files in an output format independent way. To create the layout file -# that represents doxygen's defaults, run doxygen with the -l option. You can -# optionally specify a file name after the option, if omitted DoxygenLayout.xml -# will be used as the name of the layout file. -# -# Note that if you run doxygen from a directory containing a file called -# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE -# tag is left empty. - -LAYOUT_FILE = - -# The CITE_BIB_FILES tag can be used to specify one or more bib files containing -# the reference definitions. This must be a list of .bib files. The .bib -# extension is automatically appended if omitted. This requires the bibtex tool -# to be installed. See also https://en.wikipedia.org/wiki/BibTeX for more info. -# For LaTeX the style of the bibliography can be controlled using -# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the -# search path. See also \cite for info how to create references. - -CITE_BIB_FILES = - -#--------------------------------------------------------------------------- -# Configuration options related to warning and progress messages -#--------------------------------------------------------------------------- - -# The QUIET tag can be used to turn on/off the messages that are generated to -# standard output by doxygen. If QUIET is set to YES this implies that the -# messages are off. -# The default value is: NO. - -QUIET = NO - -# The WARNINGS tag can be used to turn on/off the warning messages that are -# generated to standard error (stderr) by doxygen. If WARNINGS is set to YES -# this implies that the warnings are on. -# -# Tip: Turn warnings on while writing the documentation. -# The default value is: YES. - -WARNINGS = YES - -# If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate -# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag -# will automatically be disabled. -# The default value is: YES. - -WARN_IF_UNDOCUMENTED = YES - -# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for -# potential errors in the documentation, such as not documenting some parameters -# in a documented function, or documenting parameters that don't exist or using -# markup commands wrongly. -# The default value is: YES. - -WARN_IF_DOC_ERROR = YES - -# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that -# are documented, but have no documentation for their parameters or return -# value. If set to NO, doxygen will only warn about wrong or incomplete -# parameter documentation, but not about the absence of documentation. If -# EXTRACT_ALL is set to YES then this flag will automatically be disabled. -# The default value is: NO. - -WARN_NO_PARAMDOC = NO - -# If the WARN_AS_ERROR tag is set to YES then doxygen will immediately stop when -# a warning is encountered. -# The default value is: NO. - -WARN_AS_ERROR = NO - -# The WARN_FORMAT tag determines the format of the warning messages that doxygen -# can produce. The string should contain the $file, $line, and $text tags, which -# will be replaced by the file and line number from which the warning originated -# and the warning text. Optionally the format may contain $version, which will -# be replaced by the version of the file (if it could be obtained via -# FILE_VERSION_FILTER) -# The default value is: $file:$line: $text. - -WARN_FORMAT = "$file:$line: $text" - -# The WARN_LOGFILE tag can be used to specify a file to which warning and error -# messages should be written. If left blank the output is written to standard -# error (stderr). - -WARN_LOGFILE = - -#--------------------------------------------------------------------------- -# Configuration options related to the input files -#--------------------------------------------------------------------------- - -# The INPUT tag is used to specify the files and/or directories that contain -# documented source files. You may enter file names like myfile.cpp or -# directories like /usr/src/myproject. Separate the files or directories with -# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING -# Note: If this tag is empty the current directory is searched. - -INPUT = ../../include/pti - -# This tag can be used to specify the character encoding of the source files -# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses -# libiconv (or the iconv built into libc) for the transcoding. See the libiconv -# documentation (see: https://www.gnu.org/software/libiconv/) for the list of -# possible encodings. -# The default value is: UTF-8. - -INPUT_ENCODING = UTF-8 - -# If the value of the INPUT tag contains directories, you can use the -# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and -# *.h) to filter out the source-files in the directories. -# -# Note that for custom extensions or not directly supported extensions you also -# need to set EXTENSION_MAPPING for the extension otherwise the files are not -# read by doxygen. -# -# If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cpp, -# *.c++, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, -# *.hh, *.hxx, *.hpp, *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, -# *.m, *.markdown, *.md, *.mm, *.dox (to be provided as doxygen C comment), -# *.doc (to be provided as doxygen C comment), *.txt (to be provided as doxygen -# C comment), *.py, *.pyw, *.f90, *.f95, *.f03, *.f08, *.f, *.for, *.tcl, *.vhd, -# *.vhdl, *.ucf, *.qsf and *.ice. - -FILE_PATTERNS = *.h - -# The RECURSIVE tag can be used to specify whether or not subdirectories should -# be searched for input files as well. -# The default value is: NO. - -RECURSIVE = NO - -# The EXCLUDE tag can be used to specify files and/or directories that should be -# excluded from the INPUT source files. This way you can easily exclude a -# subdirectory from a directory tree whose root is specified with the INPUT tag. -# -# Note that relative paths are relative to the directory from which doxygen is -# run. - -EXCLUDE = - -# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or -# directories that are symbolic links (a Unix file system feature) are excluded -# from the input. -# The default value is: NO. - -EXCLUDE_SYMLINKS = NO - -# If the value of the INPUT tag contains directories, you can use the -# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude -# certain files from those directories. -# -# Note that the wildcards are matched against the file with absolute path, so to -# exclude all test directories for example use the pattern */test/* - -EXCLUDE_PATTERNS = - -# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names -# (namespaces, classes, functions, etc.) that should be excluded from the -# output. The symbol name can be a fully qualified name, a word, or if the -# wildcard * is used, a substring. Examples: ANamespace, AClass, -# AClass::ANamespace, ANamespace::*Test -# -# Note that the wildcards are matched against the file with absolute path, so to -# exclude all test directories use the pattern */test/* - -# Internal compile-time assertion macro, not part of the public API. -EXCLUDE_SYMBOLS = PTI_STATIC_ASSERT - -# The EXAMPLE_PATH tag can be used to specify one or more files or directories -# that contain example code fragments that are included (see the \include -# command). - -EXAMPLE_PATH = - -# If the value of the EXAMPLE_PATH tag contains directories, you can use the -# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and -# *.h) to filter out the source-files in the directories. If left blank all -# files are included. - -EXAMPLE_PATTERNS = * - -# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be -# searched for input files to be used with the \include or \dontinclude commands -# irrespective of the value of the RECURSIVE tag. -# The default value is: NO. - -EXAMPLE_RECURSIVE = NO - -# The IMAGE_PATH tag can be used to specify one or more files or directories -# that contain images that are to be included in the documentation (see the -# \image command). - -IMAGE_PATH = - -# The INPUT_FILTER tag can be used to specify a program that doxygen should -# invoke to filter for each input file. Doxygen will invoke the filter program -# by executing (via popen()) the command: -# -# -# -# where is the value of the INPUT_FILTER tag, and is the -# name of an input file. Doxygen will then use the output that the filter -# program writes to standard output. If FILTER_PATTERNS is specified, this tag -# will be ignored. -# -# Note that the filter must not add or remove lines; it is applied before the -# code is scanned, but not when the output code is generated. If lines are added -# or removed, the anchors will not be placed correctly. -# -# Note that for custom extensions or not directly supported extensions you also -# need to set EXTENSION_MAPPING for the extension otherwise the files are not -# properly processed by doxygen. - -INPUT_FILTER = - -# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern -# basis. Doxygen will compare the file name with each pattern and apply the -# filter if there is a match. The filters are a list of the form: pattern=filter -# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how -# filters are used. If the FILTER_PATTERNS tag is empty or if none of the -# patterns match the file name, INPUT_FILTER is applied. -# -# Note that for custom extensions or not directly supported extensions you also -# need to set EXTENSION_MAPPING for the extension otherwise the files are not -# properly processed by doxygen. - -FILTER_PATTERNS = - -# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using -# INPUT_FILTER) will also be used to filter the input files that are used for -# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES). -# The default value is: NO. - -FILTER_SOURCE_FILES = NO - -# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file -# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and -# it is also possible to disable source filtering for a specific pattern using -# *.ext= (so without naming a filter). -# This tag requires that the tag FILTER_SOURCE_FILES is set to YES. - -FILTER_SOURCE_PATTERNS = - -# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that -# is part of the input, its contents will be placed on the main page -# (index.html). This can be useful if you have a project on for instance GitHub -# and want to reuse the introduction page also for the doxygen output. - -USE_MDFILE_AS_MAINPAGE = - -#--------------------------------------------------------------------------- -# Configuration options related to source browsing -#--------------------------------------------------------------------------- - -# If the SOURCE_BROWSER tag is set to YES then a list of source files will be -# generated. Documented entities will be cross-referenced with these sources. -# -# Note: To get rid of all source code in the generated output, make sure that -# also VERBATIM_HEADERS is set to NO. -# The default value is: NO. - -SOURCE_BROWSER = NO - -# Setting the INLINE_SOURCES tag to YES will include the body of functions, -# classes and enums directly into the documentation. -# The default value is: NO. - -INLINE_SOURCES = NO - -# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any -# special comment blocks from generated source code fragments. Normal C, C++ and -# Fortran comments will always remain visible. -# The default value is: YES. - -STRIP_CODE_COMMENTS = YES - -# If the REFERENCED_BY_RELATION tag is set to YES then for each documented -# entity all documented functions referencing it will be listed. -# The default value is: NO. - -REFERENCED_BY_RELATION = NO - -# If the REFERENCES_RELATION tag is set to YES then for each documented function -# all documented entities called/used by that function will be listed. -# The default value is: NO. - -REFERENCES_RELATION = NO - -# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set -# to YES then the hyperlinks from functions in REFERENCES_RELATION and -# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will -# link to the documentation. -# The default value is: YES. - -REFERENCES_LINK_SOURCE = YES - -# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the -# source code will show a tooltip with additional information such as prototype, -# brief description and links to the definition and documentation. Since this -# will make the HTML file larger and loading of large files a bit slower, you -# can opt to disable this feature. -# The default value is: YES. -# This tag requires that the tag SOURCE_BROWSER is set to YES. - -SOURCE_TOOLTIPS = YES - -# If the USE_HTAGS tag is set to YES then the references to source code will -# point to the HTML generated by the htags(1) tool instead of doxygen built-in -# source browser. The htags tool is part of GNU's global source tagging system -# (see https://www.gnu.org/software/global/global.html). You will need version -# 4.8.6 or higher. -# -# To use it do the following: -# - Install the latest version of global -# - Enable SOURCE_BROWSER and USE_HTAGS in the configuration file -# - Make sure the INPUT points to the root of the source tree -# - Run doxygen as normal -# -# Doxygen will invoke htags (and that will in turn invoke gtags), so these -# tools must be available from the command line (i.e. in the search path). -# -# The result: instead of the source browser generated by doxygen, the links to -# source code will now point to the output of htags. -# The default value is: NO. -# This tag requires that the tag SOURCE_BROWSER is set to YES. - -USE_HTAGS = NO - -# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a -# verbatim copy of the header file for each class for which an include is -# specified. Set to NO to disable this. -# See also: Section \class. -# The default value is: YES. - -VERBATIM_HEADERS = YES - -# If the CLANG_ASSISTED_PARSING tag is set to YES then doxygen will use the -# clang parser (see: http://clang.llvm.org/) for more accurate parsing at the -# cost of reduced performance. This can be particularly helpful with template -# rich C++ code for which doxygen's built-in parser lacks the necessary type -# information. -# Note: The availability of this option depends on whether or not doxygen was -# generated with the -Duse_libclang=ON option for CMake. -# The default value is: NO. - -CLANG_ASSISTED_PARSING = NO - -# If clang assisted parsing is enabled you can provide the compiler with command -# line options that you would normally use when invoking the compiler. Note that -# the include paths will already be set by doxygen for the files and directories -# specified with INPUT and INCLUDE_PATH. -# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES. - -CLANG_OPTIONS = - -# If clang assisted parsing is enabled you can provide the clang parser with the -# path to the compilation database (see: -# http://clang.llvm.org/docs/HowToSetupToolingForLLVM.html) used when the files -# were built. This is equivalent to specifying the "-p" option to a clang tool, -# such as clang-check. These options will then be passed to the parser. -# Note: The availability of this option depends on whether or not doxygen was -# generated with the -Duse_libclang=ON option for CMake. - -CLANG_DATABASE_PATH = - -#--------------------------------------------------------------------------- -# Configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- - -# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all -# compounds will be generated. Enable this if the project contains a lot of -# classes, structs, unions or interfaces. -# The default value is: YES. - -ALPHABETICAL_INDEX = YES - -# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in -# which the alphabetical index list will be split. -# Minimum value: 1, maximum value: 20, default value: 5. -# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. - -COLS_IN_ALPHA_INDEX = 5 - -# In case all classes in a project start with a common prefix, all classes will -# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag -# can be used to specify a prefix (or a list of prefixes) that should be ignored -# while generating the index headers. -# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. - -IGNORE_PREFIX = - -#--------------------------------------------------------------------------- -# Configuration options related to the HTML output -#--------------------------------------------------------------------------- - -# If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output -# The default value is: YES. - -GENERATE_HTML = YES - -# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a -# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of -# it. -# The default directory is: html. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_OUTPUT = html - -# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each -# generated HTML page (for example: .htm, .php, .asp). -# The default value is: .html. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_FILE_EXTENSION = .html - -# The HTML_HEADER tag can be used to specify a user-defined HTML header file for -# each generated HTML page. If the tag is left blank doxygen will generate a -# standard header. -# -# To get valid HTML the header file that includes any scripts and style sheets -# that doxygen needs, which is dependent on the configuration options used (e.g. -# the setting GENERATE_TREEVIEW). It is highly recommended to start with a -# default header using -# doxygen -w html new_header.html new_footer.html new_stylesheet.css -# YourConfigFile -# and then modify the file new_header.html. See also section "Doxygen usage" -# for information on how to generate the default header that doxygen normally -# uses. -# Note: The header is subject to change so you typically have to regenerate the -# default header when upgrading to a newer version of doxygen. For a description -# of the possible markers and block names see the documentation. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_HEADER = - -# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each -# generated HTML page. If the tag is left blank doxygen will generate a standard -# footer. See HTML_HEADER for more information on how to generate a default -# footer and what special commands can be used inside the footer. See also -# section "Doxygen usage" for information on how to generate the default footer -# that doxygen normally uses. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_FOOTER = - -# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style -# sheet that is used by each HTML page. It can be used to fine-tune the look of -# the HTML output. If left blank doxygen will generate a default style sheet. -# See also section "Doxygen usage" for information on how to generate the style -# sheet that doxygen normally uses. -# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as -# it is more robust and this tag (HTML_STYLESHEET) will in the future become -# obsolete. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_STYLESHEET = - -# The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined -# cascading style sheets that are included after the standard style sheets -# created by doxygen. Using this option one can overrule certain style aspects. -# This is preferred over using HTML_STYLESHEET since it does not replace the -# standard style sheet and is therefore more robust against future updates. -# Doxygen will copy the style sheet files to the output directory. -# Note: The order of the extra style sheet files is of importance (e.g. the last -# style sheet in the list overrules the setting of the previous ones in the -# list). For an example see the documentation. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_EXTRA_STYLESHEET = - -# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or -# other source files which should be copied to the HTML output directory. Note -# that these files will be copied to the base HTML output directory. Use the -# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these -# files. In the HTML_STYLESHEET file, use the file name only. Also note that the -# files will be copied as-is; there are no commands or markers available. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_EXTRA_FILES = - -# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen -# will adjust the colors in the style sheet and background images according to -# this color. Hue is specified as an angle on a colorwheel, see -# https://en.wikipedia.org/wiki/Hue for more information. For instance the value -# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 -# purple, and 360 is red again. -# Minimum value: 0, maximum value: 359, default value: 220. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_COLORSTYLE_HUE = 220 - -# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors -# in the HTML output. For a value of 0 the output will use grayscales only. A -# value of 255 will produce the most vivid colors. -# Minimum value: 0, maximum value: 255, default value: 100. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_COLORSTYLE_SAT = 100 - -# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the -# luminance component of the colors in the HTML output. Values below 100 -# gradually make the output lighter, whereas values above 100 make the output -# darker. The value divided by 100 is the actual gamma applied, so 80 represents -# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not -# change the gamma. -# Minimum value: 40, maximum value: 240, default value: 80. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_COLORSTYLE_GAMMA = 80 - -# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML -# page will contain the date and time when the page was generated. Setting this -# to YES can help to show when doxygen was last run and thus if the -# documentation is up to date. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_TIMESTAMP = NO - -# If the HTML_DYNAMIC_MENUS tag is set to YES then the generated HTML -# documentation will contain a main index with vertical navigation menus that -# are dynamically created via JavaScript. If disabled, the navigation index will -# consists of multiple levels of tabs that are statically embedded in every HTML -# page. Disable this option to support browsers that do not have JavaScript, -# like the Qt help browser. -# The default value is: YES. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_DYNAMIC_MENUS = YES - -# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML -# documentation will contain sections that can be hidden and shown after the -# page has loaded. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_DYNAMIC_SECTIONS = NO - -# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries -# shown in the various tree structured indices initially; the user can expand -# and collapse entries dynamically later on. Doxygen will expand the tree to -# such a level that at most the specified number of entries are visible (unless -# a fully collapsed tree already exceeds this amount). So setting the number of -# entries 1 will produce a full collapsed tree by default. 0 is a special value -# representing an infinite number of entries and will result in a full expanded -# tree by default. -# Minimum value: 0, maximum value: 9999, default value: 100. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_INDEX_NUM_ENTRIES = 100 - -# If the GENERATE_DOCSET tag is set to YES, additional index files will be -# generated that can be used as input for Apple's Xcode 3 integrated development -# environment (see: https://developer.apple.com/xcode/), introduced with OSX -# 10.5 (Leopard). To create a documentation set, doxygen will generate a -# Makefile in the HTML output directory. Running make will produce the docset in -# that directory and running make install will install the docset in -# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at -# startup. See https://developer.apple.com/library/archive/featuredarticles/Doxy -# genXcode/_index.html for more information. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_DOCSET = NO - -# This tag determines the name of the docset feed. A documentation feed provides -# an umbrella under which multiple documentation sets from a single provider -# (such as a company or product suite) can be grouped. -# The default value is: Doxygen generated docs. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_FEEDNAME = "Doxygen generated docs" - -# This tag specifies a string that should uniquely identify the documentation -# set bundle. This should be a reverse domain-name style string, e.g. -# com.mycompany.MyDocSet. Doxygen will append .docset to the name. -# The default value is: org.doxygen.Project. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_BUNDLE_ID = org.doxygen.Project - -# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify -# the documentation publisher. This should be a reverse domain-name style -# string, e.g. com.mycompany.MyDocSet.documentation. -# The default value is: org.doxygen.Publisher. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_PUBLISHER_ID = org.doxygen.Publisher - -# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher. -# The default value is: Publisher. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_PUBLISHER_NAME = Publisher - -# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three -# additional HTML index files: index.hhp, index.hhc, and index.hhk. The -# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop -# (see: https://www.microsoft.com/en-us/download/details.aspx?id=21138) on -# Windows. -# -# The HTML Help Workshop contains a compiler that can convert all HTML output -# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML -# files are now used as the Windows 98 help format, and will replace the old -# Windows help format (.hlp) on all Windows platforms in the future. Compressed -# HTML files also contain an index, a table of contents, and you can search for -# words in the documentation. The HTML workshop also contains a viewer for -# compressed HTML files. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_HTMLHELP = NO - -# The CHM_FILE tag can be used to specify the file name of the resulting .chm -# file. You can add a path in front of the file if the result should not be -# written to the html output directory. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -CHM_FILE = - -# The HHC_LOCATION tag can be used to specify the location (absolute path -# including file name) of the HTML help compiler (hhc.exe). If non-empty, -# doxygen will try to run the HTML help compiler on the generated index.hhp. -# The file has to be specified with full path. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -HHC_LOCATION = - -# The GENERATE_CHI flag controls if a separate .chi index file is generated -# (YES) or that it should be included in the master .chm file (NO). -# The default value is: NO. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -GENERATE_CHI = NO - -# The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc) -# and project file content. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -CHM_INDEX_ENCODING = - -# The BINARY_TOC flag controls whether a binary table of contents is generated -# (YES) or a normal table of contents (NO) in the .chm file. Furthermore it -# enables the Previous and Next buttons. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -BINARY_TOC = NO - -# The TOC_EXPAND flag can be set to YES to add extra items for group members to -# the table of contents of the HTML help documentation and to the tree view. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -TOC_EXPAND = NO - -# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and -# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that -# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help -# (.qch) of the generated HTML documentation. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_QHP = NO - -# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify -# the file name of the resulting .qch file. The path specified is relative to -# the HTML output folder. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QCH_FILE = - -# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help -# Project output. For more information please see Qt Help Project / Namespace -# (see: https://doc.qt.io/archives/qt-4.8/qthelpproject.html#namespace). -# The default value is: org.doxygen.Project. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_NAMESPACE = org.doxygen.Project - -# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt -# Help Project output. For more information please see Qt Help Project / Virtual -# Folders (see: https://doc.qt.io/archives/qt-4.8/qthelpproject.html#virtual- -# folders). -# The default value is: doc. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_VIRTUAL_FOLDER = doc - -# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom -# filter to add. For more information please see Qt Help Project / Custom -# Filters (see: https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom- -# filters). -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_CUST_FILTER_NAME = - -# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the -# custom filter to add. For more information please see Qt Help Project / Custom -# Filters (see: https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom- -# filters). -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_CUST_FILTER_ATTRS = - -# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this -# project's filter section matches. Qt Help Project / Filter Attributes (see: -# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#filter-attributes). -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_SECT_FILTER_ATTRS = - -# The QHG_LOCATION tag can be used to specify the location of Qt's -# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the -# generated .qhp file. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHG_LOCATION = - -# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be -# generated, together with the HTML files, they form an Eclipse help plugin. To -# install this plugin and make it available under the help contents menu in -# Eclipse, the contents of the directory containing the HTML and XML files needs -# to be copied into the plugins directory of eclipse. The name of the directory -# within the plugins directory should be the same as the ECLIPSE_DOC_ID value. -# After copying Eclipse needs to be restarted before the help appears. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_ECLIPSEHELP = NO - -# A unique identifier for the Eclipse help plugin. When installing the plugin -# the directory name containing the HTML and XML files should also have this -# name. Each documentation set should have its own identifier. -# The default value is: org.doxygen.Project. -# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES. - -ECLIPSE_DOC_ID = org.doxygen.Project - -# If you want full control over the layout of the generated HTML pages it might -# be necessary to disable the index and replace it with your own. The -# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top -# of each HTML page. A value of NO enables the index and the value YES disables -# it. Since the tabs in the index contain the same information as the navigation -# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -DISABLE_INDEX = NO - -# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index -# structure should be generated to display hierarchical information. If the tag -# value is set to YES, a side panel will be generated containing a tree-like -# index structure (just like the one that is generated for HTML Help). For this -# to work a browser that supports JavaScript, DHTML, CSS and frames is required -# (i.e. any modern browser). Windows users are probably better off using the -# HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can -# further fine-tune the look of the index. As an example, the default style -# sheet generated by doxygen has an example that shows how to put an image at -# the root of the tree instead of the PROJECT_NAME. Since the tree basically has -# the same information as the tab index, you could consider setting -# DISABLE_INDEX to YES when enabling this option. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_TREEVIEW = NO - -# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that -# doxygen will group on one line in the generated HTML documentation. -# -# Note that a value of 0 will completely suppress the enum values from appearing -# in the overview section. -# Minimum value: 0, maximum value: 20, default value: 4. -# This tag requires that the tag GENERATE_HTML is set to YES. - -ENUM_VALUES_PER_LINE = 4 - -# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used -# to set the initial width (in pixels) of the frame in which the tree is shown. -# Minimum value: 0, maximum value: 1500, default value: 250. -# This tag requires that the tag GENERATE_HTML is set to YES. - -TREEVIEW_WIDTH = 250 - -# If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to -# external symbols imported via tag files in a separate window. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -EXT_LINKS_IN_WINDOW = NO - -# Use this tag to change the font size of LaTeX formulas included as images in -# the HTML documentation. When you change the font size after a successful -# doxygen run you need to manually remove any form_*.png images from the HTML -# output directory to force them to be regenerated. -# Minimum value: 8, maximum value: 50, default value: 10. -# This tag requires that the tag GENERATE_HTML is set to YES. - -FORMULA_FONTSIZE = 10 - -# Use the FORMULA_TRANSPARENT tag to determine whether or not the images -# generated for formulas are transparent PNGs. Transparent PNGs are not -# supported properly for IE 6.0, but are supported on all modern browsers. -# -# Note that when changing this option you need to delete any form_*.png files in -# the HTML output directory before the changes have effect. -# The default value is: YES. -# This tag requires that the tag GENERATE_HTML is set to YES. - -FORMULA_TRANSPARENT = YES - -# The FORMULA_MACROFILE can contain LaTeX \newcommand and \renewcommand commands -# to create new LaTeX commands to be used in formulas as building blocks. See -# the section "Including formulas" for details. - -FORMULA_MACROFILE = - -# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see -# https://www.mathjax.org) which uses client side JavaScript for the rendering -# instead of using pre-rendered bitmaps. Use this if you do not have LaTeX -# installed or if you want to formulas look prettier in the HTML output. When -# enabled you may also need to install MathJax separately and configure the path -# to it using the MATHJAX_RELPATH option. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -USE_MATHJAX = NO - -# When MathJax is enabled you can set the default output format to be used for -# the MathJax output. See the MathJax site (see: -# http://docs.mathjax.org/en/latest/output.html) for more details. -# Possible values are: HTML-CSS (which is slower, but has the best -# compatibility), NativeMML (i.e. MathML) and SVG. -# The default value is: HTML-CSS. -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_FORMAT = HTML-CSS - -# When MathJax is enabled you need to specify the location relative to the HTML -# output directory using the MATHJAX_RELPATH option. The destination directory -# should contain the MathJax.js script. For instance, if the mathjax directory -# is located at the same level as the HTML output directory, then -# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax -# Content Delivery Network so you can quickly see the result without installing -# MathJax. However, it is strongly recommended to install a local copy of -# MathJax from https://www.mathjax.org before deployment. -# The default value is: https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/. -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_RELPATH = https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/ - -# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax -# extension names that should be enabled during MathJax rendering. For example -# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_EXTENSIONS = - -# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces -# of code that will be used on startup of the MathJax code. See the MathJax site -# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an -# example see the documentation. -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_CODEFILE = - -# When the SEARCHENGINE tag is enabled doxygen will generate a search box for -# the HTML output. The underlying search engine uses javascript and DHTML and -# should work on any modern browser. Note that when using HTML help -# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET) -# there is already a search function so this one should typically be disabled. -# For large projects the javascript based search engine can be slow, then -# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to -# search using the keyboard; to jump to the search box use + S -# (what the is depends on the OS and browser, but it is typically -# , /