diff --git a/.github/workflows/bandit.yml b/.github/workflows/bandit.yml deleted file mode 100644 index 124046d258..0000000000 --- a/.github/workflows/bandit.yml +++ /dev/null @@ -1,30 +0,0 @@ -# Runs bandit security checker for code written in Python. -name: Bandit - -on: [push, pull_request, workflow_dispatch] - -concurrency: - group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -permissions: - contents: read - -jobs: - bandit: - name: Bandit - strategy: - matrix: - os: [ubuntu-latest, windows-latest] - runs-on: ${{matrix.os}} - - steps: - - name: Clone the git repo - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - - name: Install pip packages - run: pip install -r third_party/requirements.txt - - # Scan all files, except for dev. scripts - - name: Run Bandit - run: bandit -r . -x ./scripts/ diff --git a/.github/workflows/benchmarks-nightly.yml b/.github/workflows/benchmarks-nightly.yml deleted file mode 100644 index 3da0d09c7a..0000000000 --- a/.github/workflows/benchmarks-nightly.yml +++ /dev/null @@ -1,38 +0,0 @@ -name: Compute Benchmarks Nightly - -on: - schedule: - - cron: '0 0 * * *' # Runs at midnight UTC every day - -permissions: - contents: read - pull-requests: write - -jobs: - nightly: - name: Compute Benchmarks Nightly level-zero - uses: ./.github/workflows/benchmarks-reusable.yml - with: - str_name: 'level_zero' - unit: 'gpu' - pr_no: 0 - bench_script_params: '--save baseline' - sycl_config_params: '' - sycl_repo: 'intel/llvm' - sycl_commit: '' - - nightly2: - # we need to wait until previous job is done so that the html report - # contains both runs - needs: nightly - name: Compute Benchmarks Nightly level-zero v2 - uses: ./.github/workflows/benchmarks-reusable.yml - with: - str_name: 'level_zero_v2' - unit: 'gpu' - pr_no: 0 - bench_script_params: '--save baseline-v2' - sycl_config_params: '' - sycl_repo: 'intel/llvm' - sycl_commit: '' - upload_report: true diff --git a/.github/workflows/build-fuzz-reusable.yml b/.github/workflows/build-fuzz-reusable.yml deleted file mode 100644 index 2cbd1b87ff..0000000000 --- a/.github/workflows/build-fuzz-reusable.yml +++ /dev/null @@ -1,75 +0,0 @@ ---- -name: Build - Fuzztests on L0 HW - Reusable - -on: - workflow_call: - inputs: - test_label: - required: true - type: string - -permissions: - contents: read - -jobs: - fuzztest-build-hw: - name: Build and run fuzz tests on L0 HW - if: github.repository == 'oneapi-src/unified-runtime' # run only on upstream; forks won't have the HW - strategy: - matrix: - build_type: [Debug, Release] - compiler: [{c: clang, cxx: clang++}] - - runs-on: 'FUZZTESTS' - # In order to use sanitizers, vm.mmap_rnd_bits=28 must be set in the system, - # otherwise random SEGV at the start of the test occurs. - # Alternatively, clang 18.1.0 onwards with fixed sanitizers behavior can be used, - # if available. - # TODO: Remove this advice once clang 18.1.0 is available in the system (like ie. as an apt package). - - steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - - name: Install pip packages - run: pip install -r third_party/requirements.txt - - - name: Download DPC++ - run: | - wget -O ${{github.workspace}}/dpcpp_compiler.tar.gz https://github.com/intel/llvm/releases/download/nightly-2024-01-29/sycl_linux.tar.gz - mkdir dpcpp_compiler - tar -xvf ${{github.workspace}}/dpcpp_compiler.tar.gz -C dpcpp_compiler - - - name: Build level zero with gcc - run: | - git clone -b v1.18.5 --depth=1 https://github.com/oneapi-src/level-zero.git ${{github.workspace}}/level-zero - cd ${{github.workspace}}/level-zero - cmake -B build -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ - cmake --build build -j $(nproc) - - - name: Configure CMake - run: > - cmake - -B${{github.workspace}}/build - -DCMAKE_C_COMPILER=${{matrix.compiler.c}} - -DCMAKE_CXX_COMPILER=${{matrix.compiler.cxx}} - -DUR_ENABLE_TRACING=ON - -DCMAKE_BUILD_TYPE=${{matrix.build_type}} - -DUR_BUILD_TESTS=ON - -DUR_USE_ASAN=ON - -DUR_USE_UBSAN=ON - -DUR_BUILD_ADAPTER_L0=ON - -DUR_LEVEL_ZERO_LOADER_LIBRARY=${{github.workspace}}/level-zero/build/lib/libze_loader.so - -DUR_LEVEL_ZERO_INCLUDE_DIR=${{github.workspace}}/level-zero/include/ - -DUR_DPCXX=${{github.workspace}}/dpcpp_compiler/bin/clang++ - -DUR_SYCL_LIBRARY_DIR=${{github.workspace}}/dpcpp_compiler/lib - - - name: Build - run: cmake --build ${{github.workspace}}/build -j $(nproc) - - - name: Fuzz test - working-directory: ${{github.workspace}}/build - run: ctest -C ${{matrix.build_type}} --output-on-failure -L "${{inputs.test_label}}" --verbose - - - name: Get information about platform - if: ${{ always() }} - run: .github/scripts/get_system_info.sh diff --git a/.github/workflows/build-hw-reusable.yml b/.github/workflows/build-hw-reusable.yml deleted file mode 100644 index 3e332c73fc..0000000000 --- a/.github/workflows/build-hw-reusable.yml +++ /dev/null @@ -1,125 +0,0 @@ ---- -name: Build - Adapters on HW - Reusable - -on: - workflow_call: - inputs: - adapter_name: - required: true - type: string - other_adapter_name: - required: false - type: string - default: "" - runner_name: - required: true - type: string - platform: - description: "Platform string, `UR_CTS_ADAPTER_PLATFORM` will be set to this." - required: false - type: string - default: "" - static_loader: - required: false - type: string - default: OFF - static_adapter: - required: false - type: string - default: OFF - -permissions: - contents: read - -env: - UR_LOG_CUDA: "level:error;flush:error" - UR_LOG_HIP: "level:error;flush:error" - UR_LOG_LEVEL_ZERO: "level:error;flush:error" - UR_LOG_NATIVE_CPU: "level:error;flush:error" - UR_LOG_OPENCL: "level:error;flush:error" - -jobs: - adapter-build-hw: - name: Build & Test HW - if: github.repository == 'oneapi-src/unified-runtime' # run only on upstream; forks won't have the HW - strategy: - matrix: - adapter: [{ - name: "${{inputs.adapter_name}}", - other_name: "${{inputs.other_adapter_name}}", - platform: "${{inputs.platform}}", - static_Loader: "${{inputs.static_loader}}", - static_adapter: "${{inputs.static_loader}}" - }] - build_type: [Debug, Release] - compiler: [{c: gcc, cxx: g++}, {c: clang, cxx: clang++}] - # TODO: The latest L0 loader segfaults when built with clang. - exclude: - - adapter: {name: L0, platform: ""} - compiler: {c: clang, cxx: clang++} - # Exclude these configurations to avoid overloading the runners. - - adapter: {static_Loader: ON} - build_type: Release - - adapter: {static_Loader: ON} - compiler: {c: clang, cxx: clang++} - - adapter: {static_adapter: ON} - build_type: Release - - adapter: {static_adapter: ON} - compiler: {c: clang, cxx: clang++} - - runs-on: ${{inputs.runner_name}} - - steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - - name: Install pip packages - run: pip install -r third_party/requirements.txt - - - name: Download DPC++ - run: | - wget -O ${{github.workspace}}/dpcpp_compiler.tar.gz https://github.com/intel/llvm/releases/download/nightly-2024-01-29/sycl_linux.tar.gz - mkdir dpcpp_compiler - tar -xvf ${{github.workspace}}/dpcpp_compiler.tar.gz -C dpcpp_compiler - - - name: Configure CMake - run: > - cmake - -B${{github.workspace}}/build - -DCMAKE_C_COMPILER=${{matrix.compiler.c}} - -DCMAKE_CXX_COMPILER=${{matrix.compiler.cxx}} - -DCMAKE_BUILD_TYPE=${{matrix.build_type}} - -DUR_ENABLE_TRACING=ON - -DUR_DEVELOPER_MODE=ON - -DUR_BUILD_TESTS=ON - -DUR_BUILD_ADAPTER_${{matrix.adapter.name}}=ON - -DUR_CONFORMANCE_TEST_LOADER=${{ matrix.adapter.other_name != '' && 'ON' || 'OFF' }} - ${{ matrix.adapter.other_name != '' && format('-DUR_BUILD_ADAPTER_{0}=ON', matrix.adapter.other_name) || '' }} - -DUR_STATIC_LOADER=${{matrix.adapter.static_Loader}} - -DUR_STATIC_ADAPTER_${{matrix.adapter.name}}=${{matrix.adapter.static_adapter}} - -DUR_DPCXX=${{github.workspace}}/dpcpp_compiler/bin/clang++ - -DUR_SYCL_LIBRARY_DIR=${{github.workspace}}/dpcpp_compiler/lib - -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/install - ${{ matrix.adapter.name == 'HIP' && '-DUR_CONFORMANCE_AMD_ARCH=gfx1030' || '' }} - ${{ matrix.adapter.name == 'HIP' && '-DUR_HIP_PLATFORM=AMD' || '' }} - - - name: Build - # This is so that device binaries can find the sycl runtime library - run: cmake --build ${{github.workspace}}/build -j $(nproc) - - - name: Install - # This is to check that install command does not fail - run: cmake --install ${{github.workspace}}/build - - - name: Test adapter specific - working-directory: ${{github.workspace}}/build - run: ctest -C ${{matrix.build_type}} --output-on-failure -L "adapter-specific" --timeout 180 - # Don't run adapter specific tests when building multiple adapters - if: ${{ matrix.adapter.other_name == '' }} - - - name: Test adapters - working-directory: ${{github.workspace}}/build - run: env UR_CTS_ADAPTER_PLATFORM="${{matrix.adapter.platform}}" ctest -C ${{matrix.build_type}} --output-on-failure -L "conformance" --timeout 180 - - - name: Get information about platform - if: ${{ always() }} - run: .github/scripts/get_system_info.sh diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml deleted file mode 100644 index 0a4ae99a58..0000000000 --- a/.github/workflows/cmake.yml +++ /dev/null @@ -1,335 +0,0 @@ -name: Build and test - -on: [push, pull_request] - -concurrency: - group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -permissions: - contents: read - pull-requests: write - -jobs: - ubuntu-build: - name: Build - Ubuntu - strategy: - matrix: - os: ['ubuntu-20.04', 'ubuntu-22.04'] - build_type: [Debug, Release] - compiler: [{c: gcc, cxx: g++}] - libbacktrace: ['-DVAL_USE_LIBBACKTRACE_BACKTRACE=OFF'] - pool_tracking: ['-DUMF_ENABLE_POOL_TRACKING=ON', '-DUMF_ENABLE_POOL_TRACKING=OFF'] - latency_tracking: ['-DUR_ENABLE_LATENCY_HISTOGRAM=OFF'] - include: - - os: 'ubuntu-22.04' - build_type: Release - compiler: {c: clang, cxx: clang++} - libbacktrace: '-DVAL_USE_LIBBACKTRACE_BACKTRACE=OFF' - - os: 'ubuntu-22.04' - build_type: Release - compiler: {c: gcc, cxx: g++} - libbacktrace: '-DVAL_USE_LIBBACKTRACE_BACKTRACE=ON' - - os: 'ubuntu-22.04' - build_type: Release - compiler: {c: clang, cxx: clang++} - libbacktrace: '-DVAL_USE_LIBBACKTRACE_BACKTRACE=ON' - - os: 'ubuntu-20.04' - build_type: Release - compiler: {c: gcc-7, cxx: g++-7} - - os: 'ubuntu-22.04' - build_type: Release - compiler: {c: clang, cxx: clang++} - latency_tracking: '-DUR_ENABLE_LATENCY_HISTOGRAM=ON' - runs-on: ${{ (matrix.os == 'ubuntu-22.04' && github.repository_owner == 'oneapi-src') && 'intel-ubuntu-22.04' || matrix.os }} - - steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - - name: Install apt packages - run: | - sudo apt-get update - sudo apt-get install -y ${{matrix.compiler.c}} devscripts - - - name: Install libhwloc - run: .github/scripts/install_hwloc.sh - - - name: Setup PATH - run: echo "$HOME/.local/bin" >> $GITHUB_PATH - - - name: Install g++-7 - if: matrix.compiler.cxx == 'g++-7' - run: | - sudo apt-get install -y ${{matrix.compiler.cxx}} - - - name: Install libbacktrace - if: matrix.libbacktrace == '-DVAL_USE_LIBBACKTRACE_BACKTRACE=ON' - run: | - git clone https://github.com/ianlancetaylor/libbacktrace.git - cd libbacktrace - ./configure - make - sudo make install - cd .. - - - name: Download DPC++ - if: matrix.os == 'ubuntu-22.04' - run: | - sudo apt install libncurses5 - wget -O ${{github.workspace}}/dpcpp_compiler.tar.gz https://github.com/intel/llvm/releases/download/nightly-2024-09-27/sycl_linux.tar.gz - mkdir -p ${{github.workspace}}/dpcpp_compiler - tar -xvf ${{github.workspace}}/dpcpp_compiler.tar.gz -C ${{github.workspace}}/dpcpp_compiler - - - name: Configure CMake - if: matrix.os == 'ubuntu-22.04' - # WEXTRA: https://github.com/oneapi-src/unified-runtime/issues/2109 - run: > - cmake - -B${{github.workspace}}/build - -DCMAKE_C_COMPILER=${{matrix.compiler.c}} - -DCMAKE_CXX_COMPILER=${{matrix.compiler.cxx}} - -DUR_ENABLE_TRACING=ON - -DCMAKE_BUILD_TYPE=${{matrix.build_type}} - -DUR_BUILD_TESTS=ON - -DUR_FORMAT_CPP_STYLE=OFF - -DUR_DEVELOPER_MODE=ON - -DUR_DPCXX=${{github.workspace}}/dpcpp_compiler/bin/clang++ - -DUR_CONFORMANCE_TEST_LOADER=OFF - ${{matrix.libbacktrace}} - ${{matrix.pool_tracking}} - ${{matrix.latency_tracking}} - - - name: Configure CMake - if: matrix.os == 'ubuntu-20.04' - # WEXTRA: https://github.com/oneapi-src/unified-runtime/issues/2109 - # Note: Disable Werror, since 20.04 raises different ones than 22.04 - run: > - cmake - -B${{github.workspace}}/build - -DCMAKE_C_COMPILER=${{matrix.compiler.c}} - -DCMAKE_CXX_COMPILER=${{matrix.compiler.cxx}} - -DUR_ENABLE_TRACING=ON - -DCMAKE_BUILD_TYPE=${{matrix.build_type}} - -DUR_BUILD_TESTS=ON - -DUR_FORMAT_CPP_STYLE=OFF - -DUR_DEVELOPER_MODE=OFF - ${{matrix.libbacktrace}} - ${{matrix.pool_tracking}} - ${{matrix.latency_tracking}} - - - name: Build - run: cmake --build ${{github.workspace}}/build -j $(nproc) - - - name: Verify hardening flags have been set - run: cmake --build ${{github.workspace}}/build --target verify-hardening - # https://github.com/oneapi-src/unified-runtime/issues/2120 - if: ${{ matrix.compiler.cxx != 'clang++' && matrix.os != 'ubuntu-20.04' }} - - - name: Test - working-directory: ${{github.workspace}}/build - run: ctest -C ${{matrix.build_type}} --output-on-failure -L "umf|loader|validation|tracing|unit|urtrace" - - fuzztest: - name: Fuzz tests short - uses: ./.github/workflows/build-fuzz-reusable.yml - with: - test_label: "fuzz-short" - - level-zero: - name: Level Zero - uses: ./.github/workflows/build-hw-reusable.yml - with: - adapter_name: L0 - runner_name: L0 - - level-zero-v2: - name: Level Zero V2 - uses: ./.github/workflows/build-hw-reusable.yml - with: - adapter_name: L0_V2 - runner_name: L0 - - level-zero-static: - name: Level Zero static - uses: ./.github/workflows/build-hw-reusable.yml - with: - adapter_name: L0 - runner_name: L0 - static_loader: ON - static_adapter: ON - - opencl: - name: OpenCL - uses: ./.github/workflows/build-hw-reusable.yml - with: - adapter_name: OPENCL - runner_name: OPENCL - platform: "Intel(R) OpenCL" - - cuda: - name: CUDA - uses: ./.github/workflows/build-hw-reusable.yml - with: - adapter_name: CUDA - runner_name: CUDA - - hip: - name: HIP - uses: ./.github/workflows/build-hw-reusable.yml - with: - adapter_name: HIP - runner_name: HIP - - native-cpu: - name: Native CPU - uses: ./.github/workflows/build-hw-reusable.yml - with: - adapter_name: NATIVE_CPU - runner_name: NATIVE_CPU - - # Native CPU jobs are here to force the loader to be used (UR will not use the loader if there is only one target) - combined-opencl-native-cpu: - name: OpenCL + Native CPU (Loader) - uses: ./.github/workflows/build-hw-reusable.yml - with: - adapter_name: OPENCL - other_adapter_name: NATIVE_CPU - runner_name: OPENCL - platform: "OPENCL:Intel(R) OpenCL" - - combined-level-zero-native-cpu: - name: Level Zero + Native CPU (Loader) - uses: ./.github/workflows/build-hw-reusable.yml - with: - adapter_name: L0 - other_adapter_name: NATIVE_CPU - runner_name: L0 - - e2e-level-zero: - name: E2E L0 - permissions: - contents: read - pull-requests: write - needs: [ubuntu-build, level-zero] - uses: ./.github/workflows/e2e_level_zero.yml - - e2e-opencl: - name: E2E OpenCL - permissions: - contents: read - pull-requests: write - needs: [ubuntu-build, opencl] - uses: ./.github/workflows/e2e_opencl.yml - - # Causes hangs: https://github.com/oneapi-src/unified-runtime/issues/2398 - #e2e-cuda: - # name: E2E CUDA - # permissions: - # contents: read - # pull-requests: write - # needs: [ubuntu-build, cuda] - # uses: ./.github/workflows/e2e_cuda.yml - - windows-build: - name: Build - Windows - strategy: - matrix: - os: ['windows-2019', 'windows-2022'] - adapter: [ - {name: None, var: ''}, {name: L0, var: '-DUR_BUILD_ADAPTER_L0=ON'}, - {name: None, var: ''}, {name: L0_V2, var: '-DUR_BUILD_ADAPTER_L0_V2=ON'}, - {name: L0, var: '-DUR_BUILD_ADAPTER_L0=ON -DUR_STATIC_ADAPTER_L0=ON'} - ] - - # TODO: building level zero loader on windows-2019 and clang-cl is currently broken - exclude: - - os: 'windows-2019' - adapter: {name: L0, var: '-DUR_BUILD_ADAPTER_L0=ON'} - - os: 'windows-2019' - adapter: {name: L0_V2, var: '-DUR_BUILD_ADAPTER_L0_V2=ON'} - - os: 'windows-2019' - adapter: {name: L0, var: '-DUR_BUILD_ADAPTER_L0=ON -DUR_STATIC_ADAPTER_L0=ON'} - - adapter: {name: L0, var: '-DUR_BUILD_ADAPTER_L0=ON'} - compiler: {c: clang-cl, cxx: clang-cl} - - adapter: {name: L0_V2, var: '-DUR_BUILD_ADAPTER_L0_V2=ON'} - compiler: {c: clang-cl, cxx: clang-cl} - - adapter: {name: L0, var: '-DUR_BUILD_ADAPTER_L0=ON -DUR_STATIC_ADAPTER_L0=ON'} - compiler: {c: clang-cl, cxx: clang-cl} - - build_type: [Debug, Release] - # TODO: clang-cl seems to be fully broken (https://github.com/oneapi-src/unified-runtime/issues/2348) - #compiler: [{c: cl, cxx: cl}, {c: clang-cl, cxx: clang-cl}] - compiler: [{c: cl, cxx: cl}] - include: - #- compiler: {c: clang-cl, cxx: clang-cl} - # toolset: "-T ClangCL" - - os: 'windows-2022' - adapter: {name: L0, var: '-DUR_BUILD_ADAPTER_L0=ON -DUR_STATIC_ADAPTER_L0=ON'} - build_type: 'Release' - compiler: {c: cl, cxx: cl} - - runs-on: ${{matrix.os}} - - steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - - name: Install hwloc - run: vcpkg install hwloc:x64-windows - - - name: Configure CMake - env: - VCPKG_PATH: "C:/vcpkg/packages/hwloc_x64-windows" - run: > - cmake - -B${{github.workspace}}/build - ${{matrix.toolset}} - -DCMAKE_PREFIX_PATH="${{env.VCPKG_PATH}}" - -DCMAKE_C_COMPILER=${{matrix.compiler.c}} - -DCMAKE_CXX_COMPILER=${{matrix.compiler.cxx}} - -DCMAKE_POLICY_DEFAULT_CMP0094=NEW - -DUR_ENABLE_TRACING=ON - -DUR_DEVELOPER_MODE=ON - -DUR_BUILD_TESTS=ON - -DUR_FORMAT_CPP_STYLE=OFF - -DUR_CONFORMANCE_TEST_LOADER=OFF - ${{matrix.adapter.var}} - - - name: Build all - run: cmake --build ${{github.workspace}}/build --config ${{matrix.build_type}} -j $Env:NUMBER_OF_PROCESSORS - - - name: Test - working-directory: ${{github.workspace}}/build - run: ctest -C ${{matrix.build_type}} --output-on-failure -L "umf|loader|validation|tracing|unit|urtrace" - - macos-build: - name: Build - MacOS - strategy: - matrix: - os: ['macos-13'] - runs-on: ${{matrix.os}} - - steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - - uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0 - with: - python-version: 3.9 - - - name: Install prerequisites - run: python3 -m pip install -r third_party/requirements.txt - - - name: Install hwloc - run: brew install hwloc - - - name: Configure CMake - run: > - cmake - -B${{github.workspace}}/build - -DUR_ENABLE_TRACING=ON - -DUR_DEVELOPER_MODE=ON - -DCMAKE_BUILD_TYPE=Release - -DUR_BUILD_TESTS=ON - -DUR_FORMAT_CPP_STYLE=ON - -DUMF_ENABLE_POOL_TRACKING=ON - - name: Build - run: cmake --build ${{github.workspace}}/build -j $(sysctl -n hw.logicalcpu) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml deleted file mode 100644 index fdc5d0c0c0..0000000000 --- a/.github/workflows/codeql.yml +++ /dev/null @@ -1,81 +0,0 @@ -name: "CodeQL" - -on: [push] - -concurrency: - group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -permissions: - contents: read - -jobs: - analyze-ubuntu: - name: Analyze on Ubuntu - runs-on: ${{ github.repository_owner == 'oneapi-src' && 'intel-ubuntu-22.04' || 'ubuntu-latest' }} - permissions: - security-events: write - - strategy: - fail-fast: false - - steps: - - name: Checkout repository - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - - name: Initialize CodeQL - uses: github/codeql-action/init@f079b8493333aace61c81488f8bd40919487bd9f # v3.25.7 - with: - languages: cpp, python - - - name: Install pip packages - run: pip install -r third_party/requirements.txt - - - name: Install apt packages - run: | - sudo apt-get update - sudo apt-get install -y libhwloc-dev - - - name: Configure CMake - run: cmake -B ${{github.workspace}}/build -DUR_DEVELOPER_MODE=ON -DUR_BUILD_TESTS=ON -DUR_ENABLE_TRACING=ON -DUR_BUILD_TOOLS=ON -DUMF_ENABLE_POOL_TRACKING=ON - - - name: Build - run: cmake --build ${{github.workspace}}/build -j $(nproc) - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@f079b8493333aace61c81488f8bd40919487bd9f # v3.25.7 - - analyze-windows: - name: Analyze on Windows - runs-on: windows-latest - permissions: - security-events: write - - strategy: - fail-fast: false - - steps: - - name: Checkout repository - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - - name: Initialize CodeQL - uses: github/codeql-action/init@f079b8493333aace61c81488f8bd40919487bd9f # v3.25.7 - with: - languages: cpp, python - - - name: Install pip packages - run: python3 -m pip install -r third_party/requirements.txt - - - name: Install hwloc - run: vcpkg install hwloc:x64-windows - - - name: Configure CMake - env: - VCPKG_PATH: "C:/vcpkg/packages/hwloc_x64-windows" - run: cmake -B ${{github.workspace}}/build -DCMAKE_POLICY_DEFAULT_CMP0094=NEW -DUR_DEVELOPER_MODE=ON -DUR_BUILD_TESTS=ON -DUR_ENABLE_TRACING=ON -DUR_BUILD_TOOLS=ON -DUMF_ENABLE_POOL_TRACKING=ON -DCMAKE_PREFIX_PATH="${{env.VCPKG_PATH}}" - - - name: Build - run: cmake --build ${{github.workspace}}/build -j $(nproc) --config Release - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@f079b8493333aace61c81488f8bd40919487bd9f # v3.25.7 diff --git a/.github/workflows/coverity.yml b/.github/workflows/coverity.yml deleted file mode 100644 index d7d8bf937b..0000000000 --- a/.github/workflows/coverity.yml +++ /dev/null @@ -1,81 +0,0 @@ -# Coverity - static analysis build. It requires Coverity's token (set in CI's secret). -name: coverity-unified-runtime - -on: - workflow_dispatch: - schedule: - # Run every day at 22:00 UTC - - cron: '0 22 * * *' - -permissions: - contents: read - -jobs: - coverity: - name: Coverity - # run only on upstream; forks don't have token for upstream's cov project - if: github.repository == 'oneapi-src/unified-runtime' - runs-on: ubuntu-latest - - steps: - - name: Checkout repository - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - with: - fetch-depth: 0 - - - name: Install dependencies - run: | - wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.1-1_all.deb - sudo dpkg -i cuda-keyring_1.1-1_all.deb - sudo apt-get update - sudo apt-get install -y libhwloc-dev libtbb-dev cuda-toolkit-12-6 - - - name: Install pip packages - run: pip install -r third_party/requirements.txt - - - name: Download Coverity - run: | - wget -O coverity_tool.tgz -nv https://scan.coverity.com/download/linux64 \ - --post-data "token=${{ secrets.COVERITY_SCAN_TOKEN }}&project=oneapi-src%2Funified-runtime" - - - name: Extract Coverity - run: tar xzf coverity_tool.tgz - - # TODO: enable HIP adapter as well (requires proper package(s) installation) - - name: Configure CMake - run: > - cmake - -B ${{github.workspace}}/build - -DCMAKE_BUILD_TYPE=Release - -DUR_DEVELOPER_MODE=OFF - -DUR_FORMAT_CPP_STYLE=ON - -DUR_ENABLE_TRACING=ON - -DUR_BUILD_TESTS=ON - -DUR_BUILD_ADAPTER_L0=ON - -DUR_BUILD_ADAPTER_CUDA=ON - -DCUDA_CUDA_LIBRARY=/usr/local/cuda-12.6/targets/x86_64-linux/lib/stubs/libcuda.so - -DUR_BUILD_ADAPTER_NATIVE_CPU=ON - -DUR_BUILD_ADAPTER_HIP=OFF - -DUR_BUILD_ADAPTER_OPENCL=ON - - - name: Build - run: | - export COVERITY_DIR=$(find . -maxdepth 1 -type d -name "cov-analysis-linux64-*" | head -n 1) - if [ -n "$COVERITY_DIR" ]; then - export PATH="$PATH:$COVERITY_DIR/bin" - fi - cov-build --dir ${{github.workspace}}/cov-int cmake --build ${{github.workspace}}/build --config Release -j$(nproc) - - - name: Create tarball to analyze - run: tar czvf cov-int_ur.tgz cov-int - - - name: Push tarball to scan - run: | - BRANCH_NAME=$(echo ${GITHUB_REF_NAME}) - COMMIT_ID=$(echo $GITHUB_SHA) - curl --form token=${{ secrets.COVERITY_SCAN_TOKEN }} \ - --form email=bb-ur@intel.com \ - --form file=@cov-int_ur.tgz \ - --form version="$COMMIT_ID" \ - --form description="$BRANCH_NAME:$COMMIT_ID" \ - https://scan.coverity.com/builds\?project\=oneapi-src%2Funified-runtime diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml deleted file mode 100644 index b4c40334d4..0000000000 --- a/.github/workflows/docs.yml +++ /dev/null @@ -1,81 +0,0 @@ -# Simple workflow for deploying static content to GitHub Pages -name: Deploy documentation to Pages - -on: - # Runs on pushes targeting the default branch - push: - branches: ["main"] - - # Allows you to run this workflow manually from the Actions tab - workflow_dispatch: - -# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages -permissions: - contents: read - pages: write - id-token: write - -# Allow one concurrent deployment -concurrency: - group: "pages" - cancel-in-progress: true - -jobs: - # Build job - build: - runs-on: ${{ github.repository_owner == 'oneapi-src' && 'intel-ubuntu-22.04' || 'ubuntu-latest' }} - steps: - - name: Checkout - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - - uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0 - with: - python-version: 3.9 - - - name: Install apt package - run: | - sudo apt-get update - sudo apt-get install -y doxygen - - - name: Install prerequisites - run: python3 -m pip install -r third_party/requirements.txt - - - name: Setup Pages - uses: actions/configure-pages@1f0c5cde4bc74cd7e1254d0cb4de8d49e9068c7d # v4.0.0 - - - name: Build Documentation - working-directory: ${{github.workspace}}/scripts - run: | - python3 run.py --core - mkdir -p ${{ github.workspace }}/ur-repo/ - mkdir -p ${{github.workspace}}/docs/html - - - name: Download benchmark HTML - id: download-bench-html - uses: actions/cache/restore@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 - with: - path: ur-repo/benchmark_results.html - key: benchmark-results- - - - name: Move benchmark HTML - # exact or partial cache hit - if: steps.download-bench-html.outputs.cache-hit != '' - run: | - mv ${{ github.workspace }}/ur-repo/benchmark_results.html ${{ github.workspace }}/docs/html/ - - - name: Upload artifact - uses: actions/upload-pages-artifact@0252fc4ba7626f0298f0cf00902a25c6afc77fa8 # v3.0.0 - with: - path: ${{github.workspace}}/docs/html - - # Deployment job - deploy: - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} - runs-on: ${{ github.repository_owner == 'oneapi-src' && 'intel-ubuntu-22.04' || 'ubuntu-latest' }} - needs: build - steps: - - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@87c3283f01cd6fe19a0ab93a23b2f6fcba5a8e42 # v4.0.3 diff --git a/.github/workflows/e2e_core.yml b/.github/workflows/e2e_core.yml deleted file mode 100644 index f12913c648..0000000000 --- a/.github/workflows/e2e_core.yml +++ /dev/null @@ -1,214 +0,0 @@ -name: E2E build & run - -on: - # this workflow can by only triggered by other workflows - # for example by: e2e_cuda.yml or e2e_opencl.yml - workflow_call: - # acceptable input from adapter-specific workflows - inputs: - name: - description: Adapter name - type: string - required: true - str_name: - description: Formatted adapter name - type: string - required: true - prefix: - description: Prefix for cmake parameter - type: string - required: true - config: - description: Params for sycl configuration - type: string - required: true - unit: - description: Test unit (cpu/gpu) - type: string - required: true - runner_tag: - description: Tag defifned for the runner - type: string - required: true - xfail: - description: Allow test failures - type: string - required: false - xfail_not: - description: Not xfail - type: string - required: false - filter_out: - description: Tests to filter out completely - type: string - required: false - extra_lit_flags: - description: Additional llvm-lit flags to use - type: string - required: false - -permissions: - contents: read - pull-requests: write - -jobs: - changed-files: - name: Check for changed files - runs-on: ${{ github.repository_owner == 'oneapi-src' && 'intel-ubuntu-22.04' || 'ubuntu-latest' }} - outputs: - any_changed: ${{ steps.get-changed.outputs.any_changed }} - steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - name: Get changed files - id: get-changed - uses: tj-actions/changed-files@d6babd6899969df1a11d14c368283ea4436bca78 # v44.5.2 - with: - files: | - source/adapters/${{inputs.str_name}}/** - source/loader/** - .github/workflows/e2e* - - e2e-build-hw: - # We want to run the job only if there are changes in the specific adapter - if: needs.changed-files.outputs.any_changed == 'true' - name: Build SYCL, UR, run E2E - needs: changed-files - permissions: - contents: read - pull-requests: write - - # Allow failures, since SYCL tests and API may be not stable - continue-on-error: true - strategy: - matrix: - adapter: [ - {name: "${{inputs.name}}", - str_name: "${{inputs.str_name}}", - prefix: "${{inputs.prefix}}", - config: "${{inputs.config}}", - unit: "${{inputs.unit}}", - extra_lit_flags: "${{inputs.extra_lit_flags}}"}, - ] - build_type: [Release] - compiler: [{c: clang, cxx: clang++}] - - runs-on: ${{inputs.runner_tag}} - - steps: - # Workspace on self-hosted runners is not cleaned automatically. - # We have to delete the files created outside of using actions. - - name: Cleanup self-hosted workspace - if: always() - run: | - ls -la ./ - rm -rf ./* || true - - - name: Checkout UR - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - with: - path: ur-repo - - - name: Checkout SYCL - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - with: - repository: intel/llvm - ref: refs/heads/sycl - path: sycl-repo - - - name: Set CUDA env vars - if: matrix.adapter.name == 'CUDA' - run: | - echo "CUDA_LIB_PATH=/usr/local/cuda/lib64/stubs" >> $GITHUB_ENV - echo "LD_LIBRARY_PATH=/usr/local/cuda/compat/:/usr/local/cuda/lib64:$LD_LIBRARY_PATH" >> $GITHUB_ENV - - - name: Configure SYCL - run: > - python3 sycl-repo/buildbot/configure.py - -t ${{matrix.build_type}} - -o ${{github.workspace}}/sycl_build - --cmake-gen "Ninja" - --ci-defaults ${{matrix.adapter.config}} - --cmake-opt="-DLLVM_INSTALL_UTILS=ON" - --cmake-opt="-DSYCL_PI_TESTS=OFF" - --cmake-opt="-DSYCL_UR_USE_FETCH_CONTENT=OFF" - --cmake-opt="-DSYCL_UR_SOURCE_DIR=${{github.workspace}}/ur-repo/" - --cmake-opt=-DCMAKE_C_COMPILER_LAUNCHER=ccache - --cmake-opt=-DCMAKE_CXX_COMPILER_LAUNCHER=ccache - - - name: Build SYCL - run: cmake --build ${{github.workspace}}/sycl_build -j - - - name: Set extra llvm-lit options - if: matrix.adapter.extra_lit_flags != '' - run: echo "LIT_OPTS=${{matrix.adapter.extra_lit_flags}}" >> $GITHUB_ENV - - - name: Run check-sycl - # Remove after fixing SYCL test :: abi/layout_handler.cpp - # This issue does not affect further execution of e2e with UR. - continue-on-error: true - run: cmake --build ${{github.workspace}}/sycl_build --target check-sycl - - - name: Set additional env. vars - run: | - echo "${{github.workspace}}/sycl_build/bin" >> $GITHUB_PATH - echo "LD_LIBRARY_PATH=${{github.workspace}}/sycl_build/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV - - # Running (newly built) sycl-ls sets up some extra variables - - name: Setup SYCL variables - run: | - which clang++ sycl-ls - SYCL_UR_TRACE=-1 sycl-ls - - - name: Build e2e tests - run: > - cmake - -GNinja - -B ${{github.workspace}}/build-e2e/ - -S ${{github.workspace}}/sycl-repo/sycl/test-e2e/ - -DSYCL_TEST_E2E_TARGETS="${{matrix.adapter.prefix}}${{matrix.adapter.str_name}}:${{matrix.adapter.unit}}" - -DCMAKE_CXX_COMPILER="$(which clang++)" - -DLLVM_LIT="${{github.workspace}}/sycl-repo/llvm/utils/lit/lit.py" - - - name: Set LIT_XFAIL - if: inputs.xfail != '' - run: echo "LIT_XFAIL=${{inputs.xfail}}" >> $GITHUB_ENV - - - name: Set LIT_FILTER_OUT - if: inputs.filter_out != '' - run: echo "LIT_FILTER_OUT=${{inputs.filter_out}}" >> $GITHUB_ENV - - - name: Set LIT_XFAIL_NOT - if: inputs.xfail_not != '' - run: echo "LIT_XFAIL_NOT=${{inputs.xfail_not}}" >> $GITHUB_ENV - - # TODO: remove once intel/llvm lit tests can properly recognize the GPU - - name: Configure hardware platform feature for L0 - if: matrix.adapter.name == 'L0' - run: | - sed -i '/import lit.llvm/i config.available_features.add("gpu-intel-pvc-1T")' build-e2e/lit.site.cfg.py - sed -i '/import lit.llvm/i config.available_features.add("gpu-intel-pvc")' build-e2e/lit.site.cfg.py - - - name: Run e2e tests - id: tests - run: ninja -C build-e2e check-sycl-e2e || echo "e2e tests have failed. Ignoring failure." - - # FIXME: Requires pull-request: write permissions but this is only granted - # on pull requests from forks if using pull_request_target workflow - # trigger but not the pull_request trigger.. - # - name: Add comment to PR - # uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 - # if: ${{ always() }} - # with: - # script: | - # const adapter = '${{ matrix.adapter.name }}'; - # const url = '${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}'; - # const test_status = '${{ steps.tests.outcome }}'; - # const job_status = '${{ job.status }}'; - # const body = `E2E ${adapter} build:\n${url}\nJob status: ${job_status}. Test status: ${test_status}`; - - # github.rest.issues.createComment({ - # issue_number: context.issue.number, - # owner: context.repo.owner, - # repo: context.repo.repo, - # body: body - # }) diff --git a/.github/workflows/e2e_cuda.yml b/.github/workflows/e2e_cuda.yml deleted file mode 100644 index c2f1d969b8..0000000000 --- a/.github/workflows/e2e_cuda.yml +++ /dev/null @@ -1,24 +0,0 @@ -name: E2E Cuda - -on: - workflow_call: - -permissions: - contents: read - pull-requests: write - -jobs: - e2e-build-hw: - if: github.repository == 'oneapi-src/unified-runtime' # run only on upstream; forks will not have the HW - name: Start e2e job - # use core flow, run it with cuda specific parameters - uses: ./.github/workflows/e2e_core.yml - with: - name: "CUDA" - runner_tag: "CUDA_E2E" - str_name: "cuda" - prefix: "ext_oneapi_" - config: "--cuda" - unit: "gpu" - extra_lit_flags: "-sv --max-time=3600" - xfail: "Regression/device_num.cpp" diff --git a/.github/workflows/e2e_level_zero.yml b/.github/workflows/e2e_level_zero.yml deleted file mode 100644 index 1fd814f271..0000000000 --- a/.github/workflows/e2e_level_zero.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: E2E Level Zero - -on: - workflow_call: - -permissions: - contents: read - pull-requests: write - -jobs: - e2e-build-hw: - if: github.repository == 'oneapi-src/unified-runtime' # run only on upstream; forks will not have the HW - name: Start e2e job - # use core flow, run it with L0 specific parameters - uses: ./.github/workflows/e2e_core.yml - with: - name: "L0" - runner_tag: "L0_E2E" - str_name: "level_zero" - prefix: "ext_oneapi_" - config: "" - unit: "gpu" - # Failing tests - xfail: "InvokeSimd/Regression/call_vadd_1d_spill.cpp;InvokeSimd/Regression/ImplicitSubgroup/call_vadd_1d_spill.cpp;ESIMD/mask_expand_load.cpp;Matrix/joint_matrix_prefetch.cpp;ESIMD/mask_expand_load.cpp;Matrix/SPVCooperativeMatrix/joint_matrix_prefetch.cpp;Matrix/joint_matrix_bf16_fill_k_cache_prefetch.cpp;Matrix/SPVCooperativeMatrix/element_wise_ops.cpp;" - # Unexpectedly Passed Tests - xfail_not: "" - # Flaky tests - filter_out: "Basic/accessor/accessor.cpp|DeviceArchitecture/device_architecture_comparison_on_device_aot.cpp|Graph/Explicit/interop-level-zero-launch-kernel.cpp|Graph/RecordReplay/interop-level-zero-launch-kernel.cpp|syclcompat/launch/launch_policy_lmem.cpp" - # These runners by default spawn upwards of 260 workers. - # We also add a time out just in case some test hangs - extra_lit_flags: "--param gpu-intel-pvc=True --param gpu-intel-pvc-1T=True -sv -j 100 --max-time=3600" diff --git a/.github/workflows/e2e_opencl.yml b/.github/workflows/e2e_opencl.yml deleted file mode 100644 index e4714b2434..0000000000 --- a/.github/workflows/e2e_opencl.yml +++ /dev/null @@ -1,24 +0,0 @@ -name: E2E OpenCL - -on: - workflow_call: - -permissions: - contents: read - pull-requests: write - -jobs: - e2e-build-hw: - if: github.repository == 'oneapi-src/unified-runtime' # run only on upstream; forks will not have the HW - name: Start e2e job - # use core flow, run it with OpenCL specific parameters - uses: ./.github/workflows/e2e_core.yml - with: - name: "OPENCL" - runner_tag: "OPENCL" - str_name: "opencl" - prefix: "" - config: "" - unit: "cpu" - xfail: "AOT/double.cpp;AOT/half.cpp;AOT/reqd-sg-size.cpp;Basic/built-ins/marray_geometric.cpp;KernelCompiler/kernel_compiler_spirv.cpp;KernelCompiler/opencl_queries.cpp;NonUniformGroups/ballot_group.cpp;NonUniformGroups/ballot_group_algorithms.cpp;NonUniformGroups/fixed_size_group_algorithms.cpp;NonUniformGroups/opportunistic_group.cpp;NonUniformGroups/opportunistic_group_algorithms.cpp;NonUniformGroups/tangle_group.cpp;NonUniformGroups/tangle_group_algorithms.cpp" - extra_lit_flags: "-sv --max-time=3600" diff --git a/.github/workflows/examples-hw-level-zero.yml b/.github/workflows/examples-hw-level-zero.yml deleted file mode 100644 index cf28b8e258..0000000000 --- a/.github/workflows/examples-hw-level-zero.yml +++ /dev/null @@ -1,69 +0,0 @@ ---- -name: Examples - Adapters on Level Zero HW - -on: [push, pull_request] - -concurrency: - group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -permissions: - contents: read - -jobs: - examples: - name: Examples on HW - # if: github.repository == 'oneapi-src/unified-runtime' # run only on upstream; forks won't have the HW - if: false # temporaily disabled due to conda env setup issues - strategy: - matrix: - adapter: [ - {name: L0} - ] - build_type: [Debug, Release] - compiler: [{c: gcc, cxx: g++}, {c: clang, cxx: clang++}] - - runs-on: ${{matrix.adapter.name}} - - steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - - name: Install pip packages - run: pip install -r third_party/requirements.txt - - - name: Init conda env - uses: conda-incubator/setup-miniconda@9f54435e0e72c53962ee863144e47a4b094bfd35 # v2.3.0 - with: - miniconda-version: "latest" - activate-environment: examples - environment-file: third_party/deps.yml - auto-activate-base: false - - - name: Configure CMake - shell: bash -el {0} - run: > - cmake - -B${{github.workspace}}/build - -DCMAKE_C_COMPILER=${{matrix.compiler.c}} - -DCMAKE_CXX_COMPILER=${{matrix.compiler.cxx}} - -DCMAKE_BUILD_TYPE=${{matrix.build_type}} - -DUR_BUILD_ADAPTER_${{matrix.adapter.name}}=ON - -DUR_BUILD_EXAMPLE_CODEGEN=ON - -DUR_DEVELOPER_MODE=ON - - - name: Build - run: cmake --build ${{github.workspace}}/build -j $(nproc) - - - name: Test codegen example - working-directory: ${{github.workspace}}/build - run: bin/codegen - - # conda init adds content to user's profile making it failing (if conda is gone) - - name: Cleanup after conda init - run: | - cat ${HOME}/.profile || true - rm ${HOME}/.profile || true - - - name: Get information about platform - if: ${{ always() }} - run: .github/scripts/get_system_info.sh diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml deleted file mode 100644 index faf7060503..0000000000 --- a/.github/workflows/labeler.yml +++ /dev/null @@ -1,23 +0,0 @@ -# Automatically add labels to pull requests based on globs in the -# .github/labeler.yml config file. For documentation see: -# https://github.com/marketplace/actions/labeler ---- -name: Pull Request Labeler - -on: [ pull_request_target ] - -concurrency: - group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -permissions: - contents: read - -jobs: - labeler: - permissions: - contents: read - pull-requests: write - runs-on: ${{ github.repository_owner == 'oneapi-src' && 'intel-ubuntu-22.04' || 'ubuntu-latest' }} - steps: - - uses: actions/labeler@8558fd74291d67161a8a78ce36a881fa63b766a9 # v5.0.0 diff --git a/.github/workflows/multi_device.yml b/.github/workflows/multi_device.yml deleted file mode 100644 index 2abc32cb1e..0000000000 --- a/.github/workflows/multi_device.yml +++ /dev/null @@ -1,65 +0,0 @@ ---- -name: Multi Device testing - -on: [push, pull_request] - -concurrency: - group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -permissions: - contents: read - -jobs: - examples: - name: Multi Device testing - if: github.repository == 'oneapi-src/unified-runtime' # run only on upstream; forks won't have the HW - strategy: - matrix: - adapter: [ - {name: L0}, - {name: L0_V2} - ] - build_type: [Debug, Release] - compiler: [{c: gcc, cxx: g++}] # TODO: investigate why memory-adapter-level_zero hangs with clang - - runs-on: "${{matrix.adapter.name}}_2T" - - steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - - name: Install pip packages - run: pip install -r third_party/requirements.txt - - - name: Download DPC++ - run: | - wget -O ${{github.workspace}}/dpcpp_compiler.tar.gz https://github.com/intel/llvm/releases/download/nightly-2024-01-29/sycl_linux.tar.gz - mkdir dpcpp_compiler - tar -xvf ${{github.workspace}}/dpcpp_compiler.tar.gz -C dpcpp_compiler - - - name: Configure CMake - shell: bash -el {0} - run: > - cmake - -B${{github.workspace}}/build - -DCMAKE_C_COMPILER=${{matrix.compiler.c}} - -DCMAKE_CXX_COMPILER=${{matrix.compiler.cxx}} - -DCMAKE_BUILD_TYPE=${{matrix.build_type}} - -DUR_DEVELOPER_MODE=ON - -DUR_BUILD_TESTS=ON - -DUR_BUILD_ADAPTER_${{matrix.adapter.name}}=ON - -DUR_CONFORMANCE_TEST_LOADER=OFF - -DUR_TEST_DEVICES_COUNT=2 - -DUR_DPCXX=${{github.workspace}}/dpcpp_compiler/bin/clang++ - -DUR_SYCL_LIBRARY_DIR=${{github.workspace}}/dpcpp_compiler/lib - - - name: Build - run: cmake --build ${{github.workspace}}/build -j $(nproc) - - - name: Test adapter specific - working-directory: ${{github.workspace}}/build - run: ctest -C ${{matrix.build_type}} --output-on-failure -L "adapter-specific" --timeout 180 - - - name: Test adapters - working-directory: ${{github.workspace}}/build - run: env UR_CTS_ADAPTER_PLATFORM="${{matrix.adapter.platform}}" ctest -C ${{matrix.build_type}} --output-on-failure -L "conformance" -E "exp_command_buffer" --timeout 180 diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml deleted file mode 100644 index 06d4026676..0000000000 --- a/.github/workflows/nightly.yml +++ /dev/null @@ -1,17 +0,0 @@ -name: Nightly - -on: - workflow_dispatch: - schedule: - # Run every day at 23:00 UTC - - cron: '0 23 * * *' - -permissions: - contents: read - -jobs: - fuzztest: - name: Fuzz tests long - uses: ./.github/workflows/build-fuzz-reusable.yml - with: - test_label: "fuzz-long" diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml deleted file mode 100644 index f466cc693e..0000000000 --- a/.github/workflows/prerelease.yml +++ /dev/null @@ -1,24 +0,0 @@ ---- -name: Deploy weekly prerelease - -on: - schedule: - # At 23:00 on Friday, GitHub actions schedule is in UTC time. - - cron: 0 23 * * 5 - -permissions: - contents: read - -jobs: - weekly-prerelease: - runs-on: ${{ github.repository_owner == 'oneapi-src' && 'intel-ubuntu-22.04' || 'ubuntu-latest' }} - permissions: - contents: write - steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - - name: Create weekly prerelease - run: - gh release create --prerelease --title "Weekly Stable Snapshot $(date +%Y/%m/%d)" weekly-$(date +%Y-%m-%d) - env: - GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} diff --git a/.github/workflows/scorecard.yml b/.github/workflows/scorecard.yml deleted file mode 100644 index 693cfdd9e5..0000000000 --- a/.github/workflows/scorecard.yml +++ /dev/null @@ -1,60 +0,0 @@ -# Scorecard analysis, looking for vulnerabilities and bad practices in the repo. -name: Scorecard supply-chain security -on: - # For Branch-Protection check. Only the default branch is supported. See - # https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection - branch_protection_rule: - workflow_dispatch: - schedule: - # Runs at 22:45 UTC on Thursday. - - cron: '45 22 * * 4' - push: - branches: [ "main" ] - -# Declare default permissions as read only. -permissions: read-all - -jobs: - analysis: - name: Scorecard analysis - runs-on: ubuntu-latest - permissions: - # Needed to upload the results to code-scanning dashboard. - security-events: write - # Needed to publish results and get a badge (see publish_results below). - id-token: write - - steps: - - name: "Checkout code" - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - with: - persist-credentials: false - - - name: "Run analysis" - uses: ossf/scorecard-action@0864cf19026789058feabb7e87baa5f140aac736 # v2.3.1 - with: - results_file: scorecard_results.sarif - results_format: sarif - # (Optional) "write" PAT token. Uncomment the `repo_token` line below if: - # - you want to enable the Branch-Protection check on a *public* repository, or - # - you are installing Scorecard on a *private* repository - # To create the PAT, follow the steps in https://github.com/ossf/scorecard-action#authentication-with-pat. - # repo_token: ${{ secrets.SCORECARD_TOKEN }} - - # Publish results to OpenSSF REST API for easy access by consumers - # Allows the repository to include the Scorecard badge. - # See https://github.com/ossf/scorecard-action#publishing-results. - publish_results: true - - - name: "Upload artifact" - uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # 4.3.1 - with: - name: Scorecard results - path: scorecard_results.sarif - retention-days: 5 - - # Upload the results to GitHub's code scanning dashboard. - - name: "Upload to code-scanning" - uses: github/codeql-action/upload-sarif@05963f47d870e2cb19a537396c1f668a348c7d8f # v3.24.8 - with: - sarif_file: scorecard_results.sarif diff --git a/.github/workflows/source-checks.yml b/.github/workflows/source-checks.yml deleted file mode 100644 index e73f403320..0000000000 --- a/.github/workflows/source-checks.yml +++ /dev/null @@ -1,71 +0,0 @@ -name: Source Checks - -on: [push, pull_request] - -concurrency: - group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -permissions: - contents: read - -jobs: - source-checks: - name: Source Checks - strategy: - matrix: - os: ['ubuntu-22.04', 'windows-2022'] - - runs-on: ${{matrix.os}} - - steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - - uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0 - with: - python-version: 3.9 - - - name: Install pip packages - run: pip install -r third_party/requirements.txt - - - name: "[Lin] Install doxygen" - if: matrix.os == 'ubuntu-22.04' - run: | - sudo apt-get update - sudo apt-get install -y doxygen - - - name: "[Win] Install doxygen" - if: matrix.os == 'windows-2022' - run: | - $WorkingDir = $PWD.Path - Invoke-WebRequest -Uri https://github.com/doxygen/doxygen/releases/download/Release_1_9_8/doxygen-1.9.8.windows.x64.bin.zip -OutFile "$WorkingDir\doxygen.zip" - Expand-Archive -Path "$WorkingDir\doxygen.zip" - Add-Content $env:GITHUB_PATH "$WorkingDir\doxygen" - - - name: "[Lin] Install hwloc" - if: matrix.os == 'ubuntu-22.04' - run: .github/scripts/install_hwloc.sh - - - name: "[Win] Install hwloc" - if: matrix.os == 'windows-2022' - run: vcpkg install hwloc:x64-windows - - - name: Configure CMake - env: - VCPKG_PATH: "C:/vcpkg/packages/hwloc_x64-windows" - run: > - cmake - -B${{github.workspace}}/build - -DCMAKE_PREFIX_PATH="${{env.VCPKG_PATH}}" - -DUR_ENABLE_TRACING=OFF - -DCMAKE_BUILD_TYPE=Debug - -DUR_BUILD_TESTS=OFF - -DUR_FORMAT_CPP_STYLE=ON - - # Verifying license should be enough on a single OS - - name: Verify that each source file contains a license - if: matrix.os == 'ubuntu-22.04' - run: cmake --build ${{github.workspace}}/build --target verify-licenses - - - name: Generate source from spec, check for uncommitted diff - run: cmake --build ${{github.workspace}}/build --target check-generated diff --git a/.github/workflows/trivy.yml b/.github/workflows/trivy.yml deleted file mode 100644 index c2ef1d47e7..0000000000 --- a/.github/workflows/trivy.yml +++ /dev/null @@ -1,50 +0,0 @@ -# Runs linter for Docker files -name: Trivy - -on: - workflow_dispatch: - push: - pull_request: - paths: - - '.github/docker/*Dockerfile' - - '.github/workflows/trivy.yml' - -concurrency: - group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -permissions: - contents: read - -jobs: - linux: - name: Trivy - runs-on: ${{ github.repository_owner == 'oneapi-src' && 'intel-ubuntu-22.04' || 'ubuntu-latest' }} - permissions: - security-events: write - - steps: - - name: Clone repo - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - - name: Run Trivy - uses: aquasecurity/trivy-action@84384bd6e777ef152729993b8145ea352e9dd3ef # v0.17.0 - with: - scan-type: 'config' - hide-progress: false - format: 'sarif' - output: 'trivy-results.sarif' - exit-code: 1 # Fail if issue found - # file with suppressions: .trivyignore (in root dir) - - - name: Print report and trivyignore file - run: | - echo "### Trivy ignore content:" - cat .trivyignore - echo "### Trivy report:" - cat trivy-results.sarif - - - name: Upload results - uses: github/codeql-action/upload-sarif@e8893c57a1f3a2b659b6b55564fdfdbbd2982911 # v3.24.0 - with: - sarif_file: 'trivy-results.sarif'