Skip to content

Commit 76438e1

Browse files
committed
update
1 parent d164149 commit 76438e1

File tree

2 files changed

+39
-33
lines changed

2 files changed

+39
-33
lines changed

.github/workflows/_ascend_npu_test.yml

Lines changed: 27 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ jobs:
3939
- /usr/local/Ascend/driver/lib64/:/usr/local/Ascend/driver/lib64/
4040
- /usr/local/Ascend/driver/version.info:/usr/local/Ascend/driver/version.info
4141
- /etc/ascend_install.info:/etc/ascend_install.info
42-
- /home/runner/actions-runner/codes:/root/codes
4342
options: >-
4443
--network host
4544
--device ${{ inputs.device }}
@@ -51,39 +50,46 @@ jobs:
5150
run: |
5251
npu-smi info
5352
54-
- name: Prepare the codes
53+
- name: Install system dependencies
5554
run: |
56-
cp -rf /root/codes /root/build
55+
sed -i 's|ports.ubuntu.com|mirrors.tuna.tsinghua.edu.cn|g' /etc/apt/sources.list
56+
apt update
57+
apt install --no-install-recommends -y git gcc g++ make cmake ninja-build
58+
59+
- name: Checkout
60+
uses: actions/checkout@v4
61+
62+
- name: Checkout torch_npu
63+
uses: actions/checkout@v4
64+
with:
65+
# TODO(shink): Use Ascend/pytorch once this pr merged:
66+
# https://gitee.com/ascend/pytorch/pulls/12854
67+
# repository: Ascend/pytorch
68+
repository: shink/torchnpu
69+
ref: feat/autoload
70+
submodules: recursive
71+
path: torch_npu
5772

5873
- name: Download distribution artifact
5974
uses: actions/download-artifact@v4
6075
with:
6176
name: ${{ inputs.artifact_name }}
62-
path: /root/build
77+
path: torch_npu
6378

64-
- name: Checkout
65-
uses: actions/checkout@v4
66-
67-
- name: Install dependencies
68-
uses: ./.github/actions/dependencies-action
69-
with:
70-
pip_packages: |
71-
- wheel
72-
- unittest-xml-reporting
73-
pip_requirements: |
74-
- /root/build/npu/pytorch/requirements.txt
75-
- /root/build/npu/pytorch/test/requirements.txt --no-deps
79+
- name: Install pip dependencies
80+
working-directory: torch_npu
81+
run: |
82+
pip install wheel unittest-xml-reporting
83+
pip install -r requirements.txt
84+
pip install -r test/requirements.txt --no-deps
7685
7786
- name: Install torch_npu
78-
working-directory: /root/build
87+
working-directory: torch_npu
7988
run: |
8089
pip install ${{ inputs.artifact_name }}
8190
8291
# TODO(shink): Skip
8392
- name: Do the test
8493
continue-on-error: true
85-
working-directory: /root/build
8694
run: |
87-
python npu/pytorch/ci/access_control_test.py
88-
env:
89-
DISABLED_TESTS_FILE: /root/build/npu/pytorch/test/unsupported_test_cases/.pytorch-disabled-tests.json
95+
python torch_npu/ci/access_control_test.py

.github/workflows/ascend_npu_test.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -82,18 +82,18 @@ jobs:
8282
runner: ${{ needs.prepare.outputs.runner }}
8383
image: ${{ needs.prepare.outputs.image }}
8484

85-
# test:
86-
# name: Test torch_npu
87-
# needs:
88-
# - prepare
89-
# - build
90-
# uses: ./.github/workflows/_ascend_npu_test.yml
91-
# with:
92-
# runner: ${{ needs.prepare.outputs.runner }}
93-
# image: ${{ needs.prepare.outputs.image }}
94-
# device: ${{ needs.prepare.outputs.device }}
95-
# artifact_name: ${{ needs.build.outputs.artifact_name }}
96-
#
85+
test:
86+
name: Test torch_npu
87+
needs:
88+
- prepare
89+
- build
90+
uses: ./.github/workflows/_ascend_npu_test.yml
91+
with:
92+
runner: ${{ needs.prepare.outputs.runner }}
93+
image: ${{ needs.prepare.outputs.image }}
94+
device: ${{ needs.prepare.outputs.device }}
95+
artifact_name: ${{ needs.build.outputs.artifact_name }}
96+
9797
# pytorch-examples:
9898
# name: Run models
9999
# needs:

0 commit comments

Comments
 (0)