Skip to content

Commit e4fcfc0

Browse files
authored
[CI] Let workflows run on ARC runners (#48)
1 parent d2fed95 commit e4fcfc0

File tree

5 files changed

+21
-54
lines changed

5 files changed

+21
-54
lines changed

.github/workflows/_ascend_npu_benchmark.yml

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -41,18 +41,6 @@ jobs:
4141
runs-on: ${{ inputs.runner }}
4242
container:
4343
image: ${{ inputs.image }}
44-
volumes:
45-
- /usr/local/dcmi:/usr/local/dcmi
46-
- /usr/local/bin/npu-smi:/usr/local/bin/npu-smi
47-
- /usr/local/Ascend/driver/lib64/:/usr/local/Ascend/driver/lib64/
48-
- /usr/local/Ascend/driver/version.info:/usr/local/Ascend/driver/version.info
49-
- /etc/ascend_install.info:/etc/ascend_install.info
50-
options: >-
51-
--network host
52-
--device ${{ inputs.device }}
53-
--device /dev/davinci_manager
54-
--device /dev/devmm_svm
55-
--device /dev/hisi_hdc
5644
env:
5745
HF_ENDPOINT: https://hf-mirror.com
5846
steps:
@@ -73,9 +61,11 @@ jobs:
7361
libgl1 libglib2.0-0 libsndfile1
7462
7563
# See: https://github.com/actions/checkout/issues/363#issuecomment-1915075699
64+
# See: https://github.com/hunshcn/gh-proxy/issues/28#issuecomment-773769630
7665
- name: Config git
7766
run: |
7867
git config --global --add safe.directory "$GITHUB_WORKSPACE"
68+
git config --global url."https://gh-proxy.test.osinfra.cn/https://github.com/".insteadOf https://github.com/
7969
8070
- name: Checkout
8171
uses: actions/checkout@v4

.github/workflows/_ascend_npu_build_torch.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,6 @@ jobs:
3939
runs-on: ${{ inputs.runner }}
4040
container:
4141
image: ${{ inputs.image }}
42-
options: >-
43-
--network host
4442
outputs:
4543
dist-name: ${{ steps.list-dist.outputs.dist-name }}
4644
steps:
@@ -55,9 +53,11 @@ jobs:
5553
apt-get install -y git gcc g++ make cmake ninja-build
5654
5755
# See: https://github.com/actions/checkout/issues/363#issuecomment-1915075699
56+
# See: https://github.com/hunshcn/gh-proxy/issues/28#issuecomment-773769630
5857
- name: Config git
5958
run: |
6059
git config --global --add safe.directory "$GITHUB_WORKSPACE"
60+
git config --global url."https://gh-proxy.test.osinfra.cn/https://github.com/".insteadOf https://github.com/
6161
6262
- name: Checkout PyTorch
6363
uses: actions/checkout@v4
@@ -81,6 +81,8 @@ jobs:
8181
working-directory: pytorch
8282
run: |
8383
python setup.py build bdist_wheel
84+
env:
85+
MAX_JOBS: 8
8486

8587
- name: List distribution package
8688
id: list-dist

.github/workflows/_ascend_npu_build_torch_npu.yml

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -37,18 +37,6 @@ jobs:
3737
runs-on: ${{ inputs.runner }}
3838
container:
3939
image: ${{ inputs.image }}
40-
volumes:
41-
- /usr/local/dcmi:/usr/local/dcmi
42-
- /usr/local/bin/npu-smi:/usr/local/bin/npu-smi
43-
- /usr/local/Ascend/driver/lib64/:/usr/local/Ascend/driver/lib64/
44-
- /usr/local/Ascend/driver/version.info:/usr/local/Ascend/driver/version.info
45-
- /etc/ascend_install.info:/etc/ascend_install.info
46-
options: >-
47-
--network host
48-
--device ${{ inputs.device }}
49-
--device /dev/davinci_manager
50-
--device /dev/devmm_svm
51-
--device /dev/hisi_hdc
5240
outputs:
5341
dist-name: ${{ steps.list-dist.outputs.dist-name }}
5442
steps:
@@ -63,21 +51,19 @@ jobs:
6351
apt-get install -y git gcc g++ make cmake ninja-build
6452
6553
# See: https://github.com/actions/checkout/issues/363#issuecomment-1915075699
54+
# See: https://github.com/hunshcn/gh-proxy/issues/28#issuecomment-773769630
6655
- name: Config git
6756
run: |
6857
git config --global --add safe.directory "$GITHUB_WORKSPACE"
58+
git config --global url."https://gh-proxy.test.osinfra.cn/https://github.com/".insteadOf https://github.com/
6959
7060
- name: Checkout
7161
uses: actions/checkout@v4
7262

7363
- name: Checkout torch_npu
7464
uses: actions/checkout@v4
7565
with:
76-
# TODO(shink): Use Ascend/pytorch once this pr merged:
77-
# https://gitee.com/ascend/pytorch/pulls/12854
78-
# repository: Ascend/pytorch
79-
repository: shink/torchnpu
80-
ref: feat/autoload
66+
repository: Ascend/pytorch
8167
submodules: recursive
8268
path: torch_npu
8369

@@ -118,6 +104,7 @@ jobs:
118104
bash ci/build.sh --python=${{ steps.list-py-version.outputs.py-version }}
119105
env:
120106
_GLIBCXX_USE_CXX11_ABI: 1 # https://gitee.com/ascend/pytorch/issues/IBJFZY
107+
MAX_JOBS: 8
121108

122109
- name: List distribution package
123110
id: list-dist

.github/workflows/_ascend_npu_ut.yml

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -37,18 +37,6 @@ jobs:
3737
runs-on: ${{ inputs.runner }}
3838
container:
3939
image: ${{ inputs.image }}
40-
volumes:
41-
- /usr/local/dcmi:/usr/local/dcmi
42-
- /usr/local/bin/npu-smi:/usr/local/bin/npu-smi
43-
- /usr/local/Ascend/driver/lib64/:/usr/local/Ascend/driver/lib64/
44-
- /usr/local/Ascend/driver/version.info:/usr/local/Ascend/driver/version.info
45-
- /etc/ascend_install.info:/etc/ascend_install.info
46-
options: >-
47-
--network host
48-
--device ${{ inputs.device }}
49-
--device /dev/davinci_manager
50-
--device /dev/devmm_svm
51-
--device /dev/hisi_hdc
5240
steps:
5341
- name: Show NPU info
5442
run: |
@@ -65,21 +53,19 @@ jobs:
6553
apt-get install -y git gcc g++ make cmake ninja-build
6654
6755
# See: https://github.com/actions/checkout/issues/363#issuecomment-1915075699
56+
# See: https://github.com/hunshcn/gh-proxy/issues/28#issuecomment-773769630
6857
- name: Config git
6958
run: |
7059
git config --global --add safe.directory "$GITHUB_WORKSPACE"
60+
git config --global url."https://gh-proxy.test.osinfra.cn/https://github.com/".insteadOf https://github.com/
7161
7262
- name: Checkout
7363
uses: actions/checkout@v4
7464

7565
- name: Checkout torch_npu
7666
uses: actions/checkout@v4
7767
with:
78-
# TODO(shink): Use Ascend/pytorch once this pr merged:
79-
# https://gitee.com/ascend/pytorch/pulls/12854
80-
# repository: Ascend/pytorch
81-
repository: shink/torchnpu
82-
ref: feat/autoload
68+
repository: Ascend/pytorch
8369
path: torch_npu
8470

8571
- name: Install pip dependencies

.github/workflows/ascend_npu_test.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,17 +40,19 @@ on:
4040
required: true
4141
type: choice
4242
options:
43-
- self-hosted
4443
- npu-arm64
45-
default: 'self-hosted'
44+
- linux-arm64-npu-0
45+
- linux-arm64-npu-1
46+
- linux-arm64-npu-2
47+
- linux-arm64-npu-4
48+
default: 'linux-arm64-npu-1'
4649
description: 'The runner selected to run on'
4750
image:
4851
required: true
4952
type: choice
5053
options:
51-
- ascendai/cann:7.1-openeuler2203sp2
52-
- ascendai/cann:8.0.rc2.alpha003-910b-ubuntu22.04-py3.9
53-
- ascendai/cann:8.0.rc3.alpha002-910b-ubuntu22.04-py3.9
54+
- ascendai/cann:7.0.1-910b-ubuntu22.04-py3.8
55+
- ascendai/cann:8.0.0-910b-ubuntu22.04-py3.10
5456
- ascendai/cann:latest
5557
default: 'ascendai/cann:latest'
5658
description: 'The docker image which will be loaded'
@@ -95,7 +97,7 @@ jobs:
9597
- name: Set environment params
9698
id: set-env
9799
run: |
98-
echo "runner=${{ github.event.inputs.runner || 'self-hosted' }}" >> $GITHUB_OUTPUT
100+
echo "runner=${{ github.event.inputs.runner || 'linux-arm64-npu-1' }}" >> $GITHUB_OUTPUT
99101
echo "device=${{ github.event.inputs.device || '/dev/davinci5' }}" >> $GITHUB_OUTPUT
100102
echo "image=${{ github.event.inputs.image || 'ascendai/cann:latest' }}" >> $GITHUB_OUTPUT
101103

0 commit comments

Comments
 (0)