|
| 1 | +name: Manual - Perf + Transformers Uplift Fix |
| 2 | + |
| 3 | +on: |
| 4 | + workflow_dispatch: |
| 5 | + inputs: |
| 6 | + target_version: |
| 7 | + description: 'Target transformers version (e.g. 5.9.0). Used for SKILL prompt context.' |
| 8 | + required: true |
| 9 | + type: string |
| 10 | + current_version: |
| 11 | + description: 'Previous transformers version (e.g. 5.8.0). Used for SKILL prompt context.' |
| 12 | + required: true |
| 13 | + type: string |
| 14 | + runs-on-filter: |
| 15 | + description: "Runner pool to target. 'All' enables every runner the matrix offers." |
| 16 | + required: false |
| 17 | + type: choice |
| 18 | + options: |
| 19 | + - All |
| 20 | + - n150-perf |
| 21 | + - p150-perf |
| 22 | + - n300-llmbox |
| 23 | + - galaxy-wh-6u |
| 24 | + - qb2-blackhole |
| 25 | + default: n150-perf |
| 26 | + test_filter: |
| 27 | + description: "Optional name-substring filter (case-insensitive). e.g. 'resn' or 'resn,mni,yol'." |
| 28 | + required: false |
| 29 | + type: string |
| 30 | + skip-device-perf: |
| 31 | + description: 'Skip device performance measurement.' |
| 32 | + required: false |
| 33 | + type: boolean |
| 34 | + default: true |
| 35 | + regression_check: |
| 36 | + description: 'Enable perf metrics regression testing.' |
| 37 | + required: false |
| 38 | + type: boolean |
| 39 | + default: true |
| 40 | + check_fusions: |
| 41 | + description: 'Verify expected fusion ops are present in compiled IR.' |
| 42 | + required: false |
| 43 | + type: boolean |
| 44 | + default: true |
| 45 | + tag: |
| 46 | + description: 'Artifact / commit-message discriminator.' |
| 47 | + required: false |
| 48 | + type: string |
| 49 | + default: 'manual' |
| 50 | + mlir_override: |
| 51 | + description: 'Optional git SHA of tenstorrent/tt-mlir to override the submodule pointer.' |
| 52 | + required: false |
| 53 | + type: string |
| 54 | + |
| 55 | +permissions: |
| 56 | + contents: write |
| 57 | + actions: write |
| 58 | + checks: write |
| 59 | + packages: write |
| 60 | + id-token: write |
| 61 | + pull-requests: write |
| 62 | + |
| 63 | +run-name: "Perf + Uplift Fix ( branch: ${{ github.ref_name }} | runner: ${{ inputs.runs-on-filter }} | filter: ${{ inputs.test_filter || '(all)' }} )" |
| 64 | + |
| 65 | +jobs: |
| 66 | + build-image: |
| 67 | + uses: ./.github/workflows/call-build-docker.yml |
| 68 | + secrets: inherit |
| 69 | + with: |
| 70 | + mlir_override: ${{ inputs.mlir_override }} |
| 71 | + dockbuild: all |
| 72 | + |
| 73 | + build-ttxla: |
| 74 | + needs: build-image |
| 75 | + uses: ./.github/workflows/call-build.yml |
| 76 | + secrets: inherit |
| 77 | + with: |
| 78 | + docker_image: ${{ needs.build-image.outputs.docker-image }} |
| 79 | + docker_image_manylinux: ${{ needs.build-image.outputs.docker-image-manylinux }} |
| 80 | + mlir_override: ${{ inputs.mlir_override }} |
| 81 | + build_types: release |
| 82 | + |
| 83 | + set-filter: |
| 84 | + runs-on: ubuntu-latest |
| 85 | + outputs: |
| 86 | + filter: ${{ steps.gen.outputs.filter }} |
| 87 | + steps: |
| 88 | + - name: Build adv_filter |
| 89 | + id: gen |
| 90 | + shell: bash |
| 91 | + run: | |
| 92 | + echo "[" > adv_filter.json |
| 93 | + if [[ "${{ inputs.runs-on-filter }}" == "All" ]]; then |
| 94 | + echo '{ "skip": false, "accuracy-testing": false }' >> adv_filter.json |
| 95 | + else |
| 96 | + echo '{ "runs-on": "${{ inputs.runs-on-filter }}", "accuracy-testing": false }' >> adv_filter.json |
| 97 | + fi |
| 98 | + if [[ -n "${{ inputs.test_filter }}" ]]; then |
| 99 | + echo ',{"filter": "${{ inputs.test_filter }}"}' >> adv_filter.json |
| 100 | + fi |
| 101 | + echo "]" >> adv_filter.json |
| 102 | + filter=$(cat adv_filter.json | jq -r -c '.') |
| 103 | + echo "filter=$filter" >> "$GITHUB_OUTPUT" |
| 104 | + echo "### Perf uplift inputs" >> "$GITHUB_STEP_SUMMARY" |
| 105 | + echo "Branch: ${{ github.ref_name }}" >> "$GITHUB_STEP_SUMMARY" |
| 106 | + echo "Target version: ${{ inputs.target_version }}" >> "$GITHUB_STEP_SUMMARY" |
| 107 | + echo "Runs-on filter: ${{ inputs.runs-on-filter }}" >> "$GITHUB_STEP_SUMMARY" |
| 108 | + echo "Test filter: ${{ inputs.test_filter || '(none)' }}" >> "$GITHUB_STEP_SUMMARY" |
| 109 | +
|
| 110 | + perf-and-fix: |
| 111 | + needs: [build-image, build-ttxla, set-filter] |
| 112 | + if: ${{ !cancelled() && !failure() }} |
| 113 | + uses: ./.github/workflows/call-perf-uplift.yml |
| 114 | + secrets: inherit |
| 115 | + with: |
| 116 | + iteration: 1 |
| 117 | + tag: ${{ inputs.tag }} |
| 118 | + target_version: ${{ inputs.target_version }} |
| 119 | + current_version: ${{ inputs.current_version }} |
| 120 | + artifact_release_run_id: ${{ needs.build-ttxla.outputs.artifacts_run_id }} |
| 121 | + artifact_suffix: ${{ needs.build-ttxla.outputs.artifact_suffix }} |
| 122 | + docker_image: ${{ needs.build-image.outputs.docker-image-base }} |
| 123 | + adv_filter: ${{ needs.set-filter.outputs.filter }} |
0 commit comments