Skip to content

Commit 201be36

Browse files
committed
update
1 parent 207fc99 commit 201be36

File tree

5 files changed

+64
-36
lines changed

5 files changed

+64
-36
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ description: "Install torch built from the build workflow"
33
inputs:
44
torch-artifact:
55
description: "The distribution artifact name of torch"
6+
type: string
67
required: true
78
outputs:
89
torch-version:

.github/workflows/_ascend_npu_benchmark.yml

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,11 +91,29 @@ jobs:
9191
repository: pytorch/benchmark
9292
path: benchmark
9393

94+
# TODO
95+
#- name: Install torch
96+
# id: install-torch
97+
# uses: ./.github/actions/install-torch
98+
# with:
99+
# torch-artifact: ${{ inputs.torch-artifact }}
100+
101+
- name: Download torch artifact
102+
uses: actions/download-artifact@v4
103+
with:
104+
name: ${{ inputs.torch-artifact }}
105+
94106
- name: Install torch
107+
shell: bash
108+
run: |
109+
pip install ${{ inputs.torch-artifact }}
110+
111+
- name: List torch version
95112
id: install-torch
96-
uses: ./.github/actions/install-torch
97-
with:
98-
torch-artifact: ${{ inputs.torch-artifact }}
113+
shell: bash
114+
run: |
115+
torch_version=$(python -c "import torch; print(torch.__version__)")
116+
echo "torch_version=${torch_version}" >> $GITHUB_OUTPUT
99117
100118
# We must use numpy 1.x
101119
- name: Generate pip's constraint file

.github/workflows/_ascend_npu_build_torch.yml

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -59,33 +59,6 @@ jobs:
5959
run: |
6060
git config --global --add safe.directory "$GITHUB_WORKSPACE"
6161
62-
- name: Show
63-
run: |
64-
set -x
65-
pwd
66-
ls -al
67-
echo ${{ github.workspace }}
68-
echo $GITHUB_WORKSPACE
69-
70-
- name: Checkout
71-
uses: actions/checkout@v4
72-
73-
- name: Show
74-
run: |
75-
set -x
76-
pwd
77-
ls -al
78-
79-
- name: Install torch
80-
id: install-torch
81-
uses: ./.github/actions/install-torch
82-
with:
83-
torch-artifact: xxx
84-
85-
- name: Exit
86-
run: |
87-
exit 1
88-
8962
- name: Checkout PyTorch
9063
uses: actions/checkout@v4
9164
with:

.github/workflows/_ascend_npu_build_torch_npu.yml

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,29 @@ jobs:
7373
submodules: recursive
7474
path: torch_npu
7575

76+
# TODO
77+
#- name: Install torch
78+
# id: install-torch
79+
# uses: ./.github/actions/install-torch
80+
# with:
81+
# torch-artifact: ${{ inputs.torch-artifact }}
82+
83+
- name: Download torch artifact
84+
uses: actions/download-artifact@v4
85+
with:
86+
name: ${{ inputs.torch-artifact }}
87+
7688
- name: Install torch
89+
shell: bash
90+
run: |
91+
pip install ${{ inputs.torch-artifact }}
92+
93+
- name: List torch version
7794
id: install-torch
78-
uses: ./.github/actions/install-torch
79-
with:
80-
torch-artifact: ${{ inputs.torch-artifact }}
95+
shell: bash
96+
run: |
97+
torch_version=$(python -c "import torch; print(torch.__version__)")
98+
echo "torch_version=${torch_version}" >> $GITHUB_OUTPUT
8199
82100
- name: Generate pip's constraint file
83101
working-directory: torch_npu

.github/workflows/_ascend_npu_ut.yml

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

90+
# TODO
91+
#- name: Install torch
92+
# id: install-torch
93+
# uses: ./.github/actions/install-torch
94+
# with:
95+
# torch-artifact: ${{ inputs.torch-artifact }}
96+
97+
- name: Download torch artifact
98+
uses: actions/download-artifact@v4
99+
with:
100+
name: ${{ inputs.torch-artifact }}
101+
90102
- name: Install torch
103+
shell: bash
104+
run: |
105+
pip install ${{ inputs.torch-artifact }}
106+
107+
- name: List torch version
91108
id: install-torch
92-
uses: ./.github/actions/install-torch
93-
with:
94-
torch-artifact: ${{ inputs.torch-artifact }}
109+
shell: bash
110+
run: |
111+
torch_version=$(python -c "import torch; print(torch.__version__)")
112+
echo "torch_version=${torch_version}" >> $GITHUB_OUTPUT
95113
96114
- name: Generate pip's constraint file
97115
working-directory: torch_npu

0 commit comments

Comments
 (0)