Skip to content

Commit add7b40

Browse files
committed
tmp
1 parent 758b2b6 commit add7b40

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

.github/workflows/_ascend_npu_build_torch_npu.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ on:
1212
type: string
1313
description: 'The docker image which will be used to build'
1414
torch-artifact:
15-
required: true
15+
required: false
1616
type: string
1717
description: 'The distribution artifact name of torch'
1818
outputs:
@@ -43,6 +43,10 @@ jobs:
4343
outputs:
4444
dist-name: ${{ steps.list-dist.outputs.dist-name }}
4545
steps:
46+
- run: |
47+
echo ${{ inputs.torch-artifact }}
48+
exit 1
49+
4650
- name: Config mirrors
4751
run: |
4852
sed -i 's|ports.ubuntu.com|mirrors.tuna.tsinghua.edu.cn|g' /etc/apt/sources.list

.github/workflows/ascend_npu_test.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,14 +96,15 @@ jobs:
9696
# TODO(shink): List ghstack PR's ref
9797
- name: List ref to the PyTorch branch
9898
id: list-ref
99+
if: ${{ github.event_name == 'repository_dispatch' }}
99100
run: |
100-
# echo "ref=refs/pull/${{ github.event.client_payload.pull_request.number }}/merge" >> $GITHUB_OUTPUT
101-
echo "ref=refs/heads/main" >> $GITHUB_OUTPUT
101+
echo "ref=refs/pull/${{ github.event.client_payload.pull_request.number }}/merge" >> $GITHUB_OUTPUT
102102
103103
build-torch:
104104
name: Build torch
105105
needs:
106106
- prepare
107+
if: ${{ needs.prepare.outputs.ref }}
107108
uses: ./.github/workflows/_ascend_npu_build_torch.yml
108109
with:
109110
runner: ${{ needs.prepare.outputs.runner }}
@@ -119,7 +120,7 @@ jobs:
119120
with:
120121
runner: ${{ needs.prepare.outputs.runner }}
121122
image: ${{ needs.prepare.outputs.image }}
122-
torch-artifact: ${{ needs.build-torch.outputs.torch-artifact }}
123+
torch-artifact: ${{ needs.build-torch.outputs.torch-artifact || null }}
123124

124125
test:
125126
name: Test torch_npu

0 commit comments

Comments
 (0)