Skip to content

Commit f30ab00

Browse files
committed
use benchmark configuration
1 parent d2fed95 commit f30ab00

File tree

5 files changed

+20
-30
lines changed

5 files changed

+20
-30
lines changed

.github/workflows/_ascend_npu_benchmark.yml

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,11 @@ jobs:
127127
run: |
128128
pip install ${{ inputs.torch-npu-artifact }}
129129
130+
- name: Install torchvision and torchaudio
131+
run: |
132+
# pip install --pre torchvision torchaudio --no-deps --index-url https://download.pytorch.org/whl/nightly/cpu
133+
pip install --pre torchvision torchaudio --no-deps --index-url https://download.pytorch.org/whl/test/cpu
134+
130135
- name: Install benchmark dependencies
131136
run: |
132137
pip install -r benchmark/requirements.txt \
@@ -137,20 +142,13 @@ jobs:
137142
run: |
138143
python benchmark/install.py --userbenchmark test_bench --continue_on_fail
139144
140-
- name: Install nightly torchvision and torchaudio
141-
run: |
142-
pip install --pre torchvision torchaudio --no-deps --index-url https://download.pytorch.org/whl/nightly/cpu
143-
144145
- name: Install project dependencies
145146
run: |
146147
pip install -r requirements.txt
147148
148-
- name: Show environment info
149+
- name: List installed python packages
150+
if: ${{ always() }}
149151
run: |
150-
npu_is_available=$(python -c "import torch; print(torch.npu.is_available())")
151-
npu_count=$(python -c "import torch; print(torch.npu.device_count())")
152-
echo "NPU is available: ${npu_is_available}"
153-
echo "NPU count: ${npu_count}"
154152
pip list | grep -E 'torch|numpy'
155153
156154
- name: Run benchmarks
@@ -166,7 +164,7 @@ jobs:
166164
name: ascend_npu_benchmark.json
167165
path: benchmark/ascend_npu_benchmark.json
168166
if-no-files-found: error
169-
retention-days: 1
167+
retention-days: 3
170168
overwrite: true
171169

172170
- name: Write to workflow job summary

.github/workflows/_ascend_npu_build_torch_npu.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,7 @@ jobs:
7373
- name: Checkout torch_npu
7474
uses: actions/checkout@v4
7575
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
76+
repository: Ascend/pytorch
8177
submodules: recursive
8278
path: torch_npu
8379

.github/workflows/_ascend_npu_ut.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,7 @@ jobs:
7575
- name: Checkout torch_npu
7676
uses: actions/checkout@v4
7777
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
78+
repository: Ascend/pytorch
8379
path: torch_npu
8480

8581
- name: Install pip dependencies

ascend_npu/matadata.yml

Lines changed: 0 additions & 10 deletions
This file was deleted.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
device: "npu"
2+
backend_extension: "torch_npu"
3+
link: https://github.com/Ascend/pytorch
4+
models:
5+
- model: BERT_pytorch
6+
tests: [ "eval" ]
7+
batch_size: 1
8+
9+
- model: yolov3
10+
skip: true

0 commit comments

Comments
 (0)