From 8e26d6752ef822332c3e78ce84eb870ceeabfd89 Mon Sep 17 00:00:00 2001 From: rbanka1 Date: Tue, 18 Mar 2025 10:43:07 +0100 Subject: [PATCH 01/21] add UR docker TEST --- .../workflows/sycl-linux-precommit-aws.yml | 188 +++++++++--------- .github/workflows/sycl-linux-precommit.yml | 17 +- .github/workflows/sycl-windows-precommit.yml | 16 +- .github/workflows/ur-build-hw.yml | 23 ++- .github/workflows/ur-precommit.yml | 106 +++++----- 5 files changed, 191 insertions(+), 159 deletions(-) diff --git a/.github/workflows/sycl-linux-precommit-aws.yml b/.github/workflows/sycl-linux-precommit-aws.yml index e8bd368556aa..620fe675f30d 100644 --- a/.github/workflows/sycl-linux-precommit-aws.yml +++ b/.github/workflows/sycl-linux-precommit-aws.yml @@ -20,103 +20,107 @@ permissions: contents: read jobs: - create-check: - runs-on: [Linux, aux-tasks] - permissions: - checks: write - statuses: write + do-nothing: + runs-on: ubuntu-latest steps: - - uses: actions/github-script@v7 - with: - script: | - const sha = context.payload.workflow_run.head_sha - const run_id = '${{ github.run_id }}' - const this_run_url = 'https://github.com/' + context.repo.owner + '/' + context.repo.repo + '/actions/runs/' + run_id + - run: echo 'do nothing' + # create-check: + # runs-on: [Linux, aux-tasks] + # permissions: + # checks: write + # statuses: write + # steps: + # - uses: actions/github-script@v7 + # with: + # script: | + # const sha = context.payload.workflow_run.head_sha + # const run_id = '${{ github.run_id }}' + # const this_run_url = 'https://github.com/' + context.repo.owner + '/' + context.repo.repo + '/actions/runs/' + run_id - // Create commit status. - await github.request('POST /repos/{owner}/{repo}/statuses/{sha}', { - owner: context.repo.owner, - repo: context.repo.repo, - sha: sha, - state: 'pending', - target_url: this_run_url, - description: 'SYCL E2E on AWS CUDA', - context: 'SYCL E2E on AWS CUDA', - }) + # // Create commit status. + # await github.request('POST /repos/{owner}/{repo}/statuses/{sha}', { + # owner: context.repo.owner, + # repo: context.repo.repo, + # sha: sha, + # state: 'pending', + # target_url: this_run_url, + # description: 'SYCL E2E on AWS CUDA', + # context: 'SYCL E2E on AWS CUDA', + # }) - aws-start: - runs-on: ubuntu-latest - environment: aws - steps: - - uses: actions/checkout@v4 - with: - sparse-checkout: devops/actions/aws-ec2 - - run: npm install ./devops/actions/aws-ec2 - - uses: ./devops/actions/aws-ec2 - with: - mode: start - runs-on-list: '[{"runs-on":"aws_cuda-${{ github.event.workflow_run.id }}-${{ github.event.workflow_run.run_attempt }}","aws-ami":"ami-01cb0573cb039ab24","aws-type":["g5.2xlarge","g5.4xlarge"],"aws-disk":"/dev/sda1:64","aws-spot":"false"}]' - GH_PERSONAL_ACCESS_TOKEN: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }} - AWS_ACCESS_KEY: ${{ secrets.AWS_ACCESS_KEY }} - AWS_SECRET_KEY: ${{ secrets.AWS_SECRET_KEY }} + # aws-start: + # runs-on: ubuntu-latest + # environment: aws + # steps: + # - uses: actions/checkout@v4 + # with: + # sparse-checkout: devops/actions/aws-ec2 + # - run: npm install ./devops/actions/aws-ec2 + # - uses: ./devops/actions/aws-ec2 + # with: + # mode: start + # runs-on-list: '[{"runs-on":"aws_cuda-${{ github.event.workflow_run.id }}-${{ github.event.workflow_run.run_attempt }}","aws-ami":"ami-01cb0573cb039ab24","aws-type":["g5.2xlarge","g5.4xlarge"],"aws-disk":"/dev/sda1:64","aws-spot":"false"}]' + # GH_PERSONAL_ACCESS_TOKEN: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }} + # AWS_ACCESS_KEY: ${{ secrets.AWS_ACCESS_KEY }} + # AWS_SECRET_KEY: ${{ secrets.AWS_SECRET_KEY }} - e2e-cuda: - needs: [aws-start] - uses: ./.github/workflows/sycl-linux-run-tests.yml - with: - name: CUDA E2E - runner: '["aws_cuda-${{ github.event.workflow_run.id }}-${{ github.event.workflow_run.run_attempt }}"]' - image: ghcr.io/intel/llvm/ubuntu2204_build:latest - image_options: -u 1001 --gpus all --cap-add SYS_ADMIN --env NVIDIA_DISABLE_REQUIRE=1 - target_devices: cuda:gpu - # No idea why but that seems to work and be in sync with the main - # pre-commit workflow. - repo_ref: ${{ github.event.workflow_run.referenced_workflows[0].sha }} + # e2e-cuda: + # needs: [aws-start] + # uses: ./.github/workflows/sycl-linux-run-tests.yml + # with: + # name: CUDA E2E + # runner: '["aws_cuda-${{ github.event.workflow_run.id }}-${{ github.event.workflow_run.run_attempt }}"]' + # image: ghcr.io/intel/llvm/ubuntu2204_build:latest + # image_options: -u 1001 --gpus all --cap-add SYS_ADMIN --env NVIDIA_DISABLE_REQUIRE=1 + # target_devices: cuda:gpu + # # No idea why but that seems to work and be in sync with the main + # # pre-commit workflow. + # repo_ref: ${{ github.event.workflow_run.referenced_workflows[0].sha }} - sycl_toolchain_artifact: sycl_linux_default - sycl_toolchain_archive: llvm_sycl.tar.zst - sycl_toolchain_decompress_command: zstd + # sycl_toolchain_artifact: sycl_linux_default + # sycl_toolchain_archive: llvm_sycl.tar.zst + # sycl_toolchain_decompress_command: zstd - update-check: - needs: [create-check, e2e-cuda] - if: always() - runs-on: [Linux, aux-tasks] - permissions: - checks: write - statuses: write - steps: - - uses: actions/github-script@v7 - with: - script: | - const sha = context.payload.workflow_run.head_sha - const run_id = '${{ github.run_id }}' - const this_run_url = 'https://github.com/' + context.repo.owner + '/' + context.repo.repo + '/actions/runs/' + run_id + # update-check: + # needs: [create-check, e2e-cuda] + # if: always() + # runs-on: [Linux, aux-tasks] + # permissions: + # checks: write + # statuses: write + # steps: + # - uses: actions/github-script@v7 + # with: + # script: | + # const sha = context.payload.workflow_run.head_sha + # const run_id = '${{ github.run_id }}' + # const this_run_url = 'https://github.com/' + context.repo.owner + '/' + context.repo.repo + '/actions/runs/' + run_id - // Update commit status. - await github.request('POST /repos/{owner}/{repo}/statuses/{sha}', { - owner: context.repo.owner, - repo: context.repo.repo, - sha: sha, - state: '${{ needs.e2e-cuda.result }}', - target_url: this_run_url, - description: 'SYCL E2E on AWS CUDA', - context: 'SYCL E2E on AWS CUDA', - }) + # // Update commit status. + # await github.request('POST /repos/{owner}/{repo}/statuses/{sha}', { + # owner: context.repo.owner, + # repo: context.repo.repo, + # sha: sha, + # state: '${{ needs.e2e-cuda.result }}', + # target_url: this_run_url, + # description: 'SYCL E2E on AWS CUDA', + # context: 'SYCL E2E on AWS CUDA', + # }) - aws-stop: - needs: [aws-start, e2e-cuda] - if: always() - runs-on: ubuntu-latest - environment: aws - steps: - - uses: actions/checkout@v4 - with: - sparse-checkout: devops/actions/aws-ec2 - - run: npm install ./devops/actions/aws-ec2 - - uses: ./devops/actions/aws-ec2 - with: - mode: stop - runs-on-list: '[{"runs-on":"aws_cuda-${{ github.event.workflow_run.id }}-${{ github.event.workflow_run.run_attempt }}","aws-ami":"ami-01cb0573cb039ab24","aws-type":["g5.2xlarge","g5.4xlarge"],"aws-disk":"/dev/sda1:64","aws-spot":"false"}]' - GH_PERSONAL_ACCESS_TOKEN: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }} - AWS_ACCESS_KEY: ${{ secrets.AWS_ACCESS_KEY }} - AWS_SECRET_KEY: ${{ secrets.AWS_SECRET_KEY }} + # aws-stop: + # needs: [aws-start, e2e-cuda] + # if: always() + # runs-on: ubuntu-latest + # environment: aws + # steps: + # - uses: actions/checkout@v4 + # with: + # sparse-checkout: devops/actions/aws-ec2 + # - run: npm install ./devops/actions/aws-ec2 + # - uses: ./devops/actions/aws-ec2 + # with: + # mode: stop + # runs-on-list: '[{"runs-on":"aws_cuda-${{ github.event.workflow_run.id }}-${{ github.event.workflow_run.run_attempt }}","aws-ami":"ami-01cb0573cb039ab24","aws-type":["g5.2xlarge","g5.4xlarge"],"aws-disk":"/dev/sda1:64","aws-spot":"false"}]' + # GH_PERSONAL_ACCESS_TOKEN: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }} + # AWS_ACCESS_KEY: ${{ secrets.AWS_ACCESS_KEY }} + # AWS_SECRET_KEY: ${{ secrets.AWS_SECRET_KEY }} diff --git a/.github/workflows/sycl-linux-precommit.yml b/.github/workflows/sycl-linux-precommit.yml index e475f0196f48..0479efbffb95 100644 --- a/.github/workflows/sycl-linux-precommit.yml +++ b/.github/workflows/sycl-linux-precommit.yml @@ -37,7 +37,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 }} @@ -53,7 +54,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: @@ -146,11 +148,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 1095eeab957f..810c5271ff7b 100644 --- a/.github/workflows/sycl-windows-precommit.yml +++ b/.github/workflows/sycl-windows-precommit.yml @@ -36,9 +36,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 }} @@ -46,10 +47,11 @@ jobs: 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 strategy: fail-fast: false matrix: diff --git a/.github/workflows/ur-build-hw.yml b/.github/workflows/ur-build-hw.yml index a0f94ab10f53..0691f347bc8d 100644 --- a/.github/workflows/ur-build-hw.yml +++ b/.github/workflows/ur-build-hw.yml @@ -26,6 +26,10 @@ on: required: false type: string default: OFF + docker_image: + required: true + type: string + default: "" workflow_dispatch: inputs: adapter_name: @@ -51,6 +55,10 @@ on: required: false type: string default: OFF + docker_image: + required: true + type: string + default: "" permissions: contents: read @@ -66,7 +74,7 @@ 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 +91,9 @@ jobs: compiler: [{c: gcc, cxx: g++}] runs-on: ${{inputs.runner_name}} + container: + image: ${{ inputs.docker_image }} + options: -u 1001 --device=/dev/dri -v /dev/dri/by-path:/dev/dri/by-path --privileged --cap-add SYS_ADMIN steps: # TODO: @@ -140,6 +151,14 @@ jobs: # This is to check that install command does not fail run: cmake --install ${{github.workspace}}/build + - name: Check if GPU is avaliable + run: | + ls -la /dev/dri/ + id + dpkg -l | grep level-zero + ldconfig -p | grep libze + ls -la /dev/dri/ + - name: Test adapter specific env: ZE_ENABLE_LOADER_DEBUG_TRACE: 1 @@ -155,5 +174,5 @@ jobs: 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 - name: Get information about platform - if: ${{ always() }} + # if: ${{ always() }} run: ${{github.workspace}}/unified-runtime/.github/scripts/get_system_info.sh diff --git a/.github/workflows/ur-precommit.yml b/.github/workflows/ur-precommit.yml index 32fedc832c89..35e3a52c57ce 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. @@ -36,34 +39,34 @@ concurrency: permissions: read-all jobs: - detect_changes: - name: Detect Changes - uses: ./.github/workflows/sycl-detect-changes.yml + # detect_changes: + # 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') }} 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}, + {name: L0, runner: UR_L0, docker_image: "ghcr.io/intel/llvm/ubuntu2204_build:latest"}, + # {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}, ] uses: ./.github/workflows/ur-build-hw.yml with: @@ -73,42 +76,43 @@ jobs: static_adapter: ${{ matrix.adapter.static || 'OFF' }} platform: ${{ matrix.adapter.platform || '' }} other_adapter_name: ${{ matrix.adapter.other_adapter || '' }} + docker_image: ${{ matrix.adapter.docker_image }} - 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@6ca8e8598faa206f7140a65ba31b899bebe16f58 # v5.0.0 - with: - python-version: 3.9 + # - uses: actions/setup-python@6ca8e8598faa206f7140a65ba31b899bebe16f58 # v5.0.0 + # with: + # python-version: 3.9 - - name: Install prerequisites - working-directory: ${{github.workspace}}/unified-runtime - run: python3 -m pip install -r third_party/requirements.txt + # - name: Install prerequisites + # working-directory: ${{github.workspace}}/unified-runtime + # run: python3 -m pip install -r third_party/requirements.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 - -DUMF_ENABLE_POOL_TRACKING=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 + # -DUMF_ENABLE_POOL_TRACKING=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) From e59d6e99d1dddfcf5a8309345b5d651035647125 Mon Sep 17 00:00:00 2001 From: rbanka1 Date: Wed, 19 Mar 2025 10:32:41 +0100 Subject: [PATCH 02/21] change permissions --- .github/workflows/ur-build-hw.yml | 65 ++++++++++++++++++++----------- 1 file changed, 42 insertions(+), 23 deletions(-) diff --git a/.github/workflows/ur-build-hw.yml b/.github/workflows/ur-build-hw.yml index 0691f347bc8d..7358341dc842 100644 --- a/.github/workflows/ur-build-hw.yml +++ b/.github/workflows/ur-build-hw.yml @@ -60,8 +60,7 @@ on: type: string default: "" -permissions: - contents: read +permissions: read-all env: UR_LOG_CUDA: "level:error;flush:error" @@ -69,6 +68,7 @@ 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: @@ -105,27 +105,32 @@ jobs: - name: Checkout LLVM uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + - name: Set working directory as environment variable + run: echo "CURRENT_DIR=$(pwd)" >> $GITHUB_ENV + # Latest distros do not allow global pip installation - name: Install UR python dependencies in venv - working-directory: ${{github.workspace}}/unified-runtime + working-directory: ${{ env.CURRENT_DIR }}/unified-runtime run: | + sudo apt update + sudo apt install -y python3-venv python3 -m venv .venv . .venv/bin/activate - echo "$PATH" >> $GITHUB_PATH + echo "${PWD}/.venv/bin" >> $GITHUB_PATH 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-12-12/sycl_linux.tar.gz - mkdir dpcpp_compiler - tar -xvf ${{github.workspace}}/dpcpp_compiler.tar.gz -C dpcpp_compiler + wget -O ${{ env.CURRENT_DIR }}/dpcpp_compiler.tar.gz https://github.com/intel/llvm/releases/download/nightly-2024-12-12/sycl_linux.tar.gz + mkdir -p ${{ env.CURRENT_DIR }}/dpcpp_compiler + tar -xvf ${{ env.CURRENT_DIR }}/dpcpp_compiler.tar.gz -C dpcpp_compiler - name: Configure Unified Runtime project - working-directory: ${{github.workspace}}/unified-runtime + working-directory: ${{ env.CURRENT_DIR }}/unified-runtime # ">" is used to avoid adding "\" at the end of each line; this command is quite long run: > cmake - -B${{github.workspace}}/build + -B${{ env.CURRENT_DIR }}/build -DCMAKE_C_COMPILER=${{matrix.compiler.c}} -DCMAKE_CXX_COMPILER=${{matrix.compiler.cxx}} -DCMAKE_BUILD_TYPE=${{matrix.build_type}} @@ -137,33 +142,47 @@ 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=${{ env.CURRENT_DIR }}/dpcpp_compiler/bin/clang++ + -DUR_SYCL_LIBRARY_DIR=${{ env.CURRENT_DIR }}/dpcpp_compiler/lib + -DCMAKE_INSTALL_PREFIX=${{ env.CURRENT_DIR }}/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 ${{ env.CURRENT_DIR }}/build -j $(nproc) - name: Install # This is to check that install command does not fail - run: cmake --install ${{github.workspace}}/build + run: cmake --install ${{ env.CURRENT_DIR }}/build - - name: Check if GPU is avaliable + - name: Install Intel Level Zero GPU run: | - ls -la /dev/dri/ - id - dpkg -l | grep level-zero - ldconfig -p | grep libze - ls -la /dev/dri/ + sudo apt-get update + sudo apt-get install -y gnupg2 gpg-agent curl + curl -fsSL https://repositories.intel.com/gpu/intel-graphics.key | sudo gpg --dearmor -o /usr/share/keyrings/intel-graphics.gpg + echo "deb [arch=amd64 signed-by=/usr/share/keyrings/intel-graphics.gpg] https://repositories.intel.com/gpu/ubuntu jammy/lts/2350 unified" | sudo tee /etc/apt/sources.list.d/intel-gpu-jammy.list + sudo apt update + sudo apt install -y \ + intel-opencl-icd intel-level-zero-gpu level-zero level-zero-dev \ + intel-media-va-driver-non-free libmfx1 libmfxgen1 libvpl2 \ + libegl-mesa0 libegl1-mesa 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 + + # - name: Check if GPU is avaliable + # run: | + # ls -la /dev/dri/ + # id + # dpkg -l | grep level-zero + # ldconfig -p | grep libze + # ls -la /dev/dri/ - name: Test adapter specific env: ZE_ENABLE_LOADER_DEBUG_TRACE: 1 ZE_DEBUG: 1 - run: ctest -C ${{matrix.build_type}} --test-dir ${{github.workspace}}/build --output-on-failure -L "adapter-specific" -E "memcheck" --timeout 600 -VV + run: ctest -C ${{matrix.build_type}} --test-dir ${{ env.CURRENT_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 == '' }} @@ -171,8 +190,8 @@ jobs: 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 ${{github.workspace}}/build --output-on-failure -L "conformance" --timeout 600 -VV + run: env UR_CTS_ADAPTER_PLATFORM="${{matrix.adapter.platform}}" ctest -C ${{matrix.build_type}} --test-dir ${{ env.CURRENT_DIR }}/build --output-on-failure -L "conformance" --timeout 600 -VV - name: Get information about platform # if: ${{ always() }} - run: ${{github.workspace}}/unified-runtime/.github/scripts/get_system_info.sh + run: ${{ env.CURRENT_DIR }}/unified-runtime/.github/scripts/get_system_info.sh From 19024282e3bf6ee1f0063cc2beb34ca6fdab5225 Mon Sep 17 00:00:00 2001 From: rbanka1 Date: Mon, 24 Mar 2025 10:00:54 +0100 Subject: [PATCH 03/21] test-adapter-level_zero debug --- .github/workflows/ur-build-hw.yml | 79 +++++++++++++++++++++++++------ 1 file changed, 64 insertions(+), 15 deletions(-) diff --git a/.github/workflows/ur-build-hw.yml b/.github/workflows/ur-build-hw.yml index 7358341dc842..7557fc67f5de 100644 --- a/.github/workflows/ur-build-hw.yml +++ b/.github/workflows/ur-build-hw.yml @@ -105,6 +105,10 @@ jobs: - name: Checkout LLVM uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + - name: Get information about platform + if: ${{ always() }} + run: ${{ env.CURRENT_DIR }}/unified-runtime/.github/scripts/get_system_info.sh + - name: Set working directory as environment variable run: echo "CURRENT_DIR=$(pwd)" >> $GITHUB_ENV @@ -125,6 +129,54 @@ jobs: mkdir -p ${{ env.CURRENT_DIR }}/dpcpp_compiler tar -xvf ${{ env.CURRENT_DIR }}/dpcpp_compiler.tar.gz -C dpcpp_compiler + - name: Install Intel Level Zero loader + working-directory: ${{ env.CURRENT_DIR }} + run: | + curl -L https://github.com/oneapi-src/level-zero/archive/refs/heads/master.tar.gz -o level-zero.tar.gz + tar -xzf level-zero.tar.gz + cd level-zero-master + + mkdir build && cd build + cmake .. -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=usr/local/install + cmake --build . --target package + cmake --build . --target install + + - name: Install Intel Level Zero GPU + run: | + sudo apt-get update + sudo apt-get install -y gnupg2 gpg-agent curl + curl -fsSL https://repositories.intel.com/gpu/intel-graphics.key | sudo gpg --dearmor -o /usr/share/keyrings/intel-graphics.gpg + echo "deb [arch=amd64 signed-by=/usr/share/keyrings/intel-graphics.gpg] https://repositories.intel.com/gpu/ubuntu jammy/lts/2350 unified" | sudo tee /etc/apt/sources.list.d/intel-gpu-jammy.list + sudo apt update + sudo apt install -y \ + intel-opencl-icd intel-level-zero-gpu \ + intel-media-va-driver-non-free libmfx1 libmfxgen1 libvpl2 \ + libegl-mesa0 libegl1-mesa 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 + + - name: Add L0 to PATH + run: | + export PATH=/__w/llvm/llvm/level-zero-master/build/usr/local/install/bin:$PATH + export LD_LIBRARY_PATH=/__w/llvm/llvm/level-zero-master/build/usr/local/install/lib:$LD_LIBRARY_PATH + export CPATH=/__w/llvm/llvm/level-zero-master/build/usr/local/install/include:$CPATH + export LIBRARY_PATH=/__w/llvm/llvm/level-zero-master/build/usr/local/install/lib:$LIBRARY_PATH + + echo 'export PATH=/__w/llvm/llvm/level-zero-master/build/usr/local/install/bin:$PATH' >> ~/.bashrc + echo 'export LD_LIBRARY_PATH=/__w/llvm/llvm/level-zero-master/build/usr/local/install/lib:$LD_LIBRARY_PATH' >> ~/.bashrc + echo 'export CPATH=/__w/llvm/llvm/level-zero-master/build/usr/local/install/include:$CPATH' >> ~/.bashrc + echo 'export LIBRARY_PATH=/__w/llvm/llvm/level-zero-master/build/usr/local/install/lib:$LIBRARY_PATH' >> ~/.bashrc + . ~/.bashrc + shell: bash + + - name: Check PATH + run: | + echo $PATH + echo $LD_LIBRARY_PATH + echo $CPATH + echo $LIBRARY_PATH + ls -l /__w/llvm/llvm/level-zero-master/build/usr/local/install/lib + - name: Configure Unified Runtime project working-directory: ${{ env.CURRENT_DIR }}/unified-runtime # ">" is used to avoid adding "\" at the end of each line; this command is quite long @@ -156,19 +208,15 @@ jobs: # This is to check that install command does not fail run: cmake --install ${{ env.CURRENT_DIR }}/build - - name: Install Intel Level Zero GPU - run: | - sudo apt-get update - sudo apt-get install -y gnupg2 gpg-agent curl - curl -fsSL https://repositories.intel.com/gpu/intel-graphics.key | sudo gpg --dearmor -o /usr/share/keyrings/intel-graphics.gpg - echo "deb [arch=amd64 signed-by=/usr/share/keyrings/intel-graphics.gpg] https://repositories.intel.com/gpu/ubuntu jammy/lts/2350 unified" | sudo tee /etc/apt/sources.list.d/intel-gpu-jammy.list - sudo apt update - sudo apt install -y \ - intel-opencl-icd intel-level-zero-gpu level-zero level-zero-dev \ - intel-media-va-driver-non-free libmfx1 libmfxgen1 libvpl2 \ - libegl-mesa0 libegl1-mesa 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 + # - name: Run ldd on libur_* libraries + # run: | + # cd ${{ env.CURRENT_DIR }} + # pwd + # ls + # cd build + # pwd + # ls + # ldd lib/libur_* # - name: Check if GPU is avaliable # run: | @@ -182,7 +230,8 @@ jobs: env: ZE_ENABLE_LOADER_DEBUG_TRACE: 1 ZE_DEBUG: 1 - run: ctest -C ${{matrix.build_type}} --test-dir ${{ env.CURRENT_DIR }}/build --output-on-failure -L "adapter-specific" -E "memcheck" --timeout 600 -VV + # run: ctest -C ${{matrix.build_type}} --test-dir ${{ env.CURRENT_DIR }}/build --output-on-failure -L "adapter-specific" -E "memcheck" --timeout 600 -VV + run: ctest -C ${{ matrix.build_type }} --test-dir ${{ env.CURRENT_DIR }}/build --output-on-failure -L "adapter-specific" -R "test-adapter-level_zero$" --timeout 600 -VV # Don't run adapter specific tests when building multiple adapters if: ${{ matrix.adapter.other_name == '' }} @@ -193,5 +242,5 @@ jobs: run: env UR_CTS_ADAPTER_PLATFORM="${{matrix.adapter.platform}}" ctest -C ${{matrix.build_type}} --test-dir ${{ env.CURRENT_DIR }}/build --output-on-failure -L "conformance" --timeout 600 -VV - name: Get information about platform - # if: ${{ always() }} + if: ${{ always() }} run: ${{ env.CURRENT_DIR }}/unified-runtime/.github/scripts/get_system_info.sh From c1515e8e33a01196e19b14dab02a888799133e3f Mon Sep 17 00:00:00 2001 From: rbanka1 Date: Mon, 24 Mar 2025 10:50:36 +0100 Subject: [PATCH 04/21] working L0 test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Ɓukasz Stolarczuk --- .../workflows/sycl-linux-precommit-aws.yml | 28 ++++- .github/workflows/ur-build-hw.yml | 119 ++++++------------ .github/workflows/ur-precommit.yml | 8 +- 3 files changed, 69 insertions(+), 86 deletions(-) diff --git a/.github/workflows/sycl-linux-precommit-aws.yml b/.github/workflows/sycl-linux-precommit-aws.yml index 620fe675f30d..85c26729372b 100644 --- a/.github/workflows/sycl-linux-precommit-aws.yml +++ b/.github/workflows/sycl-linux-precommit-aws.yml @@ -20,7 +20,33 @@ permissions: contents: read jobs: - do-nothing: + create-check: + if: false + runs-on: [Linux, aux-tasks] + permissions: + checks: write + statuses: write + steps: + - uses: actions/github-script@v7 + with: + script: | + const sha = context.payload.workflow_run.head_sha + const run_id = '${{ github.run_id }}' + const this_run_url = 'https://github.com/' + context.repo.owner + '/' + context.repo.repo + '/actions/runs/' + run_id + + // Create commit status. + await github.request('POST /repos/{owner}/{repo}/statuses/{sha}', { + owner: context.repo.owner, + repo: context.repo.repo, + sha: sha, + state: 'pending', + target_url: this_run_url, + description: 'SYCL E2E on AWS CUDA', + context: 'SYCL E2E on AWS CUDA', + }) + + aws-start: + if: false runs-on: ubuntu-latest steps: - run: echo 'do nothing' diff --git a/.github/workflows/ur-build-hw.yml b/.github/workflows/ur-build-hw.yml index 7557fc67f5de..e4d9c8f469d6 100644 --- a/.github/workflows/ur-build-hw.yml +++ b/.github/workflows/ur-build-hw.yml @@ -93,6 +93,7 @@ jobs: runs-on: ${{inputs.runner_name}} container: image: ${{ inputs.docker_image }} + # TODO: options may differ for other GPU cards options: -u 1001 --device=/dev/dri -v /dev/dri/by-path:/dev/dri/by-path --privileged --cap-add SYS_ADMIN steps: @@ -105,16 +106,17 @@ jobs: - name: Checkout LLVM uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - name: Get information about platform - if: ${{ always() }} - run: ${{ env.CURRENT_DIR }}/unified-runtime/.github/scripts/get_system_info.sh - + # TODO: how other workflows (using dockers) deal with the path change? + # also, note: I don't think it's needed anywhere now - I guess we can only use the relative paths...? - name: Set working directory as environment variable - run: echo "CURRENT_DIR=$(pwd)" >> $GITHUB_ENV + run: | + pwd + echo "${{github.workspace}}" + # TODO: move installation of python3-venv to docker # Latest distros do not allow global pip installation - name: Install UR python dependencies in venv - working-directory: ${{ env.CURRENT_DIR }}/unified-runtime + working-directory: ./unified-runtime run: | sudo apt update sudo apt install -y python3-venv @@ -125,64 +127,36 @@ jobs: - name: Download DPC++ run: | - wget -O ${{ env.CURRENT_DIR }}/dpcpp_compiler.tar.gz https://github.com/intel/llvm/releases/download/nightly-2024-12-12/sycl_linux.tar.gz - mkdir -p ${{ env.CURRENT_DIR }}/dpcpp_compiler - tar -xvf ${{ env.CURRENT_DIR }}/dpcpp_compiler.tar.gz -C dpcpp_compiler - - - name: Install Intel Level Zero loader - working-directory: ${{ env.CURRENT_DIR }} - run: | - curl -L https://github.com/oneapi-src/level-zero/archive/refs/heads/master.tar.gz -o level-zero.tar.gz - tar -xzf level-zero.tar.gz - cd level-zero-master - - mkdir build && cd build - cmake .. -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=usr/local/install - cmake --build . --target package - cmake --build . --target install + 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 + # TODO_1: move this installation to docker? Perhaps there's other docker that already has these packages? we aren't the only ones using L0 ;-) + # TODO_2: if needed here, only install it for level zero jobs; and install required staff for other adapters under other 'if' + # + # it seems there's image for intel drivers (L0): + # ghcr.io/intel/llvm/ubuntu2404_intel_drivers:alldeps + # and for other adapters (HIP, CUDA): + # ghcr.io/intel/llvm/ubuntu2204_build:latest + # or + # ghcr.io/intel/llvm/ubuntu2404_build:latest + # not sure on OpenCL and NativeCPU - to be checked. - name: Install Intel Level Zero GPU run: | + wget -qO - https://repositories.intel.com/gpu/intel-graphics.key | \ + sudo gpg --yes --dearmor --output /usr/share/keyrings/intel-graphics.gpg + echo "deb [arch=amd64,i386 signed-by=/usr/share/keyrings/intel-graphics.gpg] https://repositories.intel.com/gpu/ubuntu jammy unified" | \ + sudo tee /etc/apt/sources.list.d/intel-gpu-jammy.list sudo apt-get update - sudo apt-get install -y gnupg2 gpg-agent curl - curl -fsSL https://repositories.intel.com/gpu/intel-graphics.key | sudo gpg --dearmor -o /usr/share/keyrings/intel-graphics.gpg - echo "deb [arch=amd64 signed-by=/usr/share/keyrings/intel-graphics.gpg] https://repositories.intel.com/gpu/ubuntu jammy/lts/2350 unified" | sudo tee /etc/apt/sources.list.d/intel-gpu-jammy.list - sudo apt update - sudo apt install -y \ - intel-opencl-icd intel-level-zero-gpu \ - intel-media-va-driver-non-free libmfx1 libmfxgen1 libvpl2 \ - libegl-mesa0 libegl1-mesa 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 - - - name: Add L0 to PATH - run: | - export PATH=/__w/llvm/llvm/level-zero-master/build/usr/local/install/bin:$PATH - export LD_LIBRARY_PATH=/__w/llvm/llvm/level-zero-master/build/usr/local/install/lib:$LD_LIBRARY_PATH - export CPATH=/__w/llvm/llvm/level-zero-master/build/usr/local/install/include:$CPATH - export LIBRARY_PATH=/__w/llvm/llvm/level-zero-master/build/usr/local/install/lib:$LIBRARY_PATH - - echo 'export PATH=/__w/llvm/llvm/level-zero-master/build/usr/local/install/bin:$PATH' >> ~/.bashrc - echo 'export LD_LIBRARY_PATH=/__w/llvm/llvm/level-zero-master/build/usr/local/install/lib:$LD_LIBRARY_PATH' >> ~/.bashrc - echo 'export CPATH=/__w/llvm/llvm/level-zero-master/build/usr/local/install/include:$CPATH' >> ~/.bashrc - echo 'export LIBRARY_PATH=/__w/llvm/llvm/level-zero-master/build/usr/local/install/lib:$LIBRARY_PATH' >> ~/.bashrc - . ~/.bashrc - shell: bash - - - name: Check PATH - run: | - echo $PATH - echo $LD_LIBRARY_PATH - echo $CPATH - echo $LIBRARY_PATH - ls -l /__w/llvm/llvm/level-zero-master/build/usr/local/install/lib + sudo apt-get install -y libze-intel-gpu1 libze1 libze-dev intel-opencl-icd + # libstdc++-12-dev - name: Configure Unified Runtime project - working-directory: ${{ env.CURRENT_DIR }}/unified-runtime # ">" is used to avoid adding "\" at the end of each line; this command is quite long run: > cmake - -B${{ env.CURRENT_DIR }}/build + -S unified-runtime + -B build -DCMAKE_C_COMPILER=${{matrix.compiler.c}} -DCMAKE_CXX_COMPILER=${{matrix.compiler.cxx}} -DCMAKE_BUILD_TYPE=${{matrix.build_type}} @@ -194,44 +168,25 @@ 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=${{ env.CURRENT_DIR }}/dpcpp_compiler/bin/clang++ - -DUR_SYCL_LIBRARY_DIR=${{ env.CURRENT_DIR }}/dpcpp_compiler/lib - -DCMAKE_INSTALL_PREFIX=${{ env.CURRENT_DIR }}/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 ${{ env.CURRENT_DIR }}/build -j $(nproc) + run: cmake --build build -j $(nproc) - name: Install # This is to check that install command does not fail - run: cmake --install ${{ env.CURRENT_DIR }}/build - - # - name: Run ldd on libur_* libraries - # run: | - # cd ${{ env.CURRENT_DIR }} - # pwd - # ls - # cd build - # pwd - # ls - # ldd lib/libur_* - - # - name: Check if GPU is avaliable - # run: | - # ls -la /dev/dri/ - # id - # dpkg -l | grep level-zero - # ldconfig -p | grep libze - # ls -la /dev/dri/ + run: cmake --install build - name: Test adapter specific env: ZE_ENABLE_LOADER_DEBUG_TRACE: 1 ZE_DEBUG: 1 - # run: ctest -C ${{matrix.build_type}} --test-dir ${{ env.CURRENT_DIR }}/build --output-on-failure -L "adapter-specific" -E "memcheck" --timeout 600 -VV - run: ctest -C ${{ matrix.build_type }} --test-dir ${{ env.CURRENT_DIR }}/build --output-on-failure -L "adapter-specific" -R "test-adapter-level_zero$" --timeout 600 -VV + 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 == '' }} @@ -239,8 +194,8 @@ jobs: 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 ${{ env.CURRENT_DIR }}/build --output-on-failure -L "conformance" --timeout 600 -VV + 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: ${{ env.CURRENT_DIR }}/unified-runtime/.github/scripts/get_system_info.sh + run: ./unified-runtime/.github/scripts/get_system_info.sh diff --git a/.github/workflows/ur-precommit.yml b/.github/workflows/ur-precommit.yml index 35e3a52c57ce..99c89fb60990 100644 --- a/.github/workflows/ur-precommit.yml +++ b/.github/workflows/ur-precommit.yml @@ -39,9 +39,9 @@ concurrency: permissions: read-all jobs: - # detect_changes: - # name: Detect Changes - # uses: ./.github/workflows/sycl-detect-changes.yml + detect_changes: + name: Detect Changes + uses: ./.github/workflows/sycl-detect-changes.yml # source_checks: # name: Source Checks @@ -53,6 +53,8 @@ jobs: 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') }} strategy: matrix: # Extra native CPU jobs are here to force the loader to be used. From 06f70be77d652f74962c361ec99f8f9abd70a2fe Mon Sep 17 00:00:00 2001 From: rbanka1 Date: Mon, 24 Mar 2025 12:44:50 +0100 Subject: [PATCH 05/21] changed syntax --- .github/workflows/ur-build-hw.yml | 11 +++++++- .github/workflows/ur-precommit.yml | 42 +++++++++++++++++------------- 2 files changed, 34 insertions(+), 19 deletions(-) diff --git a/.github/workflows/ur-build-hw.yml b/.github/workflows/ur-build-hw.yml index e4d9c8f469d6..980ccccc79bc 100644 --- a/.github/workflows/ur-build-hw.yml +++ b/.github/workflows/ur-build-hw.yml @@ -30,6 +30,10 @@ on: required: true type: string default: "" + image_options: + required: true + type: string + default: "" workflow_dispatch: inputs: adapter_name: @@ -59,6 +63,10 @@ on: required: true type: string default: "" + image_options: + required: true + type: string + default: "" permissions: read-all @@ -94,7 +102,8 @@ jobs: container: image: ${{ inputs.docker_image }} # TODO: options may differ for other GPU cards - options: -u 1001 --device=/dev/dri -v /dev/dri/by-path:/dev/dri/by-path --privileged --cap-add SYS_ADMIN + options: ${{ inputs.image_options }} + # options: -u 1001 --device=/dev/dri -v /dev/dri/by-path:/dev/dri/by-path --privileged --cap-add SYS_ADMIN steps: # TODO: diff --git a/.github/workflows/ur-precommit.yml b/.github/workflows/ur-precommit.yml index 99c89fb60990..1d4347e7d6e7 100644 --- a/.github/workflows/ur-precommit.yml +++ b/.github/workflows/ur-precommit.yml @@ -57,28 +57,34 @@ jobs: # if: ${{ always() && !cancelled() && contains(needs.detect_changes.outputs.filters, 'ur') }} strategy: matrix: + include: + - name: L0 + runner: UR_L0 + docker_image: "ghcr.io/intel/llvm/ubuntu2204_build:latest" + image_options: -u 1001 --device=/dev/dri -v /dev/dri/by-path:/dev/dri/by-path --privileged --cap-add SYS_ADMIN # 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, docker_image: "ghcr.io/intel/llvm/ubuntu2204_build:latest"}, - # {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}, - ] + # adapter: [ + # {name: L0, runner: UR_L0, docker_image: "ghcr.io/intel/llvm/ubuntu2204_build:latest"}, + # # {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}, + # ] 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 || '' }} - docker_image: ${{ matrix.adapter.docker_image }} + 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 From 5293e3b2f1ce6754578757c78ffd1242534e8891 Mon Sep 17 00:00:00 2001 From: rbanka1 Date: Mon, 24 Mar 2025 18:01:52 +0100 Subject: [PATCH 06/21] new test . --- .github/workflows/ur-build-hw.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ur-build-hw.yml b/.github/workflows/ur-build-hw.yml index 980ccccc79bc..ac007ef4c08e 100644 --- a/.github/workflows/ur-build-hw.yml +++ b/.github/workflows/ur-build-hw.yml @@ -151,6 +151,7 @@ jobs: # ghcr.io/intel/llvm/ubuntu2404_build:latest # not sure on OpenCL and NativeCPU - to be checked. - name: Install Intel Level Zero GPU + if: ${{inputs.adapter_name}} == "L0" run: | wget -qO - https://repositories.intel.com/gpu/intel-graphics.key | \ sudo gpg --yes --dearmor --output /usr/share/keyrings/intel-graphics.gpg From d39afb4a23a63665ede6299dd60551697d5720d7 Mon Sep 17 00:00:00 2001 From: rbanka1 Date: Mon, 24 Mar 2025 18:10:12 +0100 Subject: [PATCH 07/21] new test --- .github/workflows/ur-build-hw.yml | 2 +- .github/workflows/ur-precommit.yml | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ur-build-hw.yml b/.github/workflows/ur-build-hw.yml index ac007ef4c08e..64f9c83d7f1b 100644 --- a/.github/workflows/ur-build-hw.yml +++ b/.github/workflows/ur-build-hw.yml @@ -151,7 +151,7 @@ jobs: # ghcr.io/intel/llvm/ubuntu2404_build:latest # not sure on OpenCL and NativeCPU - to be checked. - name: Install Intel Level Zero GPU - if: ${{inputs.adapter_name}} == "L0" + if: ${{inputs.adapter_name}} == "L0" || ${{inputs.adapter_name}} == "L0_V2" run: | wget -qO - https://repositories.intel.com/gpu/intel-graphics.key | \ sudo gpg --yes --dearmor --output /usr/share/keyrings/intel-graphics.gpg diff --git a/.github/workflows/ur-precommit.yml b/.github/workflows/ur-precommit.yml index 1d4347e7d6e7..0bb4a0dc2f81 100644 --- a/.github/workflows/ur-precommit.yml +++ b/.github/workflows/ur-precommit.yml @@ -62,6 +62,20 @@ jobs: runner: UR_L0 docker_image: "ghcr.io/intel/llvm/ubuntu2204_build:latest" 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/ubuntu2204_build:latest" + 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/ubuntu2204_build:latest" + 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/ubuntu2204_build:latest" + 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 # 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: [ From 477da776c5bbabce14d1dfb1cf7036b4d2852980 Mon Sep 17 00:00:00 2001 From: rbanka1 Date: Wed, 26 Mar 2025 11:00:11 +0100 Subject: [PATCH 08/21] all gpus --- .github/workflows/ur-build-hw.yml | 13 ++++++++-- .github/workflows/ur-precommit.yml | 40 ++++++++++++++++++++++++------ 2 files changed, 43 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ur-build-hw.yml b/.github/workflows/ur-build-hw.yml index 64f9c83d7f1b..2db593b48aa0 100644 --- a/.github/workflows/ur-build-hw.yml +++ b/.github/workflows/ur-build-hw.yml @@ -144,14 +144,14 @@ jobs: # TODO_2: if needed here, only install it for level zero jobs; and install required staff for other adapters under other 'if' # # it seems there's image for intel drivers (L0): - # ghcr.io/intel/llvm/ubuntu2404_intel_drivers:alldeps + # ghcr.io/intel/llvm/ubuntu2404_intel_drivers:alldeps JESLI ZADZIALA TO BEZ INSTAL # and for other adapters (HIP, CUDA): # ghcr.io/intel/llvm/ubuntu2204_build:latest # or # ghcr.io/intel/llvm/ubuntu2404_build:latest # not sure on OpenCL and NativeCPU - to be checked. - name: Install Intel Level Zero GPU - if: ${{inputs.adapter_name}} == "L0" || ${{inputs.adapter_name}} == "L0_V2" + # if: ${{ inputs.adapter_name == 'L0' || inputs.adapter_name == 'L0_V2' }} run: | wget -qO - https://repositories.intel.com/gpu/intel-graphics.key | \ sudo gpg --yes --dearmor --output /usr/share/keyrings/intel-graphics.gpg @@ -161,6 +161,15 @@ jobs: sudo apt-get install -y libze-intel-gpu1 libze1 libze-dev intel-opencl-icd # libstdc++-12-dev + - 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 intel-oneapi-base-toolkit + - name: Configure Unified Runtime project # ">" is used to avoid adding "\" at the end of each line; this command is quite long run: > diff --git a/.github/workflows/ur-precommit.yml b/.github/workflows/ur-precommit.yml index 0bb4a0dc2f81..1f16433f4796 100644 --- a/.github/workflows/ur-precommit.yml +++ b/.github/workflows/ur-precommit.yml @@ -76,18 +76,42 @@ jobs: docker_image: "ghcr.io/intel/llvm/ubuntu2204_build:latest" 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/ubuntu2204_build:latest" + 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/ubuntu2204_build:latest" + 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 + # 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, docker_image: "ghcr.io/intel/llvm/ubuntu2204_build:latest"}, - # # {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}, + # {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}, # ] uses: ./.github/workflows/ur-build-hw.yml with: From 01a95bb815f5ad4d75d0d74bb639f944de3fdd33 Mon Sep 17 00:00:00 2001 From: rbanka1 Date: Wed, 2 Apr 2025 13:38:35 +0200 Subject: [PATCH 09/21] test alldeps --- .github/workflows/ur-build-hw.yml | 43 ++++++++++++++++------------- .github/workflows/ur-precommit.yml | 44 +++++++++++++++--------------- 2 files changed, 46 insertions(+), 41 deletions(-) diff --git a/.github/workflows/ur-build-hw.yml b/.github/workflows/ur-build-hw.yml index 2db593b48aa0..cfde61b88d98 100644 --- a/.github/workflows/ur-build-hw.yml +++ b/.github/workflows/ur-build-hw.yml @@ -115,6 +115,10 @@ jobs: - name: Checkout LLVM uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + - name: Get information about platform + if: ${{ always() }} + run: ./unified-runtime/.github/scripts/get_system_info.sh + # TODO: how other workflows (using dockers) deal with the path change? # also, note: I don't think it's needed anywhere now - I guess we can only use the relative paths...? - name: Set working directory as environment variable @@ -150,25 +154,26 @@ jobs: # or # ghcr.io/intel/llvm/ubuntu2404_build:latest # not sure on OpenCL and NativeCPU - to be checked. - - name: Install Intel Level Zero GPU - # if: ${{ inputs.adapter_name == 'L0' || inputs.adapter_name == 'L0_V2' }} - run: | - wget -qO - https://repositories.intel.com/gpu/intel-graphics.key | \ - sudo gpg --yes --dearmor --output /usr/share/keyrings/intel-graphics.gpg - echo "deb [arch=amd64,i386 signed-by=/usr/share/keyrings/intel-graphics.gpg] https://repositories.intel.com/gpu/ubuntu jammy unified" | \ - sudo tee /etc/apt/sources.list.d/intel-gpu-jammy.list - sudo apt-get update - sudo apt-get install -y libze-intel-gpu1 libze1 libze-dev intel-opencl-icd - # libstdc++-12-dev - - - 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 intel-oneapi-base-toolkit + + # - name: Install Intel Level Zero GPU + # # if: ${{ inputs.adapter_name == 'L0' || inputs.adapter_name == 'L0_V2' }} + # run: | + # wget -qO - https://repositories.intel.com/gpu/intel-graphics.key | \ + # sudo gpg --yes --dearmor --output /usr/share/keyrings/intel-graphics.gpg + # echo "deb [arch=amd64,i386 signed-by=/usr/share/keyrings/intel-graphics.gpg] https://repositories.intel.com/gpu/ubuntu jammy unified" | \ + # sudo tee /etc/apt/sources.list.d/intel-gpu-jammy.list + # sudo apt-get update + # sudo apt-get install -y libze-intel-gpu1 libze1 libze-dev intel-opencl-icd + # # libstdc++-12-dev + + # - 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 intel-oneapi-base-toolkit - name: Configure Unified Runtime project # ">" is used to avoid adding "\" at the end of each line; this command is quite long diff --git a/.github/workflows/ur-precommit.yml b/.github/workflows/ur-precommit.yml index 1f16433f4796..155d88de2c65 100644 --- a/.github/workflows/ur-precommit.yml +++ b/.github/workflows/ur-precommit.yml @@ -60,50 +60,50 @@ jobs: include: - name: L0 runner: UR_L0 - docker_image: "ghcr.io/intel/llvm/ubuntu2204_build:latest" + 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/ubuntu2204_build:latest" + 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/ubuntu2204_build:latest" + 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/ubuntu2204_build:latest" + 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/ubuntu2204_build:latest" + 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/ubuntu2204_build:latest" + 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 + # - name: OPENCL + # runner: UR_OPENCL + # platform: "Intel(R) OpenCL" + # docker_image: "ghcr.io/intel/llvm/ubuntu2404_intel_drivers:alldeps" + # 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/ubuntu2404_intel_drivers:alldeps" + # 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/ubuntu2404_intel_drivers:alldeps" + # image_options: -u 1001 --device=/dev/dri --privileged --cap-add SYS_ADMIN # 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, docker_image: "ghcr.io/intel/llvm/ubuntu2204_build:latest"}, + # {name: L0, runner: UR_L0, docker_image: "ghcr.io/intel/llvm/ubuntu2404_intel_drivers:alldeps"}, # {name: L0_V2, runner: UR_L0}, # {name: L0, runner: UR_L0, static: ON}, # {name: OPENCL, runner: UR_OPENCL, platform: "Intel(R) OpenCL"}, From e5d2337d419545659979f4605c5f5083e3130444 Mon Sep 17 00:00:00 2001 From: rbanka1 Date: Wed, 2 Apr 2025 13:43:22 +0200 Subject: [PATCH 10/21] test alldeps --- .github/workflows/ur-precommit.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ur-precommit.yml b/.github/workflows/ur-precommit.yml index ddd19c1b4ef4..8cef3700183d 100644 --- a/.github/workflows/ur-precommit.yml +++ b/.github/workflows/ur-precommit.yml @@ -137,9 +137,9 @@ jobs: # - name: Checkout LLVM # uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.0.0 - with: - python-version: 3.9 + # - uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.0.0 + # with: + # python-version: 3.9 # - name: Install prerequisites # working-directory: ${{github.workspace}}/unified-runtime From 41a4f8bfe50b5704ca3ddb43ec66a94e33b7944a Mon Sep 17 00:00:00 2001 From: rbanka1 Date: Wed, 2 Apr 2025 13:46:47 +0200 Subject: [PATCH 11/21] test alldeps --- .github/workflows/ur-build-hw.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ur-build-hw.yml b/.github/workflows/ur-build-hw.yml index cfde61b88d98..cbcbe02e4063 100644 --- a/.github/workflows/ur-build-hw.yml +++ b/.github/workflows/ur-build-hw.yml @@ -126,6 +126,10 @@ jobs: pwd echo "${{github.workspace}}" + - name: Fix broken install + run: | + apt --fix-broken install -y + # TODO: move installation of python3-venv to docker # Latest distros do not allow global pip installation - name: Install UR python dependencies in venv @@ -154,7 +158,7 @@ jobs: # or # ghcr.io/intel/llvm/ubuntu2404_build:latest # not sure on OpenCL and NativeCPU - to be checked. - + # - name: Install Intel Level Zero GPU # # if: ${{ inputs.adapter_name == 'L0' || inputs.adapter_name == 'L0_V2' }} # run: | From 9a5b94ba50961b2e67d7bdd78a4d8a14b655b19d Mon Sep 17 00:00:00 2001 From: rbanka1 Date: Wed, 2 Apr 2025 13:50:36 +0200 Subject: [PATCH 12/21] test alldeps --- .github/workflows/ur-build-hw.yml | 22 +++++++++------------- .github/workflows/ur-precommit.yml | 6 +++--- 2 files changed, 12 insertions(+), 16 deletions(-) diff --git a/.github/workflows/ur-build-hw.yml b/.github/workflows/ur-build-hw.yml index cbcbe02e4063..1223c51021d9 100644 --- a/.github/workflows/ur-build-hw.yml +++ b/.github/workflows/ur-build-hw.yml @@ -126,21 +126,17 @@ jobs: pwd echo "${{github.workspace}}" - - name: Fix broken install - run: | - apt --fix-broken install -y - # TODO: move installation of python3-venv to docker # Latest distros do not allow global pip installation - - name: Install UR python dependencies in venv - working-directory: ./unified-runtime - run: | - sudo apt update - sudo apt install -y python3-venv - python3 -m venv .venv - . .venv/bin/activate - echo "${PWD}/.venv/bin" >> $GITHUB_PATH - pip install -r third_party/requirements.txt + # - name: Install UR python dependencies in venv + # working-directory: ./unified-runtime + # run: | + # sudo apt update + # sudo apt install -y python3-venv + # python3 -m venv .venv + # . .venv/bin/activate + # echo "${PWD}/.venv/bin" >> $GITHUB_PATH + # pip install -r third_party/requirements.txt - name: Download DPC++ run: | diff --git a/.github/workflows/ur-precommit.yml b/.github/workflows/ur-precommit.yml index 8cef3700183d..5a4864b73c22 100644 --- a/.github/workflows/ur-precommit.yml +++ b/.github/workflows/ur-precommit.yml @@ -137,9 +137,9 @@ jobs: # - name: Checkout LLVM # uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - # - uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.0.0 - # with: - # python-version: 3.9 + # - uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.0.0 + # with: + # python-version: 3.9 # - name: Install prerequisites # working-directory: ${{github.workspace}}/unified-runtime From e7869e52e4272a08d38b870bc0b434157dce5045 Mon Sep 17 00:00:00 2001 From: rbanka1 Date: Wed, 2 Apr 2025 14:41:59 +0200 Subject: [PATCH 13/21] reload dockers --- .github/workflows/ur-precommit.yml | 74 +++++++++---------- .../ubuntu2404_intel_drivers.Dockerfile | 2 + ...buntu2404_intel_drivers_igc_dev.Dockerfile | 2 + devops/scripts/install_drivers.sh | 11 +++ 4 files changed, 52 insertions(+), 37 deletions(-) diff --git a/.github/workflows/ur-precommit.yml b/.github/workflows/ur-precommit.yml index 5a4864b73c22..f0af18c8ab48 100644 --- a/.github/workflows/ur-precommit.yml +++ b/.github/workflows/ur-precommit.yml @@ -58,47 +58,47 @@ jobs: strategy: matrix: 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" + # - name: L0 + # runner: UR_L0 # docker_image: "ghcr.io/intel/llvm/ubuntu2404_intel_drivers:alldeps" - # 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" + # 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 --device=/dev/kfd --privileged --cap-add SYS_ADMIN + # 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: NATIVE_CPU - # runner: UR_NATIVE_CPU + # - name: HIP + # runner: UR_HIP # docker_image: "ghcr.io/intel/llvm/ubuntu2404_intel_drivers:alldeps" - # image_options: -u 1001 --device=/dev/dri --privileged --cap-add SYS_ADMIN + # 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/ubuntu2404_intel_drivers:alldeps" + 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/ubuntu2404_intel_drivers:alldeps" + 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/ubuntu2404_intel_drivers:alldeps" + image_options: -u 1001 --device=/dev/dri --privileged --cap-add SYS_ADMIN # 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. diff --git a/devops/containers/ubuntu2404_intel_drivers.Dockerfile b/devops/containers/ubuntu2404_intel_drivers.Dockerfile index a0970f390014..1759e79a8007 100644 --- a/devops/containers/ubuntu2404_intel_drivers.Dockerfile +++ b/devops/containers/ubuntu2404_intel_drivers.Dockerfile @@ -11,6 +11,8 @@ USER root RUN apt update && apt install -yqq wget +RUN apt-get update && apt --fix-broken install -y + COPY scripts/get_release.py / COPY scripts/install_drivers.sh / COPY dependencies.json / diff --git a/devops/containers/ubuntu2404_intel_drivers_igc_dev.Dockerfile b/devops/containers/ubuntu2404_intel_drivers_igc_dev.Dockerfile index 25cb0ff9819e..858e861f30d9 100644 --- a/devops/containers/ubuntu2404_intel_drivers_igc_dev.Dockerfile +++ b/devops/containers/ubuntu2404_intel_drivers_igc_dev.Dockerfile @@ -9,6 +9,8 @@ USER root RUN apt update && apt install -yqq libllvm14 +RUN apt-get update && apt --fix-broken install -y + COPY scripts/get_release.py / COPY scripts/install_drivers.sh / COPY dependencies.json / diff --git a/devops/scripts/install_drivers.sh b/devops/scripts/install_drivers.sh index 01c2dde54d6d..e06a392c2886 100755 --- a/devops/scripts/install_drivers.sh +++ b/devops/scripts/install_drivers.sh @@ -168,6 +168,15 @@ InstallIGFX () { fi } +InstallOpenCL () { + echo "Installing Intel OpenCL..." + 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 intel-oneapi-base-toolkit +} + InstallCPURT () { echo "Installing Intel OpenCL CPU Runtime..." echo "CPU Runtime version $CPU_TAG" @@ -234,9 +243,11 @@ while [ "${1:-}" != "" ]; do InstallTBB InstallCPURT InstallFPGAEmu + InstallOpenCL ;; "--igfx") InstallIGFX + InstallOpenCL ;; "--cpu") InstallTBB From 249c26aa4475ad588c2f28a3061218ced1e33882 Mon Sep 17 00:00:00 2001 From: rbanka1 Date: Wed, 2 Apr 2025 14:54:46 +0200 Subject: [PATCH 14/21] reload dockers --- devops/scripts/install_drivers.sh | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/devops/scripts/install_drivers.sh b/devops/scripts/install_drivers.sh index e06a392c2886..01c2dde54d6d 100755 --- a/devops/scripts/install_drivers.sh +++ b/devops/scripts/install_drivers.sh @@ -168,15 +168,6 @@ InstallIGFX () { fi } -InstallOpenCL () { - echo "Installing Intel OpenCL..." - 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 intel-oneapi-base-toolkit -} - InstallCPURT () { echo "Installing Intel OpenCL CPU Runtime..." echo "CPU Runtime version $CPU_TAG" @@ -243,11 +234,9 @@ while [ "${1:-}" != "" ]; do InstallTBB InstallCPURT InstallFPGAEmu - InstallOpenCL ;; "--igfx") InstallIGFX - InstallOpenCL ;; "--cpu") InstallTBB From 2f875fe00a1d105b20e52766c9a94df7ac671cb3 Mon Sep 17 00:00:00 2001 From: rbanka1 Date: Wed, 2 Apr 2025 15:05:56 +0200 Subject: [PATCH 15/21] reload dockers --- devops/scripts/install_drivers.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/devops/scripts/install_drivers.sh b/devops/scripts/install_drivers.sh index 01c2dde54d6d..e7e48be8ce00 100755 --- a/devops/scripts/install_drivers.sh +++ b/devops/scripts/install_drivers.sh @@ -168,6 +168,16 @@ InstallIGFX () { fi } +InstallOpenCL () { + echo "Installing Intel OpenCL..." + apt-get update && apt-get install -y ca-certificates gpg + 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 + apt-get update + apt-get install -y intel-oneapi-runtime-opencl intel-oneapi-base-toolkit +} + InstallCPURT () { echo "Installing Intel OpenCL CPU Runtime..." echo "CPU Runtime version $CPU_TAG" @@ -234,9 +244,11 @@ while [ "${1:-}" != "" ]; do InstallTBB InstallCPURT InstallFPGAEmu + InstallOpenCL ;; "--igfx") InstallIGFX + InstallOpenCL ;; "--cpu") InstallTBB From d191e265654ad54ecb62c2a21ff6adb151b6bd7b Mon Sep 17 00:00:00 2001 From: rbanka1 Date: Wed, 2 Apr 2025 15:22:32 +0200 Subject: [PATCH 16/21] reload dockers --- .github/workflows/ur-build-hw.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ur-build-hw.yml b/.github/workflows/ur-build-hw.yml index 1223c51021d9..69143f437642 100644 --- a/.github/workflows/ur-build-hw.yml +++ b/.github/workflows/ur-build-hw.yml @@ -166,14 +166,14 @@ jobs: # sudo apt-get install -y libze-intel-gpu1 libze1 libze-dev intel-opencl-icd # # libstdc++-12-dev - # - 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 intel-oneapi-base-toolkit + - 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 intel-oneapi-base-toolkit - name: Configure Unified Runtime project # ">" is used to avoid adding "\" at the end of each line; this command is quite long From b0e765414479ff79cf420cb89f8739d55e8730ec Mon Sep 17 00:00:00 2001 From: rbanka1 Date: Wed, 2 Apr 2025 15:38:15 +0200 Subject: [PATCH 17/21] reload dockers --- .github/workflows/ur-build-hw.yml | 16 ++++++++-------- .../ubuntu2404_intel_drivers.Dockerfile | 9 ++++++++- devops/scripts/install_drivers.sh | 12 ------------ 3 files changed, 16 insertions(+), 21 deletions(-) diff --git a/.github/workflows/ur-build-hw.yml b/.github/workflows/ur-build-hw.yml index 69143f437642..1223c51021d9 100644 --- a/.github/workflows/ur-build-hw.yml +++ b/.github/workflows/ur-build-hw.yml @@ -166,14 +166,14 @@ jobs: # sudo apt-get install -y libze-intel-gpu1 libze1 libze-dev intel-opencl-icd # # libstdc++-12-dev - - 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 intel-oneapi-base-toolkit + # - 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 intel-oneapi-base-toolkit - name: Configure Unified Runtime project # ">" is used to avoid adding "\" at the end of each line; this command is quite long diff --git a/devops/containers/ubuntu2404_intel_drivers.Dockerfile b/devops/containers/ubuntu2404_intel_drivers.Dockerfile index 1759e79a8007..d2f3f5f23574 100644 --- a/devops/containers/ubuntu2404_intel_drivers.Dockerfile +++ b/devops/containers/ubuntu2404_intel_drivers.Dockerfile @@ -9,7 +9,7 @@ ARG use_unstable_driver=true USER root -RUN apt update && apt install -yqq wget +RUN apt update && apt install -yqq wget ca-certificates gpg RUN apt-get update && apt --fix-broken install -y @@ -27,6 +27,13 @@ RUN --mount=type=secret,id=github_token \ fi && \ GITHUB_TOKEN=$(cat /run/secrets/github_token) /install_drivers.sh $install_driver_opt --all +RUN echo "Installing Intel OpenCL..." && \ + 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 && \ + apt-get update && \ + apt-get install -y intel-oneapi-runtime-opencl intel-oneapi-base-toolkit + COPY scripts/drivers_entrypoint.sh /drivers_entrypoint.sh USER sycl diff --git a/devops/scripts/install_drivers.sh b/devops/scripts/install_drivers.sh index e7e48be8ce00..01c2dde54d6d 100755 --- a/devops/scripts/install_drivers.sh +++ b/devops/scripts/install_drivers.sh @@ -168,16 +168,6 @@ InstallIGFX () { fi } -InstallOpenCL () { - echo "Installing Intel OpenCL..." - apt-get update && apt-get install -y ca-certificates gpg - 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 - apt-get update - apt-get install -y intel-oneapi-runtime-opencl intel-oneapi-base-toolkit -} - InstallCPURT () { echo "Installing Intel OpenCL CPU Runtime..." echo "CPU Runtime version $CPU_TAG" @@ -244,11 +234,9 @@ while [ "${1:-}" != "" ]; do InstallTBB InstallCPURT InstallFPGAEmu - InstallOpenCL ;; "--igfx") InstallIGFX - InstallOpenCL ;; "--cpu") InstallTBB From f62a48194bba6d1c8f3b14d93cfc5597665b7424 Mon Sep 17 00:00:00 2001 From: rbanka1 Date: Thu, 17 Apr 2025 09:52:55 +0200 Subject: [PATCH 18/21] reload base image --- .github/workflows/ur-precommit.yml | 6 +++--- devops/containers/ubuntu2204_build.Dockerfile | 14 ++++++++++++++ .../containers/ubuntu2404_intel_drivers.Dockerfile | 7 ------- 3 files changed, 17 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ur-precommit.yml b/.github/workflows/ur-precommit.yml index f0af18c8ab48..46f555e511a2 100644 --- a/.github/workflows/ur-precommit.yml +++ b/.github/workflows/ur-precommit.yml @@ -87,17 +87,17 @@ jobs: - name: OPENCL runner: UR_OPENCL platform: "Intel(R) OpenCL" - docker_image: "ghcr.io/intel/llvm/ubuntu2404_intel_drivers:alldeps" + 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/ubuntu2404_intel_drivers:alldeps" + 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/ubuntu2404_intel_drivers:alldeps" + docker_image: "ghcr.io/intel/llvm/ubuntu2204_build:latest" image_options: -u 1001 --device=/dev/dri --privileged --cap-add SYS_ADMIN # Extra native CPU jobs are here to force the loader to be used. diff --git a/devops/containers/ubuntu2204_build.Dockerfile b/devops/containers/ubuntu2204_build.Dockerfile index 1aa814aaa775..349308d17377 100644 --- a/devops/containers/ubuntu2204_build.Dockerfile +++ b/devops/containers/ubuntu2204_build.Dockerfile @@ -30,6 +30,20 @@ RUN apt update && apt install -yqq rocm-dev && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* +COPY unified-runtime/third_party/requirements.txt /tmp/requirements.txt +RUN apt update && apt install -y python3-venv && \ + python3 -m venv /opt/unified-runtime/.venv && \ + /opt/unified-runtime/.venv/bin/pip install --upgrade pip && \ + /opt/unified-runtime/.venv/bin/pip install -r /tmp/requirements.txt && \ + rm /tmp/requirements.txt + +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 && \ + apt-get update && \ + apt-get install -y intel-oneapi-runtime-opencl intel-oneapi-base-toolkit + COPY scripts/create-sycl-user.sh /user-setup.sh RUN /user-setup.sh diff --git a/devops/containers/ubuntu2404_intel_drivers.Dockerfile b/devops/containers/ubuntu2404_intel_drivers.Dockerfile index d2f3f5f23574..b32e90d8c20d 100644 --- a/devops/containers/ubuntu2404_intel_drivers.Dockerfile +++ b/devops/containers/ubuntu2404_intel_drivers.Dockerfile @@ -27,13 +27,6 @@ RUN --mount=type=secret,id=github_token \ fi && \ GITHUB_TOKEN=$(cat /run/secrets/github_token) /install_drivers.sh $install_driver_opt --all -RUN echo "Installing Intel OpenCL..." && \ - 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 && \ - apt-get update && \ - apt-get install -y intel-oneapi-runtime-opencl intel-oneapi-base-toolkit - COPY scripts/drivers_entrypoint.sh /drivers_entrypoint.sh USER sycl From 2d66fe3594cc71f37aa209b27b75bc6f0253b3e5 Mon Sep 17 00:00:00 2001 From: rbanka1 Date: Thu, 17 Apr 2025 10:06:21 +0200 Subject: [PATCH 19/21] reload base image --- .github/workflows/ur-build-hw.yml | 58 +++++++++---------- devops/containers/ubuntu2204_build.Dockerfile | 2 +- 2 files changed, 30 insertions(+), 30 deletions(-) diff --git a/.github/workflows/ur-build-hw.yml b/.github/workflows/ur-build-hw.yml index 19cefd3e9d2b..e81a88654e02 100644 --- a/.github/workflows/ur-build-hw.yml +++ b/.github/workflows/ur-build-hw.yml @@ -128,16 +128,16 @@ jobs: # TODO: move installation of python3-venv to docker # Latest distros do not allow global pip installation - # - name: Install UR python dependencies in venv - # working-directory: ./unified-runtime - # run: | - # sudo apt update - # sudo apt install -y python3-venv - # python3 -m venv .venv - # . .venv/bin/activate - # echo "${PWD}/.venv/bin" >> $GITHUB_PATH - # pip install -r third_party/requirements.txt - # pip install -r third_party/requirements_testing.txt + - name: Install UR python dependencies in venv + working-directory: ./unified-runtime + run: | + sudo apt update + sudo apt install -y python3-venv + python3 -m venv .venv + . .venv/bin/activate + 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: | @@ -156,25 +156,25 @@ jobs: # ghcr.io/intel/llvm/ubuntu2404_build:latest # not sure on OpenCL and NativeCPU - to be checked. - # - name: Install Intel Level Zero GPU - # # if: ${{ inputs.adapter_name == 'L0' || inputs.adapter_name == 'L0_V2' }} - # run: | - # wget -qO - https://repositories.intel.com/gpu/intel-graphics.key | \ - # sudo gpg --yes --dearmor --output /usr/share/keyrings/intel-graphics.gpg - # echo "deb [arch=amd64,i386 signed-by=/usr/share/keyrings/intel-graphics.gpg] https://repositories.intel.com/gpu/ubuntu jammy unified" | \ - # sudo tee /etc/apt/sources.list.d/intel-gpu-jammy.list - # sudo apt-get update - # sudo apt-get install -y libze-intel-gpu1 libze1 libze-dev intel-opencl-icd - # # libstdc++-12-dev - - # - 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 intel-oneapi-base-toolkit + - name: Install Intel Level Zero GPU + # if: ${{ inputs.adapter_name == 'L0' || inputs.adapter_name == 'L0_V2' }} + run: | + wget -qO - https://repositories.intel.com/gpu/intel-graphics.key | \ + sudo gpg --yes --dearmor --output /usr/share/keyrings/intel-graphics.gpg + echo "deb [arch=amd64,i386 signed-by=/usr/share/keyrings/intel-graphics.gpg] https://repositories.intel.com/gpu/ubuntu jammy unified" | \ + sudo tee /etc/apt/sources.list.d/intel-gpu-jammy.list + sudo apt-get update + sudo apt-get install -y libze-intel-gpu1 libze1 libze-dev intel-opencl-icd + # libstdc++-12-dev + + - 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 intel-oneapi-base-toolkit - name: Configure Unified Runtime project # ">" is used to avoid adding "\" at the end of each line; this command is quite long diff --git a/devops/containers/ubuntu2204_build.Dockerfile b/devops/containers/ubuntu2204_build.Dockerfile index 349308d17377..110fbf1ae4cc 100644 --- a/devops/containers/ubuntu2204_build.Dockerfile +++ b/devops/containers/ubuntu2204_build.Dockerfile @@ -30,7 +30,7 @@ RUN apt update && apt install -yqq rocm-dev && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* -COPY unified-runtime/third_party/requirements.txt /tmp/requirements.txt +COPY llvm/unified-runtime/third_party/requirements.txt /tmp/requirements.txt RUN apt update && apt install -y python3-venv && \ python3 -m venv /opt/unified-runtime/.venv && \ /opt/unified-runtime/.venv/bin/pip install --upgrade pip && \ From 9e58b0d6081a41304a5a5b7d5eaa40c1c4333c10 Mon Sep 17 00:00:00 2001 From: rbanka1 Date: Thu, 17 Apr 2025 16:15:28 +0200 Subject: [PATCH 20/21] prepared ur workfow --- .github/workflows/ur-build-hw.yml | 34 +--------- .github/workflows/ur-precommit.yml | 66 ++++++++----------- devops/containers/ubuntu2204_build.Dockerfile | 14 ---- .../ubuntu2404_intel_drivers.Dockerfile | 4 +- ...buntu2404_intel_drivers_igc_dev.Dockerfile | 2 - 5 files changed, 28 insertions(+), 92 deletions(-) diff --git a/.github/workflows/ur-build-hw.yml b/.github/workflows/ur-build-hw.yml index e81a88654e02..36403aab025a 100644 --- a/.github/workflows/ur-build-hw.yml +++ b/.github/workflows/ur-build-hw.yml @@ -101,9 +101,7 @@ jobs: runs-on: ${{inputs.runner_name}} container: image: ${{ inputs.docker_image }} - # TODO: options may differ for other GPU cards options: ${{ inputs.image_options }} - # options: -u 1001 --device=/dev/dri -v /dev/dri/by-path:/dev/dri/by-path --privileged --cap-add SYS_ADMIN steps: # TODO: @@ -119,13 +117,6 @@ jobs: if: ${{ always() }} run: ./unified-runtime/.github/scripts/get_system_info.sh - # TODO: how other workflows (using dockers) deal with the path change? - # also, note: I don't think it's needed anywhere now - I guess we can only use the relative paths...? - - name: Set working directory as environment variable - run: | - pwd - echo "${{github.workspace}}" - # TODO: move installation of python3-venv to docker # Latest distros do not allow global pip installation - name: Install UR python dependencies in venv @@ -145,28 +136,6 @@ jobs: mkdir -p dpcpp_compiler tar -xvf dpcpp_compiler.tar.gz -C dpcpp_compiler - # TODO_1: move this installation to docker? Perhaps there's other docker that already has these packages? we aren't the only ones using L0 ;-) - # TODO_2: if needed here, only install it for level zero jobs; and install required staff for other adapters under other 'if' - # - # it seems there's image for intel drivers (L0): - # ghcr.io/intel/llvm/ubuntu2404_intel_drivers:alldeps JESLI ZADZIALA TO BEZ INSTAL - # and for other adapters (HIP, CUDA): - # ghcr.io/intel/llvm/ubuntu2204_build:latest - # or - # ghcr.io/intel/llvm/ubuntu2404_build:latest - # not sure on OpenCL and NativeCPU - to be checked. - - - name: Install Intel Level Zero GPU - # if: ${{ inputs.adapter_name == 'L0' || inputs.adapter_name == 'L0_V2' }} - run: | - wget -qO - https://repositories.intel.com/gpu/intel-graphics.key | \ - sudo gpg --yes --dearmor --output /usr/share/keyrings/intel-graphics.gpg - echo "deb [arch=amd64,i386 signed-by=/usr/share/keyrings/intel-graphics.gpg] https://repositories.intel.com/gpu/ubuntu jammy unified" | \ - sudo tee /etc/apt/sources.list.d/intel-gpu-jammy.list - sudo apt-get update - sudo apt-get install -y libze-intel-gpu1 libze1 libze-dev intel-opencl-icd - # libstdc++-12-dev - - name: Install OpenCL if: ${{ inputs.adapter_name == 'OPENCL' }} run: | @@ -174,7 +143,7 @@ jobs: | 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 intel-oneapi-base-toolkit + sudo apt-get install -y intel-oneapi-runtime-opencl - name: Configure Unified Runtime project # ">" is used to avoid adding "\" at the end of each line; this command is quite long @@ -212,7 +181,6 @@ jobs: 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 - # Don't run adapter specific tests when building multiple adapters if: ${{ matrix.adapter.other_name == '' }} diff --git a/.github/workflows/ur-precommit.yml b/.github/workflows/ur-precommit.yml index 421dc00e682c..5d990b6dfb68 100644 --- a/.github/workflows/ur-precommit.yml +++ b/.github/workflows/ur-precommit.yml @@ -58,32 +58,32 @@ jobs: strategy: matrix: 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: 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" @@ -99,20 +99,6 @@ jobs: 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 - - # 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, docker_image: "ghcr.io/intel/llvm/ubuntu2404_intel_drivers:alldeps"}, - # {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}, - # ] uses: ./.github/workflows/ur-build-hw.yml with: adapter_name: ${{ matrix.name }} diff --git a/devops/containers/ubuntu2204_build.Dockerfile b/devops/containers/ubuntu2204_build.Dockerfile index 110fbf1ae4cc..1aa814aaa775 100644 --- a/devops/containers/ubuntu2204_build.Dockerfile +++ b/devops/containers/ubuntu2204_build.Dockerfile @@ -30,20 +30,6 @@ RUN apt update && apt install -yqq rocm-dev && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* -COPY llvm/unified-runtime/third_party/requirements.txt /tmp/requirements.txt -RUN apt update && apt install -y python3-venv && \ - python3 -m venv /opt/unified-runtime/.venv && \ - /opt/unified-runtime/.venv/bin/pip install --upgrade pip && \ - /opt/unified-runtime/.venv/bin/pip install -r /tmp/requirements.txt && \ - rm /tmp/requirements.txt - -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 && \ - apt-get update && \ - apt-get install -y intel-oneapi-runtime-opencl intel-oneapi-base-toolkit - COPY scripts/create-sycl-user.sh /user-setup.sh RUN /user-setup.sh diff --git a/devops/containers/ubuntu2404_intel_drivers.Dockerfile b/devops/containers/ubuntu2404_intel_drivers.Dockerfile index b32e90d8c20d..a0970f390014 100644 --- a/devops/containers/ubuntu2404_intel_drivers.Dockerfile +++ b/devops/containers/ubuntu2404_intel_drivers.Dockerfile @@ -9,9 +9,7 @@ ARG use_unstable_driver=true USER root -RUN apt update && apt install -yqq wget ca-certificates gpg - -RUN apt-get update && apt --fix-broken install -y +RUN apt update && apt install -yqq wget COPY scripts/get_release.py / COPY scripts/install_drivers.sh / diff --git a/devops/containers/ubuntu2404_intel_drivers_igc_dev.Dockerfile b/devops/containers/ubuntu2404_intel_drivers_igc_dev.Dockerfile index 858e861f30d9..25cb0ff9819e 100644 --- a/devops/containers/ubuntu2404_intel_drivers_igc_dev.Dockerfile +++ b/devops/containers/ubuntu2404_intel_drivers_igc_dev.Dockerfile @@ -9,8 +9,6 @@ USER root RUN apt update && apt install -yqq libllvm14 -RUN apt-get update && apt --fix-broken install -y - COPY scripts/get_release.py / COPY scripts/install_drivers.sh / COPY dependencies.json / From 355c9ae04bb744d46b269340bb9a0e0e59354aa0 Mon Sep 17 00:00:00 2001 From: rbanka1 Date: Wed, 23 Apr 2025 17:26:34 +0200 Subject: [PATCH 21/21] venv in docker --- .github/workflows/ur-build-hw.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ur-build-hw.yml b/.github/workflows/ur-build-hw.yml index 36403aab025a..3876bd38c90f 100644 --- a/.github/workflows/ur-build-hw.yml +++ b/.github/workflows/ur-build-hw.yml @@ -115,15 +115,17 @@ jobs: - name: Get information about platform if: ${{ always() }} - run: ./unified-runtime/.github/scripts/get_system_info.sh + run: ./unified-runtime/.github/scripts/get_system_info.sh + + - 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' - # TODO: move installation of python3-venv to docker - # Latest distros do not allow global pip installation - name: Install UR python dependencies in venv working-directory: ./unified-runtime run: | - sudo apt update - sudo apt install -y python3-venv python3 -m venv .venv . .venv/bin/activate echo "${PWD}/.venv/bin" >> $GITHUB_PATH