Add torchbenchmark #182
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Ascend NPU Test Suite | |
| on: | |
| push: | |
| branches: | |
| - 'main' | |
| pull_request: | |
| branches: | |
| - 'main' | |
| release: | |
| types: | |
| - 'published' | |
| schedule: | |
| - cron: '0 12 * * *' | |
| workflow_dispatch: | |
| inputs: | |
| runner: | |
| required: true | |
| type: choice | |
| options: | |
| - self-hosted | |
| - npu-arm64 | |
| default: 'self-hosted' | |
| description: 'The runner selected to run on' | |
| image: | |
| required: true | |
| type: choice | |
| options: | |
| - ascendai/cann:7.1-openeuler2203sp2 | |
| - ascendai/cann:8.0.rc2.alpha003-910b-ubuntu22.04-py3.9 | |
| - ascendai/cann:8.0.rc3.alpha002-910b-ubuntu22.04-py3.9 | |
| - ascendai/cann:latest | |
| default: 'ascendai/cann:latest' | |
| description: 'The docker image which will be loaded' | |
| device: | |
| required: true | |
| type: choice | |
| options: | |
| - /dev/davinci1 | |
| - /dev/davinci2 | |
| - /dev/davinci3 | |
| - /dev/davinci4 | |
| - /dev/davinci5 | |
| - /dev/davinci6 | |
| - /dev/davinci7 | |
| - /dev/davinci8 | |
| default: '/dev/davinci4' | |
| description: 'The device selected to run on' | |
| # Only cancel the previous runs when triggered by a pull request | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }} | |
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
| jobs: | |
| prepare: | |
| name: Prepare | |
| runs-on: ubuntu-latest | |
| outputs: | |
| runner: ${{ steps.set-param.outputs.runner }} | |
| image: ${{ steps.set-param.outputs.image }} | |
| device: ${{ steps.set-param.outputs.device }} | |
| steps: | |
| - name: Set param | |
| id: set-param | |
| run: | | |
| set -e | |
| echo "runner=${{ github.event.inputs.runner || 'self-hosted' }}" >> $GITHUB_OUTPUT | |
| echo "device=${{ github.event.inputs.device || '/dev/davinci4' }}" >> $GITHUB_OUTPUT | |
| echo "image=${{ github.event.inputs.image || 'ascendai/cann:latest' }}" >> $GITHUB_OUTPUT | |
| build: | |
| name: Build torch_npu | |
| needs: | |
| - prepare | |
| uses: ./.github/workflows/_ascend_npu_build.yml | |
| with: | |
| runner: ${{ needs.prepare.outputs.runner }} | |
| image: ${{ needs.prepare.outputs.image }} | |
| # test: | |
| # name: Test torch_npu | |
| # needs: | |
| # - prepare | |
| # - build | |
| # uses: ./.github/workflows/_ascend_npu_test.yml | |
| # with: | |
| # runner: ${{ needs.prepare.outputs.runner }} | |
| # image: ${{ needs.prepare.outputs.image }} | |
| # device: ${{ needs.prepare.outputs.device }} | |
| # artifact_name: ${{ needs.build.outputs.artifact_name }} | |
| benchmark: | |
| name: Run benchmarks | |
| needs: | |
| - prepare | |
| - build | |
| uses: ./.github/workflows/_ascend_npu_benchmark.yml | |
| with: | |
| runner: ${{ needs.prepare.outputs.runner }} | |
| image: ${{ needs.prepare.outputs.image }} | |
| device: ${{ needs.prepare.outputs.device }} | |
| artifact_name: ${{ needs.build.outputs.artifact_name }} |