-
Notifications
You must be signed in to change notification settings - Fork 29
58 lines (55 loc) · 2.32 KB
/
_runs-on-ascend.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: runs on ascend
on:
workflow_call:
inputs:
machine:
description: If set to other value, the job need ssh
type: string
required: false
default: "ASCEND"
runner:
description: Set up the build environment
type: string
required: false
default: "dicp-ascend-ci-910b"
jobs:
checkout_code:
name: checkout code
runs-on: ${{ inputs.runner }}
steps:
- name: Checkout Code
uses: DeepLink-org/deeplink.framework/.github/actions/checkout-code@main
build_test:
runs-on: ${{ inputs.runner }}
needs: checkout_code
steps:
- name: build and test on ascend
uses: DeepLink-org/deeplink.framework/.github/actions/code-build-test@main
with:
build_shell: "
source dicp/scripts/ci/ascend/dipu_env.sh && \
rm -rf /tmp/dicp_ascend/* && \
cd /mnt/cache/share/deeplinkci/dicp_env/transformers && \
pip uninstall transformers -y && \
patch -p1 < modeling_llama.diff && patch -p1 < utils.diff && \
python setup.py clean && \
python setup.py install --user && \
patch -R -p1 < modeling_llama.diff && patch -R -p1 < utils.diff && \
cd - && \
cd /mnt/cache/share/deeplinkci/dicp_env/accelerate && \
pip uninstall accelerate -y && \
python setup.py clean && \
python setup.py install --user && \
cd - && \
pip uninstall torch_dipu -y && \
pip uninstall dicp -y && \
cd dipu && python setup.py clean && python setup.py install --user && \
cd ../dicp && python setup.py clean && python setup.py install --user && \
source scripts/ci/ascend/test_env.sh /mnt/cache/share/deeplinkci/dicp_env/llama_models && \
export TEST_DIR=$(pwd)/test && echo ${TEST_DIR} && \
bash ${TEST_DIR}/ascend_scripts/ops/run_test_ops.sh false && \
bash ${TEST_DIR}/ascend_scripts/models/run_test_models.sh false
" #Write the script you want to execute here,If you don't know which parameters to fill in, you can refer to the actions/code-build-test
job_name: "build_test"
cover_job: "0"
cleaner: "clean_all_if_error"