Skip to content

Commit 166c89f

Browse files
authored
[CI] Upload changed README.md (#4)
1 parent 427de92 commit 166c89f

File tree

7 files changed

+108
-82
lines changed

7 files changed

+108
-82
lines changed

.github/workflows/_ascend_npu_benchmark.yml

Lines changed: 40 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,31 @@
1-
name: '_ascend_npu_benchmark'
1+
name: "_ascend_npu_benchmark"
22

33
on:
44
workflow_call:
55
inputs:
66
runner:
77
required: true
88
type: string
9-
description: 'The runner selected to run on'
9+
description: "The runner selected to run on"
1010
image:
1111
required: true
1212
type: string
13-
description: 'The docker image which will be loaded'
13+
description: "The docker image which will be loaded"
1414
device:
1515
required: true
1616
type: string
17-
description: 'The device selected to run on'
17+
description: "The device selected to run on"
1818
torch-artifact:
1919
required: false
2020
type: string
21-
description: 'The distribution artifact name of torch'
21+
description: "The distribution artifact name of torch"
2222
torch-npu-artifact:
2323
required: true
2424
type: string
25-
description: 'The distribution artifact name of torch_npu'
25+
description: "The distribution artifact name of torch_npu"
2626
secrets:
2727
pr-token:
28-
description: 'A token used to create a pull request'
28+
description: "A token used to create a pull request"
2929
required: true
3030

3131
# Bash shells do not use ~/.profile or ~/.bashrc so these shells need to be explicitly
@@ -36,13 +36,16 @@ defaults:
3636
shell: bash -el {0}
3737

3838
jobs:
39-
test:
39+
benchmark:
4040
name: run benchmarks for torch_npu
4141
runs-on: ${{ inputs.runner }}
4242
container:
4343
image: ${{ inputs.image }}
4444
env:
4545
HF_ENDPOINT: https://hf-mirror.com
46+
outputs:
47+
changed: ${{ steps.update-readme.outputs.changed }}
48+
report-url: ${{ steps.upload-report.outputs.artifact-url }}
4649
steps:
4750
- name: Show NPU info
4851
run: |
@@ -176,19 +179,42 @@ jobs:
176179
echo "changed=true" >> $GITHUB_OUTPUT
177180
fi
178181
182+
- name: Upload README.md
183+
if: ${{ steps.update-readme.outputs.changed == 'true' }}
184+
id: upload-readme
185+
uses: actions/upload-artifact@v4
186+
with:
187+
name: README.md
188+
path: README.md
189+
if-no-files-found: error
190+
retention-days: 1
191+
overwrite: true
192+
193+
create-pr:
194+
if: ${{ needs.benchmark.outputs.changed == 'true' }}
195+
name: Create a pull request for changes to README.md
196+
runs-on: ubuntu-latest
197+
needs:
198+
- benchmark
199+
steps:
200+
- name: Checkout
201+
uses: actions/checkout@v4
202+
203+
- name: Download README.md
204+
uses: actions/download-artifact@v4
205+
with:
206+
name: README.md
207+
179208
# See: https://github.com/peter-evans/create-pull-request
180209
- name: Create a pull request for changes to README.md
181-
if: ${{ steps.update-readme.outputs.changed == 'true' }}
182210
uses: peter-evans/create-pull-request@v7
183211
with:
184212
token: ${{ secrets.pr-token }}
185213
base: ${{ github.head_ref }}
186-
committer: 'cosdt-bot <[email protected]>'
187-
author: 'cosdt-bot <[email protected]>'
188-
commit-message: 'Update torchbenchmark report in README.md'
214+
commit-message: "Update torchbenchmark report in README.md"
189215
add-paths: README.md
190216
branch: ascend-npu/benchmark
191-
title: '[Ascend NPU] Update torchbenchmark report in README.md'
217+
title: "[Ascend NPU] Update torchbenchmark report in README.md"
192218
body: |
193219
The torchbenchmark results running on Ascend NPU have changed, I'm updating the report in README.md.
194220
@@ -198,7 +224,7 @@ jobs:
198224
- [Torchbenchmark report][2] (click to download)
199225
200226
[1]: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
201-
[2]: ${{ steps.upload-report.outputs.artifact-url }}
227+
[2]: ${{ needs.benchmark.outputs.report-url }}
202228
203229
cc: @Yikun @hipudding @FFFrog @Zhenbin-8 @zeshengzong @wjunLu @MengqingCao @shink
204230
reviewers: shink

.github/workflows/_ascend_npu_build_torch.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
1-
name: '_ascend_npu_build_torch'
1+
name: "_ascend_npu_build_torch"
22

33
on:
44
workflow_call:
55
inputs:
66
runner:
77
required: true
88
type: string
9-
description: 'The runner selected to run on'
9+
description: "The runner selected to run on"
1010
image:
1111
required: true
1212
type: string
13-
description: 'The docker image which will be used to build'
13+
description: "The docker image which will be used to build"
1414
pr-number:
1515
required: false
1616
type: string
17-
default: ''
18-
description: 'The number of pull request'
17+
default: ""
18+
description: "The number of pull request"
1919
ref:
2020
required: false
2121
type: string
22-
default: 'refs/heads/main'
23-
description: 'The branch, tag or SHA to checkout'
22+
default: "refs/heads/main"
23+
description: "The branch, tag or SHA to checkout"
2424
outputs:
2525
torch-artifact:
26-
description: 'The distribution artifact name of torch'
26+
description: "The distribution artifact name of torch"
2727
value: ${{ jobs.build.outputs.dist-name }}
2828

2929
# Bash shells do not use ~/.profile or ~/.bashrc so these shells need to be explicitly

.github/workflows/_ascend_npu_build_torch_npu.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
1-
name: '_ascend_npu_build'
1+
name: "_ascend_npu_build"
22

33
on:
44
workflow_call:
55
inputs:
66
runner:
77
required: true
88
type: string
9-
description: 'The runner selected to run on'
9+
description: "The runner selected to run on"
1010
image:
1111
required: true
1212
type: string
13-
description: 'The docker image which will be used to build'
13+
description: "The docker image which will be used to build"
1414
device:
1515
required: true
1616
type: string
17-
description: 'The device selected to run on'
17+
description: "The device selected to run on"
1818
torch-artifact:
1919
required: false
2020
type: string
21-
description: 'The distribution artifact name of torch'
21+
description: "The distribution artifact name of torch"
2222
outputs:
2323
torch-npu-artifact:
24-
description: 'The distribution artifact name of torch_npu'
24+
description: "The distribution artifact name of torch_npu"
2525
value: ${{ jobs.build.outputs.dist-name }}
2626

2727
# Bash shells do not use ~/.profile or ~/.bashrc so these shells need to be explicitly

.github/workflows/_ascend_npu_ut.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
1-
name: '_ascend_npu_ut'
1+
name: "_ascend_npu_ut"
22

33
on:
44
workflow_call:
55
inputs:
66
runner:
77
required: true
88
type: string
9-
description: 'The runner selected to run on'
9+
description: "The runner selected to run on"
1010
image:
1111
required: true
1212
type: string
13-
description: 'The docker image which will be loaded'
13+
description: "The docker image which will be loaded"
1414
device:
1515
required: true
1616
type: string
17-
description: 'The device selected to run on'
17+
description: "The device selected to run on"
1818
torch-artifact:
1919
required: false
2020
type: string
21-
description: 'The distribution artifact name of torch'
21+
description: "The distribution artifact name of torch"
2222
torch-npu-artifact:
2323
required: true
2424
type: string
25-
description: 'The distribution artifact name of torch_npu'
25+
description: "The distribution artifact name of torch_npu"
2626

2727
# Bash shells do not use ~/.profile or ~/.bashrc so these shells need to be explicitly
2828
# declared as "shell: bash -el {0}" on steps that need to be properly activated.

.github/workflows/ascend_npu_test.yml

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,37 @@
1-
name: 'Ascend NPU Test Suite'
1+
name: "Ascend NPU Test Suite"
22

33
on:
44
push:
55
branches:
6-
- 'main'
6+
- "main"
77
paths:
8-
- '.github/workflows/ascend_npu_test.yml'
9-
- '.github/workflows/_ascend_npu_build_torch.yml'
10-
- '.github/workflows/_ascend_npu_build_torch_npu.yml'
11-
- '.github/workflows/_ascend_npu_ut.yml'
12-
- '.github/workflows/_ascend_npu_benchmark.yml'
13-
- '.ci/**'
14-
- 'ascend_npu/**'
15-
- 'src/**'
16-
- '!**/*.md'
8+
- ".github/workflows/ascend_npu_test.yml"
9+
- ".github/workflows/_ascend_npu_build_torch.yml"
10+
- ".github/workflows/_ascend_npu_build_torch_npu.yml"
11+
- ".github/workflows/_ascend_npu_ut.yml"
12+
- ".github/workflows/_ascend_npu_benchmark.yml"
13+
- ".ci/**"
14+
- "ascend_npu/**"
15+
- "src/**"
16+
- "!**/*.md"
1717
pull_request:
1818
branches:
19-
- 'main'
19+
- "main"
2020
paths:
21-
- '.github/workflows/ascend_npu_test.yml'
22-
- '.github/workflows/_ascend_npu_build_torch.yml'
23-
- '.github/workflows/_ascend_npu_build_torch_npu.yml'
24-
- '.github/workflows/_ascend_npu_ut.yml'
25-
- '.github/workflows/_ascend_npu_benchmark.yml'
26-
- '.ci/**'
27-
- 'ascend_npu/**'
28-
- 'src/**'
29-
- '!**/*.md'
21+
- ".github/workflows/ascend_npu_test.yml"
22+
- ".github/workflows/_ascend_npu_build_torch.yml"
23+
- ".github/workflows/_ascend_npu_build_torch_npu.yml"
24+
- ".github/workflows/_ascend_npu_ut.yml"
25+
- ".github/workflows/_ascend_npu_benchmark.yml"
26+
- ".ci/**"
27+
- "ascend_npu/**"
28+
- "src/**"
29+
- "!**/*.md"
3030
release:
3131
types:
32-
- 'published'
32+
- "published"
3333
schedule:
34-
- cron: '0 12 * * *'
34+
- cron: "0 12 * * *"
3535
repository_dispatch:
3636
types: [pytorch-pr-event-redispatch]
3737
workflow_dispatch:
@@ -45,17 +45,17 @@ on:
4545
- linux-arm64-npu-1
4646
- linux-arm64-npu-2
4747
- linux-arm64-npu-4
48-
default: 'linux-arm64-npu-1'
49-
description: 'The runner selected to run on'
48+
default: "linux-arm64-npu-1"
49+
description: "The runner selected to run on"
5050
image:
5151
required: true
5252
type: choice
5353
options:
5454
- ascendai/cann:7.0.1-910b-ubuntu22.04-py3.8
5555
- ascendai/cann:8.0.0-910b-ubuntu22.04-py3.10
5656
- ascendai/cann:latest
57-
default: 'ascendai/cann:latest'
58-
description: 'The docker image which will be loaded'
57+
default: "ascendai/cann:latest"
58+
description: "The docker image which will be loaded"
5959
device:
6060
required: true
6161
type: choice
@@ -68,8 +68,8 @@ on:
6868
- /dev/davinci6
6969
- /dev/davinci7
7070
- /dev/davinci8
71-
default: '/dev/davinci5'
72-
description: 'The device selected to run on'
71+
default: "/dev/davinci5"
72+
description: "The device selected to run on"
7373

7474
# Only cancel the previous runs when triggered by a pull_request event
7575
#
@@ -168,5 +168,5 @@ jobs:
168168
device: ${{ needs.prepare.outputs.device }}
169169
torch-artifact: ${{ needs.build-torch.outputs.torch-artifact }}
170170
torch-npu-artifact: ${{ needs.build.outputs.torch-npu-artifact }}
171-
secrets:
172-
pr-token: ${{ secrets.COSDT_BOT_TOKEN }}
171+
# secrets:
172+
# pr-token: ${{ secrets.COSDT_BOT_TOKEN }}

.github/workflows/dispatch-event.yml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,35 @@
1-
name: 'Dispatch PyTorch events'
1+
name: "Dispatch PyTorch events"
22

33
on:
44
schedule:
5-
- cron: '0 12 * * *'
5+
- cron: "0 12 * * *"
66

77
pull_request:
88
branches:
9-
- 'main'
9+
- "main"
1010
paths:
11-
- '.github/workflows/dispatch-event.yml'
12-
- '.github/workflows/redispatch-event.yml'
13-
- '.github/actions/list-pr/**'
14-
- '!**/*.md'
11+
- ".github/workflows/dispatch-event.yml"
12+
- ".github/workflows/redispatch-event.yml"
13+
- ".github/actions/list-pr/**"
14+
- "!**/*.md"
1515

1616
workflow_dispatch:
1717
inputs:
1818
labels:
1919
required: false
2020
type: string
21-
default: 'module: PrivateUse1'
22-
description: 'The labels on pull requests'
21+
default: "module: PrivateUse1"
22+
description: "The labels on pull requests"
2323
hours:
2424
required: false
2525
type: number
2626
default: 24
27-
description: 'Pull requests created within this many hours will be listed'
27+
description: "Pull requests created within this many hours will be listed"
2828
limit:
2929
required: false
3030
type: number
3131
default: -1
32-
description: 'How many pull requests will be listed'
32+
description: "How many pull requests will be listed"
3333

3434
concurrency:
3535
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}
@@ -50,15 +50,15 @@ jobs:
5050
id: list-pr
5151
uses: ./.github/actions/list-pr
5252
with:
53-
token: ${{ secrets.COSDT_BOT_TOKEN }}
53+
# token: ${{ secrets.COSDT_BOT_TOKEN }}
5454
owner: pytorch
5555
repository: pytorch
5656
labels: "${{ github.event.inputs.labels || 'module: PrivateUse1' }}"
5757
hours: ${{ github.event.inputs.hours || '24' }}
5858

5959
dispatch-pr:
6060
if: ${{ needs.list-pr.outputs.prs != '[]' }}
61-
name: 'Dispatch PR event - #${{ matrix.data.pull_request.number }}'
61+
name: "Dispatch PR event - #${{ matrix.data.pull_request.number }}"
6262
runs-on: ubuntu-latest
6363
needs:
6464
- list-pr
@@ -71,7 +71,7 @@ jobs:
7171
- name: Dispatch PR event to the out-of-tree test infra
7272
uses: peter-evans/repository-dispatch@v3
7373
with:
74-
token: ${{ secrets.COSDT_BOT_TOKEN }}
74+
# token: ${{ secrets.COSDT_BOT_TOKEN }}
7575
repository: pytorch-fdn/oota
7676
event-type: pytorch-pr-event
7777
client-payload: ${{ toJSON(matrix.data) }}

0 commit comments

Comments
 (0)