Short Benchmark #171
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: Short Benchmark | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| machine: | |
| type: choice | |
| description: Which machine to run benchmarks on | |
| options: | |
| - mi325 | |
| - mi355 | |
| default: mi325 | |
| selected_backend: | |
| description: "Which backends to run benchmarks for (wave, iree, torch, hipblaslt, all)" | |
| required: false | |
| default: "all" | |
| selected_kernel: | |
| description: "Which kernels to run benchmarks for (conv, gemm, attention, all)" | |
| required: false | |
| default: "all" | |
| problems_url: | |
| description: "URL to problems to benchmark" | |
| required: true | |
| tuned_config_url: | |
| description: "URL to tuning configurations" | |
| required: false | |
| backend_specs_url: | |
| description: "URL to backend specifications" | |
| required: false | |
| metadata: | |
| description: "Optional: metadata string for tagging the result" | |
| required: false | |
| pr_branch: | |
| description: "Branch name to check out (e.g., feature/opt-pass)" | |
| required: false | |
| pr_repository: | |
| description: "Repository to check out from (e.g., iree-org/wave)" | |
| required: false | |
| pr_headsha: | |
| description: "Head sha of pull request that triggered dispatch" | |
| required: false | |
| trigger_id: | |
| description: "Backend trigger ID for linking" | |
| required: false | |
| default: "undefined" | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ inputs.trigger_id }}-${{ inputs.machine }} | |
| cancel-in-progress: true | |
| jobs: | |
| identifier: | |
| name: Benchmark Run Identifier | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: triggerId_${{ inputs.trigger_id }} | |
| run: | | |
| echo "Trigger ID: ${{ inputs.trigger_id }}" | |
| short_benchmark: | |
| name: Short Benchmark | |
| needs: identifier | |
| runs-on: "linux-${{ inputs.machine }}-1gpu-ossci-nod-ai" | |
| concurrency: | |
| group: kernel-benchmarking-${{ inputs.machine }} | |
| cancel-in-progress: false | |
| env: | |
| WAVE_CACHE_ON: 0 | |
| DOCKER_IMAGE: kernel-bench:${{ github.run_id }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Build Docker Image | |
| run: | | |
| cd benchmark | |
| chmod +x ./docker/build_docker.sh | |
| ./docker/build_docker.sh \ | |
| --machine ${{ inputs.machine }} \ | |
| ${{ inputs.selected_backend != 'all' && format('--backends {0}', inputs.selected_backend) || '' }} \ | |
| ${{ inputs.pr_repository && format('--wave-repo {0}', inputs.pr_repository) || '' }} \ | |
| ${{ inputs.pr_branch && format('--wave-branch {0}', inputs.pr_branch) || '' }} \ | |
| -t ${{ env.DOCKER_IMAGE }} | |
| - name: Run Benchmarks | |
| run: | | |
| cd benchmark | |
| chmod +x ./docker/run_bench.sh | |
| ./docker/run_bench.sh \ | |
| --image ${{ env.DOCKER_IMAGE }} \ | |
| --machine ${{ inputs.machine }} \ | |
| --backends ${{ inputs.selected_backend }} \ | |
| --kernel-types ${{ inputs.selected_kernel }} \ | |
| --problems-url ${{ inputs.problems_url }} \ | |
| ${{ inputs.tuned_config_url && format('--tuned-configs-url {0}', inputs.tuned_config_url) || '' }} \ | |
| -o $(pwd)/benchmark_results | |
| - name: Upload benchmark results | |
| uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 | |
| with: | |
| name: benchmark-results | |
| path: ./benchmark/benchmark_results/results/ |