From 01cdf1109021281ab54d0b68914551ab1027f716 Mon Sep 17 00:00:00 2001 From: rbanka1 Date: Wed, 23 Apr 2025 18:09:50 +0200 Subject: [PATCH 1/2] added dockers Signed-off-by: rbanka1 --- .../workflows/sycl-linux-precommit-aws.yml | 5 + .github/workflows/sycl-linux-precommit.yml | 20 ++- .github/workflows/sycl-windows-precommit.yml | 25 +-- .github/workflows/ur-build-hw.yml | 73 ++++++--- .github/workflows/ur-precommit.yml | 154 +++++++++++------- 5 files changed, 180 insertions(+), 97 deletions(-) diff --git a/.github/workflows/sycl-linux-precommit-aws.yml b/.github/workflows/sycl-linux-precommit-aws.yml index e8bd368556aa9..98c5cb2405fa0 100644 --- a/.github/workflows/sycl-linux-precommit-aws.yml +++ b/.github/workflows/sycl-linux-precommit-aws.yml @@ -21,6 +21,7 @@ permissions: jobs: create-check: + if: false runs-on: [Linux, aux-tasks] permissions: checks: write @@ -45,6 +46,7 @@ jobs: }) aws-start: + if: false runs-on: ubuntu-latest environment: aws steps: @@ -61,6 +63,7 @@ jobs: AWS_SECRET_KEY: ${{ secrets.AWS_SECRET_KEY }} e2e-cuda: + if: false needs: [aws-start] uses: ./.github/workflows/sycl-linux-run-tests.yml with: @@ -78,6 +81,7 @@ jobs: sycl_toolchain_decompress_command: zstd update-check: + if: false needs: [create-check, e2e-cuda] if: always() runs-on: [Linux, aux-tasks] @@ -104,6 +108,7 @@ jobs: }) aws-stop: + if: false needs: [aws-start, e2e-cuda] if: always() runs-on: ubuntu-latest diff --git a/.github/workflows/sycl-linux-precommit.yml b/.github/workflows/sycl-linux-precommit.yml index e14649f904521..1ff127bda1be0 100644 --- a/.github/workflows/sycl-linux-precommit.yml +++ b/.github/workflows/sycl-linux-precommit.yml @@ -44,7 +44,8 @@ jobs: build: needs: [detect_changes] - if: always() && success() + # if: always() && success() + if: false uses: ./.github/workflows/sycl-linux-build.yml with: build_ref: ${{ github.sha }} @@ -64,7 +65,8 @@ jobs: # The idea is to ensure that the code works with both CUDA versions. build_ubuntu2204: needs: [detect_changes] - if: always() && !cancelled() && contains(needs.detect_changes.outputs.filters, 'ur_cuda_adapter') + # if: always() && !cancelled() && contains(needs.detect_changes.outputs.filters, 'ur_cuda_adapter') + if: false uses: ./.github/workflows/sycl-linux-build.yml with: build_ref: ${{ github.sha }} @@ -76,7 +78,8 @@ jobs: run_prebuilt_e2e_tests: needs: [build, detect_changes] - if: ${{ always() && !cancelled() && needs.build.outputs.build_conclusion == 'success' }} + # if: ${{ always() && !cancelled() && needs.build.outputs.build_conclusion == 'success' }} + if: false strategy: fail-fast: false matrix: @@ -160,11 +163,12 @@ jobs: test-perf: needs: [build, detect_changes] - if: | - always() && !cancelled() - && needs.build.outputs.build_conclusion == 'success' - && (contains(github.event.pull_request.labels.*.name, 'run-perf-tests') - || contains(needs.detect_changes.outputs.filters, 'perf-tests')) + # if: | + # always() && !cancelled() + # && needs.build.outputs.build_conclusion == 'success' + # && (contains(github.event.pull_request.labels.*.name, 'run-perf-tests') + # || contains(needs.detect_changes.outputs.filters, 'perf-tests')) + if: false strategy: fail-fast: false matrix: diff --git a/.github/workflows/sycl-windows-precommit.yml b/.github/workflows/sycl-windows-precommit.yml index 40f25e873764c..45fa2a9a3a6c1 100644 --- a/.github/workflows/sycl-windows-precommit.yml +++ b/.github/workflows/sycl-windows-precommit.yml @@ -43,9 +43,10 @@ jobs: build: needs: [detect_changes] - if: | - always() && success() - && github.repository == 'intel/llvm' + # if: | + # always() && success() + # && github.repository == 'intel/llvm' + if: false uses: ./.github/workflows/sycl-windows-build.yml with: changes: ${{ needs.detect_changes.outputs.filters }} @@ -53,10 +54,11 @@ jobs: build-e2e: needs: build # Continue if build was successful. - if: | - always() - && !cancelled() - && needs.build.outputs.build_conclusion == 'success' + # if: | + # always() + # && !cancelled() + # && needs.build.outputs.build_conclusion == 'success' + if: false uses: ./.github/workflows/sycl-windows-run-tests.yml with: name: Build Windows E2E tests @@ -69,10 +71,11 @@ jobs: run_prebuilt_e2e_tests: needs: [build, build-e2e] # Continue if build was successful. - if: | - always() - && !cancelled() - && needs.build.outputs.build_conclusion == 'success' + # if: | + # always() + # && !cancelled() + # && needs.build.outputs.build_conclusion == 'success' + if: false strategy: fail-fast: false matrix: diff --git a/.github/workflows/ur-build-hw.yml b/.github/workflows/ur-build-hw.yml index f6af36cb5bf0f..f003afdaefb31 100644 --- a/.github/workflows/ur-build-hw.yml +++ b/.github/workflows/ur-build-hw.yml @@ -26,6 +26,14 @@ on: required: false type: string default: OFF + docker_image: + required: true + type: string + default: "" + image_options: + required: true + type: string + default: "" workflow_dispatch: inputs: adapter_name: @@ -51,9 +59,16 @@ on: required: false type: string default: OFF + docker_image: + required: true + type: string + default: "" + image_options: + required: true + type: string + default: "" -permissions: - contents: read +permissions: read-all env: UR_LOG_CUDA: "level:error;flush:error" @@ -61,12 +76,13 @@ env: UR_LOG_LEVEL_ZERO: "level:error;flush:error" UR_LOG_NATIVE_CPU: "level:error;flush:error" UR_LOG_OPENCL: "level:error;flush:error" + CURRENT_DIR: $(pwd) jobs: adapter_build_hw: name: Build & CTS # run only on upstream; forks won't have the HW - if: github.repository == 'intel/llvm' + # if: github.repository == 'intel/llvm' strategy: fail-fast: false matrix: @@ -83,6 +99,9 @@ jobs: compiler: [{c: gcc, cxx: g++}] runs-on: ${{inputs.runner_name}} + container: + image: ${{ inputs.docker_image }} + options: ${{ inputs.image_options }} steps: # TODO: @@ -94,28 +113,42 @@ jobs: - name: Checkout LLVM uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - # Latest distros do not allow global pip installation + - name: Set up Python 3.10 + if: ${{ inputs.docker_image == 'ghcr.io/intel/llvm/ubuntu2404_intel_drivers:alldeps' }} + uses: actions/setup-python@v5 + with: + python-version: '3.10' + - name: Install UR python dependencies in venv - working-directory: ${{github.workspace}}/unified-runtime + working-directory: ./unified-runtime run: | python3 -m venv .venv . .venv/bin/activate - echo "$PATH" >> $GITHUB_PATH + echo "${PWD}/.venv/bin" >> $GITHUB_PATH pip install -r third_party/requirements.txt pip install -r third_party/requirements_testing.txt - name: Download DPC++ run: | - wget -O ${{github.workspace}}/dpcpp_compiler.tar.gz https://github.com/intel/llvm/releases/download/nightly-2024-12-12/sycl_linux.tar.gz - mkdir dpcpp_compiler - tar -xvf ${{github.workspace}}/dpcpp_compiler.tar.gz -C dpcpp_compiler + wget -O dpcpp_compiler.tar.gz https://github.com/intel/llvm/releases/download/nightly-2024-12-12/sycl_linux.tar.gz + mkdir -p dpcpp_compiler + tar -xvf dpcpp_compiler.tar.gz -C dpcpp_compiler + + - name: Install OpenCL + if: ${{ inputs.adapter_name == 'OPENCL' }} + run: | + wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB \ + | gpg --dearmor | sudo 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" | sudo tee /etc/apt/sources.list.d/oneAPI.list + sudo apt-get update + sudo apt-get install -y intel-oneapi-runtime-opencl - name: Configure Unified Runtime project - working-directory: ${{github.workspace}}/unified-runtime # ">" is used to avoid adding "\" at the end of each line; this command is quite long run: > cmake - -B${{github.workspace}}/build + -S unified-runtime + -B build -DCMAKE_C_COMPILER=${{matrix.compiler.c}} -DCMAKE_CXX_COMPILER=${{matrix.compiler.cxx}} -DCMAKE_BUILD_TYPE=${{matrix.build_type}} @@ -127,32 +160,34 @@ jobs: ${{ 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 + -DUR_DPCXX=./dpcpp_compiler/bin/clang++ + -DUR_SYCL_LIBRARY_DIR=./dpcpp_compiler/lib + -DCMAKE_INSTALL_PREFIX=./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) + run: cmake --build build -j $(nproc) - name: Install # This is to check that install command does not fail - run: cmake --install ${{github.workspace}}/build + run: cmake --install build - name: Test adapter specific env: ZE_ENABLE_LOADER_DEBUG_TRACE: 1 - run: ctest -C ${{matrix.build_type}} --test-dir ${{github.workspace}}/build --output-on-failure -L "adapter-specific" -E "memcheck" --timeout 600 -VV + ZE_DEBUG: 1 + run: ctest -C ${{matrix.build_type}} --test-dir build --output-on-failure -L "adapter-specific" -E "memcheck" --timeout 600 # Don't run adapter specific tests when building multiple adapters if: ${{ matrix.adapter.other_name == '' }} - name: Test adapters env: ZE_ENABLE_LOADER_DEBUG_TRACE: 1 - run: env UR_CTS_ADAPTER_PLATFORM="${{matrix.adapter.platform}}" ctest -C ${{matrix.build_type}} --test-dir ${{github.workspace}}/build --output-on-failure -L "conformance" --timeout 600 -VV + ZE_DEBUG: 1 + run: env UR_CTS_ADAPTER_PLATFORM="${{matrix.adapter.platform}}" ctest -C ${{matrix.build_type}} --test-dir build --output-on-failure -L "conformance" --timeout 600 - name: Get information about platform if: ${{ always() }} - run: ${{github.workspace}}/unified-runtime/.github/scripts/get_system_info.sh + run: ./unified-runtime/.github/scripts/get_system_info.sh \ No newline at end of file diff --git a/.github/workflows/ur-precommit.yml b/.github/workflows/ur-precommit.yml index 09af48933f046..cd139bce41123 100644 --- a/.github/workflows/ur-precommit.yml +++ b/.github/workflows/ur-precommit.yml @@ -5,6 +5,9 @@ name: Unified Runtime Pre Commit # Note: the trigger is copy-pasted from sycl-linux-precommit.yml - probably to be fine-tuned. on: + push: + branches-ignore: + - 'dependabot/**' # We rely on "Fork pull request workflows from outside collaborators" - # "Require approval for all outside collaborators" at # https://github.com/intel/llvm/settings/actions for security. @@ -40,76 +43,109 @@ jobs: name: Detect Changes uses: ./.github/workflows/sycl-detect-changes.yml - source_checks: - name: Source Checks - needs: [detect_changes] - if: ${{ always() && !cancelled() && contains(needs.detect_changes.outputs.filters, 'ur') }} - uses: ./.github/workflows/ur-source-checks.yml + # source_checks: + # name: Source Checks + # needs: [detect_changes] + # if: ${{ always() && !cancelled() && contains(needs.detect_changes.outputs.filters, 'ur') }} + # uses: ./.github/workflows/ur-source-checks.yml adapters: name: Adapters - needs: [detect_changes, source_checks] - if: ${{ always() && !cancelled() && contains(needs.detect_changes.outputs.filters, 'ur') }} + # needs: [detect_changes, source_checks] + # if: ${{ always() && !cancelled() && contains(needs.detect_changes.outputs.filters, 'ur') }} + # needs: [detect_changes, source_checks] + # if: ${{ always() && !cancelled() && contains(needs.detect_changes.outputs.filters, 'ur') }} strategy: matrix: - # Extra native CPU jobs are here to force the loader to be used. - # UR will not use the loader if there is only one target. - adapter: [ - {name: L0, runner: UR_L0}, - {name: L0_V2, runner: UR_L0}, - {name: L0, runner: UR_L0, static: ON}, - {name: OPENCL, runner: UR_OPENCL, platform: "Intel(R) OpenCL"}, - {name: CUDA, runner: UR_CUDA}, - {name: HIP, runner: UR_HIP}, - {name: NATIVE_CPU, runner: UR_NATIVE_CPU}, - {name: OPENCL, runner: UR_OPENCL, other_adapter: NATIVE_CPU, platform: "OPENCL:Intel(R) OpenCL"}, - {name: L0, runner: UR_L0, other_adapter: NATIVE_CPU}, - ] + include: + - name: L0 + runner: UR_L0 + docker_image: "ghcr.io/intel/llvm/ubuntu2404_intel_drivers:alldeps" + image_options: -u 1001 --device=/dev/dri -v /dev/dri/by-path:/dev/dri/by-path --privileged --cap-add SYS_ADMIN + - name: L0_V2 + runner: UR_L0 + docker_image: "ghcr.io/intel/llvm/ubuntu2404_intel_drivers:alldeps" + image_options: -u 1001 --device=/dev/dri -v /dev/dri/by-path:/dev/dri/by-path --privileged --cap-add SYS_ADMIN + - name: L0 + runner: UR_L0 + docker_image: "ghcr.io/intel/llvm/ubuntu2404_intel_drivers:alldeps" + image_options: -u 1001 --device=/dev/dri -v /dev/dri/by-path:/dev/dri/by-path --privileged --cap-add SYS_ADMIN + static: ON + - name: L0 + runner: UR_L0 + docker_image: "ghcr.io/intel/llvm/ubuntu2404_intel_drivers:alldeps" + image_options: -u 1001 --device=/dev/dri -v /dev/dri/by-path:/dev/dri/by-path --privileged --cap-add SYS_ADMIN + other_adapter: NATIVE_CPU + - name: HIP + runner: UR_HIP + docker_image: "ghcr.io/intel/llvm/ubuntu2404_intel_drivers:alldeps" + image_options: -u 1001 --device=/dev/dri --device=/dev/kfd --cap-add=SYS_ADMIN + - name: CUDA + runner: UR_CUDA + docker_image: "ghcr.io/intel/llvm/ubuntu2404_intel_drivers:alldeps" + image_options: -u 1001 --privileged --cap-add SYS_ADMIN --gpus all + - name: OPENCL + runner: UR_OPENCL + platform: "Intel(R) OpenCL" + docker_image: "ghcr.io/intel/llvm/ubuntu2204_build:latest" + image_options: -u 1001 --device=/dev/dri --device=/dev/kfd --privileged --cap-add SYS_ADMIN + - name: OPENCL + runner: UR_OPENCL + platform: "OPENCL:Intel(R) OpenCL" + docker_image: "ghcr.io/intel/llvm/ubuntu2204_build:latest" + image_options: -u 1001 --device=/dev/dri --device=/dev/kfd --privileged --cap-add SYS_ADMIN + other_adapter: NATIVE_CPU + - name: NATIVE_CPU + runner: UR_NATIVE_CPU + docker_image: "ghcr.io/intel/llvm/ubuntu2204_build:latest" + image_options: -u 1001 --device=/dev/dri --privileged --cap-add SYS_ADMIN uses: ./.github/workflows/ur-build-hw.yml with: - adapter_name: ${{ matrix.adapter.name }} - runner_name: ${{ matrix.adapter.runner }} - static_loader: ${{ matrix.adapter.static || 'OFF' }} - static_adapter: ${{ matrix.adapter.static || 'OFF' }} - platform: ${{ matrix.adapter.platform || '' }} - other_adapter_name: ${{ matrix.adapter.other_adapter || '' }} + adapter_name: ${{ matrix.name }} + runner_name: ${{ matrix.runner }} + static_loader: ${{ matrix.static || 'OFF' }} + static_adapter: ${{ matrix.static || 'OFF' }} + platform: ${{ matrix.platform || '' }} + other_adapter_name: ${{ matrix.other_adapter || '' }} + docker_image: ${{ matrix.docker_image }} + image_options: ${{ matrix.image_options || '' }} - macos: - name: MacOS build only - needs: [detect_changes, source_checks] - if: ${{ always() && !cancelled() && contains(needs.detect_changes.outputs.filters, 'ur') }} - strategy: - matrix: - os: ['macos-13'] - runs-on: ${{matrix.os}} + # macos: + # name: MacOS build only + # needs: [detect_changes, source_checks] + # if: ${{ always() && !cancelled() && contains(needs.detect_changes.outputs.filters, 'ur') }} + # strategy: + # matrix: + # os: ['macos-13'] + # runs-on: ${{matrix.os}} - steps: - - name: Checkout LLVM - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + # steps: + # - name: Checkout LLVM + # uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.0.0 - with: - python-version: "3.10" + # - uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.0.0 + # with: + # python-version: "3.10" - - name: Install prerequisites - working-directory: ${{github.workspace}}/unified-runtime - run: | - python3 -m pip install -r third_party/requirements.txt - python3 -m pip install -r third_party/requirements_testing.txt + # - name: Install prerequisites + # working-directory: ${{github.workspace}}/unified-runtime + # run: | + # python3 -m pip install -r third_party/requirements.txt + # python3 -m pip install -r third_party/requirements_testing.txt - - name: Install hwloc - run: brew install hwloc + # - name: Install hwloc + # run: brew install hwloc - - name: Configure Unified Runtime project - working-directory: ${{github.workspace}}/unified-runtime - 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 + # - name: Configure Unified Runtime project + # working-directory: ${{github.workspace}}/unified-runtime + # 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 - - name: Build - run: cmake --build ${{github.workspace}}/build -j $(sysctl -n hw.logicalcpu) + # - name: Build + # run: cmake --build ${{github.workspace}}/build -j $(sysctl -n hw.logicalcpu) \ No newline at end of file From 8705ba49168411c45857b5ebdae54d871fb8dd83 Mon Sep 17 00:00:00 2001 From: rbanka1 Date: Fri, 25 Apr 2025 18:01:04 +0200 Subject: [PATCH 2/2] added dockers fix Signed-off-by: rbanka1 --- .../workflows/sycl-linux-precommit-aws.yml | 5 - .github/workflows/sycl-linux-precommit.yml | 20 ++-- .github/workflows/sycl-windows-precommit.yml | 25 ++--- .github/workflows/ur-build-hw.yml | 20 ++-- .github/workflows/ur-precommit.yml | 101 ++++++++---------- 5 files changed, 74 insertions(+), 97 deletions(-) diff --git a/.github/workflows/sycl-linux-precommit-aws.yml b/.github/workflows/sycl-linux-precommit-aws.yml index 98c5cb2405fa0..e8bd368556aa9 100644 --- a/.github/workflows/sycl-linux-precommit-aws.yml +++ b/.github/workflows/sycl-linux-precommit-aws.yml @@ -21,7 +21,6 @@ permissions: jobs: create-check: - if: false runs-on: [Linux, aux-tasks] permissions: checks: write @@ -46,7 +45,6 @@ jobs: }) aws-start: - if: false runs-on: ubuntu-latest environment: aws steps: @@ -63,7 +61,6 @@ jobs: AWS_SECRET_KEY: ${{ secrets.AWS_SECRET_KEY }} e2e-cuda: - if: false needs: [aws-start] uses: ./.github/workflows/sycl-linux-run-tests.yml with: @@ -81,7 +78,6 @@ jobs: sycl_toolchain_decompress_command: zstd update-check: - if: false needs: [create-check, e2e-cuda] if: always() runs-on: [Linux, aux-tasks] @@ -108,7 +104,6 @@ jobs: }) aws-stop: - if: false needs: [aws-start, e2e-cuda] if: always() runs-on: ubuntu-latest diff --git a/.github/workflows/sycl-linux-precommit.yml b/.github/workflows/sycl-linux-precommit.yml index 1ff127bda1be0..e14649f904521 100644 --- a/.github/workflows/sycl-linux-precommit.yml +++ b/.github/workflows/sycl-linux-precommit.yml @@ -44,8 +44,7 @@ jobs: build: needs: [detect_changes] - # if: always() && success() - if: false + if: always() && success() uses: ./.github/workflows/sycl-linux-build.yml with: build_ref: ${{ github.sha }} @@ -65,8 +64,7 @@ jobs: # The idea is to ensure that the code works with both CUDA versions. build_ubuntu2204: needs: [detect_changes] - # if: always() && !cancelled() && contains(needs.detect_changes.outputs.filters, 'ur_cuda_adapter') - if: false + if: always() && !cancelled() && contains(needs.detect_changes.outputs.filters, 'ur_cuda_adapter') uses: ./.github/workflows/sycl-linux-build.yml with: build_ref: ${{ github.sha }} @@ -78,8 +76,7 @@ jobs: run_prebuilt_e2e_tests: needs: [build, detect_changes] - # if: ${{ always() && !cancelled() && needs.build.outputs.build_conclusion == 'success' }} - if: false + if: ${{ always() && !cancelled() && needs.build.outputs.build_conclusion == 'success' }} strategy: fail-fast: false matrix: @@ -163,12 +160,11 @@ jobs: test-perf: needs: [build, detect_changes] - # if: | - # always() && !cancelled() - # && needs.build.outputs.build_conclusion == 'success' - # && (contains(github.event.pull_request.labels.*.name, 'run-perf-tests') - # || contains(needs.detect_changes.outputs.filters, 'perf-tests')) - if: false + if: | + always() && !cancelled() + && needs.build.outputs.build_conclusion == 'success' + && (contains(github.event.pull_request.labels.*.name, 'run-perf-tests') + || contains(needs.detect_changes.outputs.filters, 'perf-tests')) strategy: fail-fast: false matrix: diff --git a/.github/workflows/sycl-windows-precommit.yml b/.github/workflows/sycl-windows-precommit.yml index 45fa2a9a3a6c1..40f25e873764c 100644 --- a/.github/workflows/sycl-windows-precommit.yml +++ b/.github/workflows/sycl-windows-precommit.yml @@ -43,10 +43,9 @@ jobs: build: needs: [detect_changes] - # if: | - # always() && success() - # && github.repository == 'intel/llvm' - if: false + if: | + always() && success() + && github.repository == 'intel/llvm' uses: ./.github/workflows/sycl-windows-build.yml with: changes: ${{ needs.detect_changes.outputs.filters }} @@ -54,11 +53,10 @@ jobs: build-e2e: needs: build # Continue if build was successful. - # if: | - # always() - # && !cancelled() - # && needs.build.outputs.build_conclusion == 'success' - if: false + if: | + always() + && !cancelled() + && needs.build.outputs.build_conclusion == 'success' uses: ./.github/workflows/sycl-windows-run-tests.yml with: name: Build Windows E2E tests @@ -71,11 +69,10 @@ jobs: run_prebuilt_e2e_tests: needs: [build, build-e2e] # Continue if build was successful. - # if: | - # always() - # && !cancelled() - # && needs.build.outputs.build_conclusion == 'success' - if: false + if: | + always() + && !cancelled() + && needs.build.outputs.build_conclusion == 'success' strategy: fail-fast: false matrix: diff --git a/.github/workflows/ur-build-hw.yml b/.github/workflows/ur-build-hw.yml index f003afdaefb31..7e1203c16feff 100644 --- a/.github/workflows/ur-build-hw.yml +++ b/.github/workflows/ur-build-hw.yml @@ -76,13 +76,12 @@ env: UR_LOG_LEVEL_ZERO: "level:error;flush:error" UR_LOG_NATIVE_CPU: "level:error;flush:error" UR_LOG_OPENCL: "level:error;flush:error" - CURRENT_DIR: $(pwd) jobs: adapter_build_hw: name: Build & CTS # run only on upstream; forks won't have the HW - # if: github.repository == 'intel/llvm' + if: github.repository == 'intel/llvm' strategy: fail-fast: false matrix: @@ -113,18 +112,19 @@ jobs: - name: Checkout LLVM uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - name: Set up Python 3.10 + # for some reason it's required to re-configure python for venv to work properly. + - name: Set up Python 3.12 if: ${{ inputs.docker_image == 'ghcr.io/intel/llvm/ubuntu2404_intel_drivers:alldeps' }} - uses: actions/setup-python@v5 + uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 with: - python-version: '3.10' + python-version: '3.12' - name: Install UR python dependencies in venv working-directory: ./unified-runtime run: | python3 -m venv .venv . .venv/bin/activate - echo "${PWD}/.venv/bin" >> $GITHUB_PATH + echo "$PATH" >> $GITHUB_PATH pip install -r third_party/requirements.txt pip install -r third_party/requirements_testing.txt @@ -177,17 +177,15 @@ jobs: - name: Test adapter specific env: ZE_ENABLE_LOADER_DEBUG_TRACE: 1 - ZE_DEBUG: 1 - run: ctest -C ${{matrix.build_type}} --test-dir build --output-on-failure -L "adapter-specific" -E "memcheck" --timeout 600 + run: ctest -C ${{matrix.build_type}} --test-dir build --output-on-failure -L "adapter-specific" -E "memcheck" --timeout 600 -VV # Don't run adapter specific tests when building multiple adapters if: ${{ matrix.adapter.other_name == '' }} - name: Test adapters env: ZE_ENABLE_LOADER_DEBUG_TRACE: 1 - ZE_DEBUG: 1 - run: env UR_CTS_ADAPTER_PLATFORM="${{matrix.adapter.platform}}" ctest -C ${{matrix.build_type}} --test-dir build --output-on-failure -L "conformance" --timeout 600 + run: env UR_CTS_ADAPTER_PLATFORM="${{matrix.adapter.platform}}" ctest -C ${{matrix.build_type}} --test-dir build --output-on-failure -L "conformance" --timeout 600 -VV - name: Get information about platform if: ${{ always() }} - run: ./unified-runtime/.github/scripts/get_system_info.sh \ No newline at end of file + run: ./unified-runtime/.github/scripts/get_system_info.sh diff --git a/.github/workflows/ur-precommit.yml b/.github/workflows/ur-precommit.yml index cd139bce41123..0d0824bbd334c 100644 --- a/.github/workflows/ur-precommit.yml +++ b/.github/workflows/ur-precommit.yml @@ -5,9 +5,6 @@ name: Unified Runtime Pre Commit # Note: the trigger is copy-pasted from sycl-linux-precommit.yml - probably to be fine-tuned. on: - push: - branches-ignore: - - 'dependabot/**' # We rely on "Fork pull request workflows from outside collaborators" - # "Require approval for all outside collaborators" at # https://github.com/intel/llvm/settings/actions for security. @@ -43,46 +40,40 @@ jobs: name: Detect Changes uses: ./.github/workflows/sycl-detect-changes.yml - # source_checks: - # name: Source Checks - # needs: [detect_changes] - # if: ${{ always() && !cancelled() && contains(needs.detect_changes.outputs.filters, 'ur') }} - # uses: ./.github/workflows/ur-source-checks.yml + source_checks: + name: Source Checks + needs: [detect_changes] + if: ${{ always() && !cancelled() && contains(needs.detect_changes.outputs.filters, 'ur') }} + uses: ./.github/workflows/ur-source-checks.yml adapters: name: Adapters - # needs: [detect_changes, source_checks] - # if: ${{ always() && !cancelled() && contains(needs.detect_changes.outputs.filters, 'ur') }} - # needs: [detect_changes, source_checks] - # if: ${{ always() && !cancelled() && contains(needs.detect_changes.outputs.filters, 'ur') }} + needs: [detect_changes, source_checks] + if: ${{ always() && !cancelled() && contains(needs.detect_changes.outputs.filters, 'ur') }} strategy: matrix: + # Extra native CPU jobs are here to force the loader to be used. + # UR will not use the loader if there is only one target. include: - name: L0 runner: UR_L0 - docker_image: "ghcr.io/intel/llvm/ubuntu2404_intel_drivers:alldeps" image_options: -u 1001 --device=/dev/dri -v /dev/dri/by-path:/dev/dri/by-path --privileged --cap-add SYS_ADMIN - name: L0_V2 runner: UR_L0 - docker_image: "ghcr.io/intel/llvm/ubuntu2404_intel_drivers:alldeps" image_options: -u 1001 --device=/dev/dri -v /dev/dri/by-path:/dev/dri/by-path --privileged --cap-add SYS_ADMIN - name: L0 runner: UR_L0 - docker_image: "ghcr.io/intel/llvm/ubuntu2404_intel_drivers:alldeps" - image_options: -u 1001 --device=/dev/dri -v /dev/dri/by-path:/dev/dri/by-path --privileged --cap-add SYS_ADMIN static: ON + image_options: -u 1001 --device=/dev/dri -v /dev/dri/by-path:/dev/dri/by-path --privileged --cap-add SYS_ADMIN - name: L0 runner: UR_L0 - docker_image: "ghcr.io/intel/llvm/ubuntu2404_intel_drivers:alldeps" - image_options: -u 1001 --device=/dev/dri -v /dev/dri/by-path:/dev/dri/by-path --privileged --cap-add SYS_ADMIN other_adapter: NATIVE_CPU + image_options: -u 1001 --device=/dev/dri -v /dev/dri/by-path:/dev/dri/by-path --privileged --cap-add SYS_ADMIN - name: HIP runner: UR_HIP - docker_image: "ghcr.io/intel/llvm/ubuntu2404_intel_drivers:alldeps" image_options: -u 1001 --device=/dev/dri --device=/dev/kfd --cap-add=SYS_ADMIN - name: CUDA runner: UR_CUDA - docker_image: "ghcr.io/intel/llvm/ubuntu2404_intel_drivers:alldeps" image_options: -u 1001 --privileged --cap-add SYS_ADMIN --gpus all - name: OPENCL runner: UR_OPENCL @@ -92,9 +83,9 @@ jobs: - name: OPENCL runner: UR_OPENCL platform: "OPENCL:Intel(R) OpenCL" + other_adapter: NATIVE_CPU docker_image: "ghcr.io/intel/llvm/ubuntu2204_build:latest" image_options: -u 1001 --device=/dev/dri --device=/dev/kfd --privileged --cap-add SYS_ADMIN - other_adapter: NATIVE_CPU - name: NATIVE_CPU runner: UR_NATIVE_CPU docker_image: "ghcr.io/intel/llvm/ubuntu2204_build:latest" @@ -107,45 +98,45 @@ jobs: static_adapter: ${{ matrix.static || 'OFF' }} platform: ${{ matrix.platform || '' }} other_adapter_name: ${{ matrix.other_adapter || '' }} - docker_image: ${{ matrix.docker_image }} + docker_image: ${{ matrix.docker_image || 'ghcr.io/intel/llvm/ubuntu2404_intel_drivers:alldeps'}} image_options: ${{ matrix.image_options || '' }} - # macos: - # name: MacOS build only - # needs: [detect_changes, source_checks] - # if: ${{ always() && !cancelled() && contains(needs.detect_changes.outputs.filters, 'ur') }} - # strategy: - # matrix: - # os: ['macos-13'] - # runs-on: ${{matrix.os}} + macos: + name: MacOS build only + needs: [detect_changes, source_checks] + if: ${{ always() && !cancelled() && contains(needs.detect_changes.outputs.filters, 'ur') }} + strategy: + matrix: + os: ['macos-13'] + runs-on: ${{matrix.os}} - # steps: - # - name: Checkout LLVM - # uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + steps: + - name: Checkout LLVM + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - # - uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.0.0 - # with: - # python-version: "3.10" + - uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.0.0 + with: + python-version: "3.10" - # - name: Install prerequisites - # working-directory: ${{github.workspace}}/unified-runtime - # run: | - # python3 -m pip install -r third_party/requirements.txt - # python3 -m pip install -r third_party/requirements_testing.txt + - name: Install prerequisites + working-directory: ${{github.workspace}}/unified-runtime + run: | + python3 -m pip install -r third_party/requirements.txt + python3 -m pip install -r third_party/requirements_testing.txt - # - name: Install hwloc - # run: brew install hwloc + - name: Install hwloc + run: brew install hwloc - # - name: Configure Unified Runtime project - # working-directory: ${{github.workspace}}/unified-runtime - # 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 + - name: Configure Unified Runtime project + working-directory: ${{github.workspace}}/unified-runtime + 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 - # - name: Build - # run: cmake --build ${{github.workspace}}/build -j $(sysctl -n hw.logicalcpu) \ No newline at end of file + - name: Build + run: cmake --build ${{github.workspace}}/build -j $(sysctl -n hw.logicalcpu)