File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments