mirror of https://github.com/hpcaitech/ColossalAI
parent
121d7ad629
commit
5bbab1533a
|
@ -58,7 +58,7 @@ jobs:
|
||||||
container:
|
container:
|
||||||
image: hpcaitech/pytorch-cuda:2.1.0-12.1.0
|
image: hpcaitech/pytorch-cuda:2.1.0-12.1.0
|
||||||
options: --gpus all --rm
|
options: --gpus all --rm
|
||||||
timeout-minutes: 20
|
timeout-minutes: 30
|
||||||
defaults:
|
defaults:
|
||||||
run:
|
run:
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
|
@ -8,6 +8,7 @@ on:
|
||||||
# any change in the examples folder will trigger check for the corresponding example.
|
# any change in the examples folder will trigger check for the corresponding example.
|
||||||
paths:
|
paths:
|
||||||
- "examples/**"
|
- "examples/**"
|
||||||
|
- "!examples/**.md"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
# This is for changed example files detect and output a matrix containing all the corresponding directory name.
|
# This is for changed example files detect and output a matrix containing all the corresponding directory name.
|
||||||
|
@ -19,6 +20,7 @@ jobs:
|
||||||
outputs:
|
outputs:
|
||||||
matrix: ${{ steps.setup-matrix.outputs.matrix }}
|
matrix: ${{ steps.setup-matrix.outputs.matrix }}
|
||||||
anyChanged: ${{ steps.setup-matrix.outputs.anyChanged }}
|
anyChanged: ${{ steps.setup-matrix.outputs.anyChanged }}
|
||||||
|
anyExtensionFileChanged: ${{ steps.find-extension-change.outputs.any_changed }}
|
||||||
name: Detect changed example files
|
name: Detect changed example files
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-detect-change
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-detect-change
|
||||||
|
@ -37,6 +39,16 @@ jobs:
|
||||||
echo $commonCommit
|
echo $commonCommit
|
||||||
echo "baseSHA=$commonCommit" >> $GITHUB_OUTPUT
|
echo "baseSHA=$commonCommit" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: Find the changed extension-related files
|
||||||
|
id: find-extension-change
|
||||||
|
uses: tj-actions/changed-files@v35
|
||||||
|
with:
|
||||||
|
base_sha: ${{ steps.locate-base-sha.outputs.baseSHA }}
|
||||||
|
files: |
|
||||||
|
op_builder/**
|
||||||
|
colossalai/kernel/**
|
||||||
|
setup.py
|
||||||
|
|
||||||
- name: Get all changed example files
|
- name: Get all changed example files
|
||||||
id: changed-files
|
id: changed-files
|
||||||
uses: tj-actions/changed-files@v35
|
uses: tj-actions/changed-files@v35
|
||||||
|
@ -79,17 +91,28 @@ jobs:
|
||||||
container:
|
container:
|
||||||
image: hpcaitech/pytorch-cuda:2.1.0-12.1.0
|
image: hpcaitech/pytorch-cuda:2.1.0-12.1.0
|
||||||
options: --gpus all --rm -v /data/scratch/examples-data:/data/ -v /dev/shm
|
options: --gpus all --rm -v /data/scratch/examples-data:/data/ -v /dev/shm
|
||||||
timeout-minutes: 20
|
timeout-minutes: 30
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-run-example-${{ matrix.directory }}
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-run-example-${{ matrix.directory }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Restore Colossal-AI Cache
|
||||||
|
if: needs.detect.outputs.anyExtensionFileChanged != 'true'
|
||||||
|
run: |
|
||||||
|
if [ -d /github/home/cuda_ext_cache ] && [ ! -z "$(ls -A /github/home/cuda_ext_cache/)" ]; then
|
||||||
|
cp -p -r /github/home/cuda_ext_cache/* /__w/ColossalAI/ColossalAI/
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Install Colossal-AI
|
- name: Install Colossal-AI
|
||||||
run: |
|
run: |
|
||||||
BUILD_EXT=1 pip install -v .
|
BUILD_EXT=1 pip install -v .
|
||||||
|
|
||||||
|
- name: Store Colossal-AI Cache
|
||||||
|
run: |
|
||||||
|
cp -p -r /__w/ColossalAI/ColossalAI/build /github/home/cuda_ext_cache/
|
||||||
|
|
||||||
- name: Test the example
|
- name: Test the example
|
||||||
run: |
|
run: |
|
||||||
example_dir=${{ matrix.directory }}
|
example_dir=${{ matrix.directory }}
|
||||||
|
|
|
@ -36,7 +36,7 @@ jobs:
|
||||||
container:
|
container:
|
||||||
image: hpcaitech/pytorch-cuda:2.1.0-12.1.0
|
image: hpcaitech/pytorch-cuda:2.1.0-12.1.0
|
||||||
options: --gpus all --rm -v /data/scratch/examples-data:/data/ -v /dev/shm
|
options: --gpus all --rm -v /data/scratch/examples-data:/data/ -v /dev/shm
|
||||||
timeout-minutes: 10
|
timeout-minutes: 30
|
||||||
steps:
|
steps:
|
||||||
- name: 📚 Checkout
|
- name: 📚 Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
Loading…
Reference in New Issue