Skip to content

Commit 0f7289f

Browse files
committed
wewe
1 parent 74b03a3 commit 0f7289f

File tree

1 file changed

+10
-86
lines changed

1 file changed

+10
-86
lines changed

.github/workflows/ascend_npu_test.yml

Lines changed: 10 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -79,94 +79,18 @@ on:
7979
#
8080
# Doc: https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#concurrency
8181
# Discussion: https://github.com/orgs/community/discussions/5435
82-
concurrency:
83-
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.client_payload.pull_request.number || github.ref }}
84-
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
8582

8683
jobs:
87-
prepare:
88-
name: Prepare
89-
runs-on: ubuntu-latest
90-
outputs:
91-
runner: ${{ steps.set-env.outputs.runner }}
92-
image: ${{ steps.set-env.outputs.image }}
93-
device: ${{ steps.set-env.outputs.device }}
94-
ref: ${{ steps.list-ref.outputs.ref }}
95-
pr-number: ${{ steps.list-ref.outputs.pr_number }}
84+
job_0:
85+
runs-on: linux-arm64-npu-1
86+
container:
87+
image: ascendai/cann:latest
88+
9689
steps:
97-
- name: Set environment params
98-
id: set-env
90+
- name: Show NPU info
9991
run: |
100-
echo "runner=${{ github.event.inputs.runner || 'linux-arm64-npu-1' }}" >> $GITHUB_OUTPUT
101-
echo "device=${{ github.event.inputs.device || '/dev/davinci5' }}" >> $GITHUB_OUTPUT
102-
echo "image=${{ github.event.inputs.image || 'ascendai/cann:latest' }}" >> $GITHUB_OUTPUT
92+
npu-smi info
10393
104-
# TODO(shink): List ghstack PR's ref
105-
- name: List ref to the PyTorch branch
106-
id: list-ref
107-
if: ${{ github.event_name == 'repository_dispatch' }}
108-
run: |
109-
echo "pr_number=${{ github.event.client_payload.pull_request.number }}" >> $GITHUB_OUTPUT
110-
echo "ref=refs/pull/${{ github.event.client_payload.pull_request.number }}/merge" >> $GITHUB_OUTPUT
111-
112-
build-torch:
113-
name: Build torch
114-
needs:
115-
- prepare
116-
if: ${{ needs.prepare.outputs.ref }}
117-
uses: ./.github/workflows/_ascend_npu_build_torch.yml
118-
with:
119-
runner: ${{ needs.prepare.outputs.runner }}
120-
image: ${{ needs.prepare.outputs.image }}
121-
ref: ${{ needs.prepare.outputs.ref }}
122-
pr-number: ${{ needs.prepare.outputs.pr-number }}
123-
124-
build:
125-
name: Build torch_npu
126-
needs:
127-
- prepare
128-
- build-torch
129-
if: ${{ !cancelled() && (success() || needs.build-torch.result == 'skipped') }}
130-
uses: ./.github/workflows/_ascend_npu_build_torch_npu.yml
131-
with:
132-
runner: ${{ needs.prepare.outputs.runner }}
133-
image: ${{ needs.prepare.outputs.image }}
134-
device: ${{ needs.prepare.outputs.device }}
135-
torch-artifact: ${{ needs.build-torch.outputs.torch-artifact }}
136-
137-
test:
138-
name: Test torch_npu
139-
needs:
140-
- prepare
141-
- build-torch
142-
- build
143-
if: |
144-
!cancelled() && github.event_name != 'repository_dispatch' &&
145-
(success() || (needs.build-torch.result == 'skipped' && needs.build.result == 'success'))
146-
uses: ./.github/workflows/_ascend_npu_ut.yml
147-
with:
148-
runner: ${{ needs.prepare.outputs.runner }}
149-
image: ${{ needs.prepare.outputs.image }}
150-
device: ${{ needs.prepare.outputs.device }}
151-
torch-artifact: ${{ needs.build-torch.outputs.torch-artifact }}
152-
torch-npu-artifact: ${{ needs.build.outputs.torch-npu-artifact }}
153-
154-
benchmark:
155-
name: Run benchmarks
156-
needs:
157-
- prepare
158-
- build-torch
159-
- build
160-
- test
161-
if: |
162-
!cancelled() && github.event_name != 'repository_dispatch' &&
163-
(success() || (needs.build-torch.result == 'skipped' && needs.build.result == 'success'))
164-
uses: ./.github/workflows/_ascend_npu_benchmark.yml
165-
with:
166-
runner: ${{ needs.prepare.outputs.runner }}
167-
image: ${{ needs.prepare.outputs.image }}
168-
device: ${{ needs.prepare.outputs.device }}
169-
torch-artifact: ${{ needs.build-torch.outputs.torch-artifact }}
170-
torch-npu-artifact: ${{ needs.build.outputs.torch-npu-artifact }}
171-
secrets:
172-
pr-token: ${{ secrets.COSDT_BOT_TOKEN }}
94+
- name: Sleep
95+
run: sleep 3600
96+

0 commit comments

Comments
 (0)