Skip to content

Commit b00d855

Browse files
committed
update
1 parent 281e341 commit b00d855

File tree

4 files changed

+19
-69
lines changed

4 files changed

+19
-69
lines changed

.github/actions/install-torch/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,5 @@ runs:
2626
id: list-torch-version
2727
shell: bash
2828
run: |
29-
torch-version=$(python -c "import torch; print(torch.__version__)")
30-
echo "torch-version=${torch-version}" >> $GITHUB_OUTPUT
29+
torch_version=$(python -c "import torch; print(torch.__version__)")
30+
echo "torch-version=${torch_version}" >> $GITHUB_OUTPUT

.github/workflows/_ascend_npu_benchmark.yml

Lines changed: 4 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -108,42 +108,20 @@ jobs:
108108
run: |
109109
pip install ${{ inputs.torch-artifact }}
110110
111-
- name: List torch version
112-
id: install-torch
113-
shell: bash
114-
run: |
115-
torch_version=$(python -c "import torch; print(torch.__version__)")
116-
echo "torch-version=${torch_version}" >> $GITHUB_OUTPUT
117-
118-
# We must use numpy 1.x
119-
- name: Generate pip's constraint file
120-
working-directory: ascend_npu
121-
run: |
122-
cat > constraint.txt << EOF
123-
torch==${{ steps.install-torch.outputs.torch-version }}
124-
numpy==1.*
125-
EOF
126-
127-
- name: Download ${{ inputs.artifact_name }}
111+
- name: Download torch_npu artifact
128112
uses: actions/download-artifact@v4
129113
with:
130-
name: ${{ inputs.artifact_name }}
114+
name: ${{ inputs.torch-npu-artifact }}
131115
path: ascend_npu
132116

133117
- name: Install torch_npu
134118
working-directory: ascend_npu
135119
run: |
136-
pip install ${{ inputs.artifact_name }}
137-
138-
#- name: Install torch_npu dependencies
139-
# working-directory: ascend_npu
140-
# run: |
141-
# curl -fsSL -O https://raw.githubusercontent.com/Ascend/pytorch/refs/heads/master/requirements.txt
142-
# pip install -r requirements.txt
120+
pip install ${{ inputs.torch-npu-artifact }}
143121
144122
- name: Install benchmark dependencies
145123
run: |
146-
pip install -r benchmark/requirements.txt --constraint ascend_npu/constraint.txt
124+
pip install -r benchmark/requirements.txt numpy==1.*
147125
python benchmark/install.py --userbenchmark test_bench --continue_on_fail
148126
149127
- name: Install project dependencies

.github/workflows/_ascend_npu_build_torch_npu.yml

Lines changed: 6 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,12 @@ jobs:
7373
submodules: recursive
7474
path: torch_npu
7575

76+
- name: Install pip dependencies
77+
working-directory: torch_npu
78+
run: |
79+
pip install wheel
80+
pip install -r requirements.txt
81+
7682
# TODO
7783
#- name: Install torch
7884
# id: install-torch
@@ -90,26 +96,6 @@ jobs:
9096
run: |
9197
pip install ${{ inputs.torch-artifact }}
9298
93-
- name: List torch version
94-
id: install-torch
95-
shell: bash
96-
run: |
97-
torch_version=$(python -c "import torch; print(torch.__version__)")
98-
echo "torch-version=${torch_version}" >> $GITHUB_OUTPUT
99-
100-
- name: Generate pip's constraint file
101-
working-directory: torch_npu
102-
run: |
103-
cat > torch-constraint.txt << EOF
104-
torch==${{ steps.install-torch.outputs.torch-version }}
105-
EOF
106-
107-
- name: Install pip dependencies
108-
working-directory: torch_npu
109-
run: |
110-
pip install wheel
111-
pip install -r requirements.txt --constraint torch-constraint.txt
112-
11399
- name: List Python version
114100
id: list-py-version
115101
working-directory: torch_npu

.github/workflows/_ascend_npu_ut.yml

Lines changed: 7 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,13 @@ jobs:
8787
ref: feat/autoload
8888
path: torch_npu
8989

90+
- name: Install pip dependencies
91+
working-directory: torch_npu
92+
run: |
93+
pip install wheel unittest-xml-reporting
94+
pip install -r requirements.txt
95+
pip install -r test/requirements.txt --no-deps
96+
9097
# TODO
9198
#- name: Install torch
9299
# id: install-torch
@@ -104,33 +111,12 @@ jobs:
104111
run: |
105112
pip install ${{ inputs.torch-artifact }}
106113
107-
- name: List torch version
108-
id: install-torch
109-
shell: bash
110-
run: |
111-
torch_version=$(python -c "import torch; print(torch.__version__)")
112-
echo "torch-version=${torch_version}" >> $GITHUB_OUTPUT
113-
114-
- name: Generate pip's constraint file
115-
working-directory: torch_npu
116-
run: |
117-
cat > torch-constraint.txt << EOF
118-
torch==${{ steps.install-torch.outputs.torch-version }}
119-
EOF
120-
121114
- name: Download torch_npu artifact
122115
uses: actions/download-artifact@v4
123116
with:
124117
name: ${{ inputs.torch-npu-artifact }}
125118
path: torch_npu
126119

127-
- name: Install pip dependencies
128-
working-directory: torch_npu
129-
run: |
130-
pip install wheel unittest-xml-reporting
131-
pip install -r requirements.txt --constraint torch-constraint.txt
132-
pip install -r test/requirements.txt --no-deps
133-
134120
- name: Install torch_npu
135121
working-directory: torch_npu
136122
run: |

0 commit comments

Comments
 (0)