Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/_ascend_npu_benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ jobs:
Please check out the following resources for more information:

- [Workflow run][1]
- [Torchbenchmark report (click to download)][2]
- [Torchbenchmark report][2] (click to download)

[1]: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
[2]: ${{ steps.upload-report.outputs.artifact-url }}
Expand Down
14 changes: 13 additions & 1 deletion .github/workflows/_ascend_npu_build_torch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,18 @@ jobs:
echo "dist-name=${dist_name}" >> $GITHUB_OUTPUT
echo "dist-path=${dist_path}" >> $GITHUB_OUTPUT

- name: Install torch
working-directory: pytorch/dist
run: |
pip install ${{ steps.list-dist.outputs.dist-name }}

- name: List torch version
id: list-version
run: |
torch_version=$(python -c "import torch; print(torch.__version__)")
echo "torch version: ${torch_version}"
echo "torch-version=${torch_version}" >> $GITHUB_OUTPUT

- name: Upload distribution artifact
id: upload-dist
uses: actions/upload-artifact@v4
Expand All @@ -109,5 +121,5 @@ jobs:
- name: Write to workflow job summary
if: ${{ steps.upload-dist.outputs.artifact-url }}
run: |
echo "## torch built successfully! :rocket:" >> $GITHUB_STEP_SUMMARY
echo "## torch-${{ steps.list-version.outputs.torch-version }} built successfully! :rocket:" >> $GITHUB_STEP_SUMMARY
echo "You can download the distribution package [here](${{ steps.upload-dist.outputs.artifact-url }})." >> $GITHUB_STEP_SUMMARY
30 changes: 29 additions & 1 deletion .github/workflows/_ascend_npu_build_torch_npu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ on:
required: true
type: string
description: 'The docker image which will be used to build'
device:
required: true
type: string
description: 'The device selected to run on'
torch-artifact:
required: false
type: string
Expand All @@ -33,8 +37,18 @@ jobs:
runs-on: ${{ inputs.runner }}
container:
image: ${{ inputs.image }}
volumes:
- /usr/local/dcmi:/usr/local/dcmi
- /usr/local/bin/npu-smi:/usr/local/bin/npu-smi
- /usr/local/Ascend/driver/lib64/:/usr/local/Ascend/driver/lib64/
- /usr/local/Ascend/driver/version.info:/usr/local/Ascend/driver/version.info
- /etc/ascend_install.info:/etc/ascend_install.info
options: >-
--network host
--device ${{ inputs.device }}
--device /dev/davinci_manager
--device /dev/devmm_svm
--device /dev/hisi_hdc
env:
HTTP_PROXY: http://127.0.0.1:10809
HTTPS_PROXY: http://127.0.0.1:10809
Expand Down Expand Up @@ -117,6 +131,20 @@ jobs:
echo "dist-name=${dist_name}" >> $GITHUB_OUTPUT
echo "dist-path=${dist_path}" >> $GITHUB_OUTPUT

- name: Install torch_npu
working-directory: torch_npu/dist
run: |
pip install ${{ steps.list-dist.outputs.dist-name }}

- name: List torch_npu version
id: list-version
run: |
torch_version=$(python -c "import torch; print(torch.__version__)")
torch_npu_version=$(python -c "import torch_npu; print(torch_npu.__version__)")
echo "torch version: ${torch_version}"
echo "torch_npu version: ${torch_npu_version}"
echo "torch-npu-version=${torch_npu_version}" >> $GITHUB_OUTPUT

- name: Upload distribution artifact
id: upload-dist
uses: actions/upload-artifact@v4
Expand All @@ -130,5 +158,5 @@ jobs:
- name: Write to workflow job summary
if: ${{ steps.upload-dist.outputs.artifact-url }}
run: |
echo "## torch_npu built successfully! :rocket:" >> $GITHUB_STEP_SUMMARY
echo "## torch_npu-${{ steps.list-version.outputs.torch-npu-version }} built successfully! :rocket:" >> $GITHUB_STEP_SUMMARY
echo "You can download the distribution package [here](${{ steps.upload-dist.outputs.artifact-url }})." >> $GITHUB_STEP_SUMMARY
3 changes: 2 additions & 1 deletion .github/workflows/ascend_npu_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ on:
# Doc: https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#concurrency
# Discussion: https://github.com/orgs/community/discussions/5435
concurrency:
group: ${{ github.workflow }}
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.client_payload.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
Expand Down Expand Up @@ -129,6 +129,7 @@ jobs:
with:
runner: ${{ needs.prepare.outputs.runner }}
image: ${{ needs.prepare.outputs.image }}
device: ${{ needs.prepare.outputs.device }}
torch-artifact: ${{ needs.build-torch.outputs.torch-artifact }}

test:
Expand Down
10 changes: 1 addition & 9 deletions .github/workflows/dispatch-event.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,6 @@
name: 'Dispatch PyTorch events'

on:
pull_request:
branches:
- 'main'
paths:
- '.github/workflows/dispatch-event.yml'
- '.github/actions/list-pr/**'
- '!**/*.md'

schedule:
- cron: '0 12 * * *'

Expand Down Expand Up @@ -61,7 +53,7 @@ jobs:
matrix:
data: ${{ fromJSON(needs.list-pr.outputs.prs) }}
steps:
- name: Dispatch PR events to be out-of-tree test infra
- name: Dispatch PR event to the out-of-tree test infra
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ secrets.COSDT_BOT_TOKEN }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/redispatch-event.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:

jobs:
redispatch-pr-event:
name: 'Redispatch PyTorch events for #${{ github.event.client_payload.pull_request.number }}'
name: 'Redispatch PR event - #${{ github.event.client_payload.pull_request.number }}'
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -17,7 +17,7 @@ jobs:
run: |
printf "payload: ${{ toJSON(github.event.client_payload) }}"

- name: Redispatch PyTorch event
- name: Redispatch PR event
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ secrets.COSDT_BOT_TOKEN }}
Expand Down
Loading