Skip to content

Commit

Permalink
prova2
Browse files Browse the repository at this point in the history
  • Loading branch information
mspronesti committed Aug 5, 2024
1 parent c891757 commit 0210326
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 36 deletions.
41 changes: 19 additions & 22 deletions .github/workflows/ci-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,30 @@ name: CI kernels
on: [push, pull_request]

jobs:
check_changes:
diff:
runs-on: ubuntu-latest
outputs:
sycl_changed: ${{ steps.check_sycl_changes.outputs.sycl_changed }}
sycl_changed: ${{ steps.filter.outputs.sycl_changed }}
steps:
- uses: actions/checkout@v3

- name: Check if dev/sycl changed
id: check_sycl_changes
run: |
if git diff --name-only ${{ github.event.before }} ${{ github.sha }} | grep -q '^dev/sycl/'; then
echo "::set-output name=sycl_changed::true"
else
echo "::set-output name=sycl_changed::false"
fi
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: filter
with:
base: "main"
filters: |
sycl_changed:
- 'dev/sycl/**'
gpu:
needs: check_changes
needs: diff
runs-on: devcloud # self-hosted GPU runner on Intel devcloud
if: needs.check_changes.outputs.sycl_changed == 'true'
name: Run all kernels (GPU)
if: needs.diff.outputs.sycl_changed == 'true'
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Build kernels (GPU)
run: |
run: |
cd dev/sycl
make CC=icx
Expand All @@ -38,13 +36,12 @@ jobs:
make run_all CC=icx
cpu:
needs: check_changes
needs: diff
runs-on: ubuntu-latest
if: needs.check_changes.outputs.sycl_changed == 'true'
name: Run all kernels (CPU)
if: needs.diff.outputs.sycl_changed == 'true'
steps:
- uses: actions/checkout@v3

- uses: actions/checkout@v4
- name: Install OneAPI
uses: rscohn2/setup-oneapi@v0
with:
Expand All @@ -65,11 +62,11 @@ jobs:
printenv >> $GITHUB_ENV
- name: Build kernels (CPU)
run: |
run: |
cd dev/sycl
make CC=icx
- name: Run kernels (CPU)
run: |
cd dev/sycl
make run_all CC=icx
make run_all CC=icx
27 changes: 13 additions & 14 deletions .github/workflows/ci-train-gpu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,25 @@ name: GPU Train and Test
on: [push, pull_request]

jobs:
check_changes:
diff:
runs-on: ubuntu-latest
outputs:
relevant_changed: ${{ steps.check_relevant_changes.outputs.relevant_changed }}
relevant_changes: ${{ steps.filter.outputs.relevant_changes }}
steps:
- uses: actions/checkout@v4

- name: Check if train_* or test_* files changed
id: check_relevant_changes
run: |
if git diff --name-only ${{ github.event.before }} ${{ github.sha }} | grep -E '^(train_|test_)'; then
echo "::set-output name=relevant_changed::true"
else
echo "::set-output name=relevant_changed::false"
fi
- uses: dorny/paths-filter@v3
id: filter
with:
base: "main"
filters: |
relevant_changes:
- 'train_*'
- 'test_*'
train-and-test-gpu:
needs: check_changes
needs: diff
runs-on: devcloud # self-hosted GPU runner on Intel devcloud
if: needs.check_changes.outputs.relevant_changed == 'true'
if: needs.diff.outputs.relevant_changes == 'true'
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand All @@ -42,4 +41,4 @@ jobs:
- name: Test model fp32
run: |
./test_gpt2_fp32
./test_gpt2_fp32

0 comments on commit 0210326

Please sign in to comment.