Skip to content

Commit ce4a25a

Browse files
committed
update
1 parent b00d855 commit ce4a25a

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

.github/workflows/_ascend_npu_benchmark.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,13 @@ jobs:
108108
run: |
109109
pip install ${{ inputs.torch-artifact }}
110110
111+
- name: List torch version
112+
id: list-torch-version
113+
shell: bash
114+
run: |
115+
torch_version=$(python -c "import torch; print(torch.__version__)")
116+
echo "torch-version=${torch_version}" >> $GITHUB_OUTPUT
117+
111118
- name: Download torch_npu artifact
112119
uses: actions/download-artifact@v4
113120
with:
@@ -121,7 +128,9 @@ jobs:
121128
122129
- name: Install benchmark dependencies
123130
run: |
124-
pip install -r benchmark/requirements.txt numpy==1.*
131+
pip install -r benchmark/requirements.txt \
132+
torch==${{ steps.list-torch-version.outputs.torch-version }} \
133+
numpy==1.*
125134
python benchmark/install.py --userbenchmark test_bench --continue_on_fail
126135
127136
- name: Install project dependencies

.github/workflows/_ascend_npu_ut.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,14 @@ jobs:
122122
run: |
123123
pip install ${{ inputs.torch-npu-artifact }}
124124
125+
- name: Show environment info
126+
run: |
127+
npu_is_available=$(python -c "import torch; print(torch.npu.is_available())")
128+
npu_count=$(python -c "import torch; print(torch.npu.device_count())")
129+
echo "NPU is available: ${npu_is_available}"
130+
echo "NPU count: ${npu_count}"
131+
pip list | grep -E 'torch|numpy'
132+
125133
# TODO(shink): Skip
126134
- name: Do the test
127135
continue-on-error: true

0 commit comments

Comments
 (0)