Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CI] Move arc test determination to precommit yaml #12825

Merged
merged 2 commits into from
Feb 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 1 addition & 13 deletions .github/workflows/sycl-detect-changes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ on:
filters:
description: Matched filters
value: ${{ jobs.need_check.outputs.filters }}
arc_tests:
description: Tests to run on Arc
value: ${{ jobs.need_check.outputs.arc_tests }}

jobs:
need_check:
Expand All @@ -19,7 +16,6 @@ jobs:
timeout-minutes: 3
outputs:
filters: ${{ steps.result.outputs.result }}
arc_tests: ${{ steps.arc_tests.outputs.arc_tests }}
steps:
- name: Check file changes
uses: dorny/paths-filter@0bc4621a3135347011ad047f9ecf449bf72ce2bd
Expand Down Expand Up @@ -89,12 +85,4 @@ jobs:
return ["llvm", "llvm_spirv", "clang", "sycl_fusion", "xptifw", "libclc", "sycl", "ci", "esimd"];

- run: echo '${{ steps.result.outputs.result }}'

- name: Set Arc tests
id: arc_tests
run: |
if [ "${{ contains(steps.result.outputs.result, 'esimd') }}" == "true" ]; then
echo 'arc_tests="(ESIMD|InvokeSimd|Matrix)/"' >> "$GITHUB_OUTPUT"
else
echo 'arc_tests="Matrix/"' >> "$GITHUB_OUTPUT"
fi

23 changes: 21 additions & 2 deletions .github/workflows/sycl-linux-precommit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,28 @@ jobs:
build_image: "ghcr.io/intel/llvm/ubuntu2204_build:7ed894ab0acc8ff09262113fdb08940d22654a30"
changes: ${{ needs.detect_changes.outputs.filters }}

test:
determine_arc_tests:
name: Decide which Arc tests to run
needs: [build, detect_changes]
if: ${{ always() && !cancelled() && needs.build.outputs.build_conclusion == 'success' }}
# Github's ubuntu-* runners are slow to allocate. Use our CUDA runner since
# we don't use it for anything right now.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We use it for CUDA in nightly, and might use it for CTS runs as well :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just copied this comment from another file. Should I use a different runner? I have no idea what the infra allocation looks like.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just drop it. I think we mostly use self-hosted runners anyway, so it's not an exception here.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can be a separate PR.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can be a separate PR because the testing is green. Or push the update and merge without waiting for the results ;)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will do separate PR

runs-on: [Linux, build]
timeout-minutes: 3
outputs:
arc_tests: ${{ steps.arc_tests.outputs.arc_tests }}
steps:
- name: Determine Arc tests
id: arc_tests
run: |
if [ "${{ contains(needs.detect_changes.outputs.filters, 'esimd') }}" == "true" ]; then
echo 'arc_tests="(ESIMD|InvokeSimd|Matrix)/"' >> "$GITHUB_OUTPUT"
else
echo 'arc_tests="Matrix/"' >> "$GITHUB_OUTPUT"
fi
test:
needs: [build, detect_changes, determine_arc_tests]
aelovikov-intel marked this conversation as resolved.
Show resolved Hide resolved
if: ${{ always() && !cancelled() && needs.build.outputs.build_conclusion == 'success' }}
strategy:
fail-fast: false
matrix:
Expand All @@ -76,7 +95,7 @@ jobs:
reset_gpu: true
install_drivers: ${{ contains(needs.detect_changes.outputs.filters, 'drivers') }}
extra_lit_opts: --param matrix-xmx8=True --param gpu-intel-dg2=True
env: '{"LIT_FILTER":${{ needs.detect_changes.outputs.arc_tests }} }'
env: '{"LIT_FILTER":${{ needs.determine_arc_tests.outputs.arc_tests }} }'
uses: ./.github/workflows/sycl-linux-run-tests.yml
with:
name: ${{ matrix.name }}
Expand Down
Loading