Skip to content

ci: run actions only on code changes #12

ci: run actions only on code changes

ci: run actions only on code changes #12

Workflow file for this run

name: GPU Train and Test
on: [push, pull_request]
jobs:
diff:
runs-on: ubuntu-latest
outputs:
train_test_changed: ${{ steps.filter.outputs.train_test_changed }}
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
train_test_changed:
- 'train_*'
- 'test_*'
train-and-test-gpu:
needs: diff
runs-on: devcloud # self-hosted GPU runner on Intel devcloud
if: needs.diff.outputs.train_test_changed == 'true'
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Download starter pack (initial weights)
run: |
chmod u+x ./download_starter_pack.sh
./download_starter_pack.sh
- name: Compile training and testing program
run: |
make train_gpt2_fp32 test_gpt2_fp32
- name: Train model fp32
run: |
./train_gpt2_fp32
- name: Test model fp32
run: |
./test_gpt2_fp32