Skip to content

Commit dd69230

Browse files
authored
Merge branch 'main' into ascend-npu/torchtitan
2 parents e1c26ff + 98c40e7 commit dd69230

File tree

5 files changed

+18
-59
lines changed

5 files changed

+18
-59
lines changed

.github/workflows/_ascend_npu_benchmark.yml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@ on:
1111
required: true
1212
type: string
1313
description: "The docker image which will be loaded"
14-
device:
15-
required: true
16-
type: string
17-
description: "The device selected to run on"
1814
torch-artifact:
1915
required: false
2016
type: string
@@ -28,13 +24,6 @@ on:
2824
description: "A token used to create a pull request"
2925
required: true
3026

31-
# Bash shells do not use ~/.profile or ~/.bashrc so these shells need to be explicitly
32-
# declared as "shell: bash -el {0}" on steps that need to be properly activated.
33-
# It's used to activate ascend-toolkit environment variables.
34-
defaults:
35-
run:
36-
shell: bash -el {0}
37-
3827
jobs:
3928
benchmark:
4029
name: run benchmarks for torch_npu

.github/workflows/_ascend_npu_build_torch.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,6 @@ on:
2626
description: "The distribution artifact name of torch"
2727
value: ${{ jobs.build.outputs.dist-name }}
2828

29-
# Bash shells do not use ~/.profile or ~/.bashrc so these shells need to be explicitly
30-
# declared as "shell: bash -el {0}" on steps that need to be properly activated.
31-
# It's used to activate ascend-toolkit environment variables.
32-
defaults:
33-
run:
34-
shell: bash -el {0}
35-
3629
jobs:
3730
build:
3831
name: build torch for ${{ inputs.pr-number && format('#{0}', inputs.pr-number) || inputs.ref }}

.github/workflows/_ascend_npu_build_torch_npu.yml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@ on:
1111
required: true
1212
type: string
1313
description: "The docker image which will be used to build"
14-
device:
15-
required: true
16-
type: string
17-
description: "The device selected to run on"
1814
torch-artifact:
1915
required: false
2016
type: string
@@ -24,13 +20,6 @@ on:
2420
description: "The distribution artifact name of torch_npu"
2521
value: ${{ jobs.build.outputs.dist-name }}
2622

27-
# Bash shells do not use ~/.profile or ~/.bashrc so these shells need to be explicitly
28-
# declared as "shell: bash -el {0}" on steps that need to be properly activated.
29-
# It's used to activate ascend-toolkit environment variables.
30-
defaults:
31-
run:
32-
shell: bash -el {0}
33-
3423
jobs:
3524
build:
3625
name: build torch_npu

.github/workflows/_ascend_npu_ut.yml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@ on:
1111
required: true
1212
type: string
1313
description: "The docker image which will be loaded"
14-
device:
15-
required: true
16-
type: string
17-
description: "The device selected to run on"
1814
torch-artifact:
1915
required: false
2016
type: string
@@ -24,13 +20,6 @@ on:
2420
type: string
2521
description: "The distribution artifact name of torch_npu"
2622

27-
# Bash shells do not use ~/.profile or ~/.bashrc so these shells need to be explicitly
28-
# declared as "shell: bash -el {0}" on steps that need to be properly activated.
29-
# It's used to activate ascend-toolkit environment variables.
30-
defaults:
31-
run:
32-
shell: bash -el {0}
33-
3423
jobs:
3524
test:
3625
name: test torch_npu

.github/workflows/ascend_npu_test.yml

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -58,20 +58,6 @@ on:
5858
- ascendai/cann:latest
5959
default: "ascendai/cann:latest"
6060
description: "The docker image which will be loaded"
61-
device:
62-
required: true
63-
type: choice
64-
options:
65-
- /dev/davinci1
66-
- /dev/davinci2
67-
- /dev/davinci3
68-
- /dev/davinci4
69-
- /dev/davinci5
70-
- /dev/davinci6
71-
- /dev/davinci7
72-
- /dev/davinci8
73-
default: "/dev/davinci5"
74-
description: "The device selected to run on"
7561

7662
# Only cancel the previous runs when triggered by a pull_request event
7763
#
@@ -100,7 +86,6 @@ jobs:
10086
id: set-env
10187
run: |
10288
echo "runner=${{ github.event.inputs.runner || 'linux-arm64-npu-1' }}" >> $GITHUB_OUTPUT
103-
echo "device=${{ github.event.inputs.device || '/dev/davinci5' }}" >> $GITHUB_OUTPUT
10489
echo "image=${{ github.event.inputs.image || 'ascendai/cann:latest' }}" >> $GITHUB_OUTPUT
10590
10691
# TODO(shink): List ghstack PR's ref
@@ -133,7 +118,6 @@ jobs:
133118
with:
134119
runner: ${{ needs.prepare.outputs.runner }}
135120
image: ${{ needs.prepare.outputs.image }}
136-
device: ${{ needs.prepare.outputs.device }}
137121
torch-artifact: ${{ needs.build-torch.outputs.torch-artifact }}
138122

139123
torchtitan:
@@ -147,9 +131,24 @@ jobs:
147131
(success() || (needs.build-torch.result == 'skipped' && needs.build.result == 'success'))
148132
uses: ./.github/workflows/_ascend_npu_torchtitan.yml
149133
with:
150-
runner: "linux-arm64-npu-4"
151-
image: "ascendai/cann:8.0.0.beta1-910b-ubuntu22.04-py3.10"
152-
device: ${{ needs.prepare.outputs.device }}
134+
runner: ${{ needs.prepare.outputs.runner }}
135+
image: ${{ needs.prepare.outputs.image }}
136+
torch-artifact: ${{ needs.build-torch.outputs.torch-artifact }}
137+
torch-npu-artifact: ${{ needs.build.outputs.torch-npu-artifact }}
138+
139+
benchmark:
140+
name: Run benchmarks
141+
needs:
142+
- prepare
143+
- build-torch
144+
- build
145+
if: |
146+
!cancelled() && github.event_name != 'repository_dispatch' &&
147+
(success() || (needs.build-torch.result == 'skipped' && needs.build.result == 'success'))
148+
uses: ./.github/workflows/_ascend_npu_benchmark.yml
149+
with:
150+
runner: ${{ needs.prepare.outputs.runner }}
151+
image: ${{ needs.prepare.outputs.image }}
153152
torch-artifact: ${{ needs.build-torch.outputs.torch-artifact }}
154153
torch-npu-artifact: ${{ needs.build.outputs.torch-npu-artifact }}
155154
secrets:

0 commit comments

Comments
 (0)