Skip to content

Commit

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

jobs:
check_changes:
runs-on: ubuntu-latest
outputs:
sycl_changed: ${{ steps.check_sycl_changes.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
gpu:
needs: check_changes
runs-on: devcloud # self-hosted GPU runner on Intel devcloud
if: needs.check_changes.outputs.sycl_changed == 'true'
name: Run all kernels (GPU)
steps:
- uses: actions/checkout@v3

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

- name: Install OneAPI
uses: rscohn2/setup-oneapi@v0
with:
Expand All @@ -44,7 +65,7 @@ jobs:
printenv >> $GITHUB_ENV
- name: Build kernels (CPU)
run: |
run: |
cd dev/sycl
make CC=icx
Expand Down
21 changes: 19 additions & 2 deletions .github/workflows/ci-train-gpu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,26 @@ name: GPU Train and Test
on: [push, pull_request]

jobs:
check_changes:
runs-on: ubuntu-latest
outputs:
relevant_changed: ${{ steps.check_relevant_changes.outputs.relevant_changed }}
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
train-and-test-gpu:
needs: check_changes
runs-on: devcloud # self-hosted GPU runner on Intel devcloud

if: needs.check_changes.outputs.relevant_changed == 'true'
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand All @@ -25,4 +42,4 @@ jobs:
- name: Test model fp32
run: |
./test_gpt2_fp32
./test_gpt2_fp32

0 comments on commit c891757

Please sign in to comment.