Cherry-picked commit with merge conflict #708
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: Upload torch dynamo performance stats | ||
| on: | ||
| workflow_run: | ||
| workflows: [inductor-A100-perf-nightly, inductor-perf-nightly-A10g, inductor-perf-nightly-aarch64, inductor-perf-nightly-x86, inductor-perf-nightly-macos, inductor-perf-nightly-rocm, inductor-perf-nightly-h100] | ||
| types: | ||
| - completed | ||
| jobs: | ||
| get-conclusion: | ||
| runs-on: ubuntu-latest | ||
| outputs: | ||
| conclusion: ${{ fromJson(steps.get-conclusion.outputs.data).conclusion }} | ||
| steps: | ||
| - name: Get workflow run conclusion | ||
| # TODO (huydhn): Pin this once https://github.com/octokit/request-action/issues/315 is resolved | ||
| uses: octokit/request-action@05a2312de9f8207044c4c9e41fe19703986acc13 # v2.x | ||
| id: get-conclusion | ||
| with: | ||
| route: GET /repos/${{ github.repository }}/actions/runs/${{ github.event.workflow_run.id }}/attempts/${{ github.event.workflow_run.run_attempt }} | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| upload-perf-stats: | ||
| needs: get-conclusion | ||
| if: github.event.workflow_run.conclusion == 'success' || needs.get-conclusion.outputs.conclusion == 'success' || | ||
| github.event.workflow_run.conclusion == 'failure' || needs.get-conclusion.outputs.conclusion == 'failure' | ||
| runs-on: ubuntu-22.04 | ||
| environment: upload-stats | ||
| permissions: | ||
| id-token: write | ||
| name: Upload dynamo performance stats for ${{ github.event.workflow_run.id }}, attempt ${{ github.event.workflow_run.run_attempt }} | ||
| steps: | ||
| - name: Checkout PyTorch | ||
| <<<<<<< HEAD | ||
| uses: pytorch/pytorch/.github/actions/checkout-pytorch@release/2.9 | ||
| ======= | ||
| uses: pytorch/pytorch/.github/actions/checkout-pytorch@release/2.8 | ||
| >>>>>>> 245bf6edbc ([AUTOGENERATED] [release/2.8] skip convolution tests on Navi4x (#2675)) | ||
| with: | ||
| submodules: false | ||
| fetch-depth: 1 | ||
| - name: Configure aws credentials | ||
| uses: aws-actions/configure-aws-credentials@ececac1a45f3b08a01d2dd070d28d111c5fe6722 # v4.1.0 | ||
| continue-on-error: true | ||
| with: | ||
| role-to-assume: arn:aws:iam::308535385114:role/gha_workflow_upload-torch-test-stats | ||
| aws-region: us-east-1 | ||
| - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 | ||
| with: | ||
| python-version: '3.11' | ||
| cache: pip | ||
| - run: | | ||
| pip3 install requests==2.32.2 boto3==1.35.42 | ||
| - name: Upload torch dynamo performance stats to S3 | ||
| id: upload-s3 | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| WORKFLOW_ARTIFACTS_URL: ${{ github.event.workflow_run.artifacts_url }} | ||
| WORKFLOW_RUN_ID: ${{ github.event.workflow_run.id }} | ||
| WORKFLOW_RUN_ATTEMPT: ${{ github.event.workflow_run.run_attempt }} | ||
| REPO_FULLNAME: ${{ github.event.workflow_run.repository.full_name }} | ||
| run: | | ||
| # Upload perf test reports from GHA to S3, which can now be downloaded | ||
| # on HUD | ||
| python3 -m tools.stats.upload_artifacts --workflow-run-id "${WORKFLOW_RUN_ID}" --workflow-run-attempt "${WORKFLOW_RUN_ATTEMPT}" --repo "${REPO_FULLNAME}" | ||
| - name: Upload torch dynamo performance stats to s3 | ||
| if: steps.upload-s3.outcome && steps.upload-s3.outcome == 'success' | ||
| env: | ||
| WORKFLOW_RUN_ID: ${{ github.event.workflow_run.id }} | ||
| WORKFLOW_RUN_ATTEMPT: ${{ github.event.workflow_run.run_attempt }} | ||
| REPO_FULLNAME: ${{ github.event.workflow_run.repository.full_name }} | ||
| HEAD_BRANCH: ${{ github.event.workflow_run.head_branch }} | ||
| run: | | ||
| python3 -m tools.stats.upload_dynamo_perf_stats --workflow-run-id "${WORKFLOW_RUN_ID}" --workflow-run-attempt "${WORKFLOW_RUN_ATTEMPT}" --repo "${REPO_FULLNAME}" --head-branch "${HEAD_BRANCH}" --dynamodb-table torchci-dynamo-perf-stats --match-filename "^inductor_" | ||