[workflow] rebuild cuda kernels when kernel-related files change (#2317)

pull/2318/head
Frank Lee 2023-01-04 17:23:59 +08:00 committed by GitHub
parent db6eea3583
commit e8dfa2e2e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 22 additions and 3 deletions

View File

@ -23,22 +23,37 @@ jobs:
repository: hpcaitech/TensorNVMe
ssh-key: ${{ secrets.SSH_KEY_FOR_CI }}
path: TensorNVMe
- name: Install tensornvme
run: |
cd TensorNVMe
conda install cmake
pip install -r requirements.txt
pip install -v .
- uses: actions/checkout@v2
with:
ssh-key: ${{ secrets.SSH_KEY_FOR_CI }}
- name: Install Colossal-AI
- name: Find the changed files
id: find-changed-files
uses: tj-actions/changed-files@v34
with:
files: |
op_builder/**
colossalai/kernel/**
setup.py
- name: Restore cache
if: steps.find-changed-files.outputs.any_changed != 'true'
run: |
[ ! -z "$(ls -A /github/home/cuda_ext_cache/)" ] && cp -r /github/home/cuda_ext_cache/* /__w/ColossalAI/ColossalAI/
pip install -r requirements/requirements.txt
- name: Install Colossal-AI
run: |
pip install -v -e .
cp -r /__w/ColossalAI/ColossalAI/build /github/home/cuda_ext_cache/
pip install -r requirements/requirements-test.txt
- name: Unit Testing
run: |
PYTHONPATH=$PWD pytest tests
@ -46,3 +61,7 @@ jobs:
DATA: /data/scratch/cifar-10
NCCL_SHM_DISABLE: 1
LD_LIBRARY_PATH: /github/home/.tensornvme/lib:/usr/local/nvidia/lib:/usr/local/nvidia/lib64
- name: Store Cache
run: |
cp -r /__w/ColossalAI/ColossalAI/build /github/home/cuda_ext_cache/