Blackhole post-commit tests #14975
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: "Blackhole post-commit tests" | |
| on: | |
| workflow_call: | |
| inputs: | |
| runner-label: | |
| description: 'Valid inputs: ["P100", "P150"] (both cards), ["P100"] (P100 only), ["P150"] (P150 only)' | |
| required: false | |
| type: string | |
| default: '["P150"]' | |
| enable-watcher: | |
| description: 'Enable watcher in BH Post commit' | |
| default: false | |
| type: boolean | |
| platform: | |
| required: false | |
| type: string | |
| default: "Ubuntu 22.04" | |
| description: "Platform to build and test" | |
| build-type: | |
| required: false | |
| type: string | |
| default: "Release" | |
| description: "Build type configuration (Release, Debug, RelWithDebInfo, ASan, TSan)" | |
| enable-lto: | |
| required: false | |
| type: boolean | |
| default: false | |
| description: "Enable Link Time Optimization (LTO)" | |
| workflow_dispatch: | |
| inputs: | |
| runner-label: | |
| description: 'Valid inputs: ["P100", "P150"] (both cards), ["P100"] (P100 only), ["P150"] (P150 only)' | |
| required: false | |
| type: string | |
| default: '["P150"]' | |
| enable-watcher: | |
| description: 'Enable watcher in BH Post commit' | |
| default: false | |
| type: boolean | |
| platform: | |
| required: false | |
| type: choice | |
| default: "Ubuntu 22.04" | |
| options: | |
| - "Ubuntu 22.04" | |
| - "Ubuntu 24.04" | |
| description: "Platform to build and test" | |
| build-type: | |
| description: 'Build type for the workflow' | |
| required: false | |
| default: Release | |
| type: choice | |
| options: | |
| - Release | |
| - Debug | |
| - RelWithDebInfo | |
| - ASan | |
| - TSan | |
| enable-lto: | |
| required: false | |
| default: false | |
| type: boolean | |
| description: "Enable Link Time Optimization (LTO)" | |
| schedule: | |
| - cron: "0 */4 * * *" | |
| - cron: "0 7 * * *" # Every day at 7:00 UTC | |
| # Pause this since not enough runners to support every commit to main | |
| # push: | |
| # branches: ["main"] | |
| run-name: >- | |
| ${{ inputs.runner-label == '["P100"]' && 'Blackhole post-commit tests (P100)' | |
| || (inputs.enable-watcher == true && 'Blackhole post-commit tests (watcher enabled)') | |
| || ((github.event_name == 'schedule' && github.event.schedule == '0 7 * * *') | |
| && 'Blackhole post-commit tests (P100 nightly)') | |
| || 'Blackhole post-commit tests' }} | |
| permissions: | |
| actions: read | |
| contents: write | |
| pull-requests: write | |
| pages: write | |
| id-token: write | |
| packages: write | |
| checks: write | |
| jobs: | |
| generate-matrix: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| matrix: ${{ steps.set-matrix.outputs.matrix }} | |
| civ2-matrix: ${{ steps.set-matrix.outputs.civ2-matrix }} | |
| civ2-viommu-matrix: ${{ steps.set-matrix.outputs.civ2-viommu-matrix }} | |
| steps: | |
| - id: set-matrix | |
| shell: bash | |
| run: | | |
| # Store runner-label with fallback in a variable for reuse | |
| runner_label='${{ inputs.runner-label || '["P150"]' }}' | |
| # Check if this is a scheduled P100-only run at 7:00 UTC (daily) | |
| if [[ "${{ github.event_name }}" = "schedule" && "${{ github.event.schedule }}" = "0 7 * * *" ]]; then | |
| matrix='["P100"]' | |
| civ2_matrix='["P100a"]' | |
| civ2_viommu_matrix='["P100a-viommu"]' | |
| else | |
| matrix="$runner_label" | |
| civ2_matrix="$runner_label" | |
| civ2_viommu_matrix="$runner_label" | |
| # Transform P100 to P100a for civ2_matrix (only if P100 exists, not P100a) | |
| if [[ "$runner_label" == *"P100"* && "$runner_label" != *"P100a"* ]]; then | |
| civ2_matrix=$(echo "$civ2_matrix" | sed 's/"P100"/"P100a"/g') | |
| fi | |
| # Transform P150 to P150b for civ2_matrix (only if P150 exists, not P150b) | |
| if [[ "$runner_label" == *"P150"* && "$runner_label" != *"P150b"* ]]; then | |
| civ2_matrix=$(echo "$civ2_matrix" | sed 's/"P150"/"P150b"/g') | |
| fi | |
| # Transform P100 to P100a for civ2_viommu_matrix (only if P100 exists, not P100a) | |
| if [[ "$runner_label" == *"P100"* && "$runner_label" != *"P100a"* ]]; then | |
| civ2_viommu_matrix=$(echo "$civ2_viommu_matrix" | sed 's/"P100"/"P100a-viommu"/g') | |
| fi | |
| # Transform P150 to P150b-viommu for civ2_viommu_matrix (only if P150 exists, not P150b) | |
| if [[ "$runner_label" == *"P150"* && "$runner_label" != *"P150b"* ]]; then | |
| civ2_viommu_matrix=$(echo "$civ2_viommu_matrix" | sed 's/"P150"/"P150b-viommu"/g') | |
| fi | |
| fi | |
| echo "matrix=$matrix" >> $GITHUB_OUTPUT | |
| echo "civ2-matrix=$civ2_matrix" >> $GITHUB_OUTPUT | |
| echo "civ2-viommu-matrix=$civ2_viommu_matrix" >> $GITHUB_OUTPUT | |
| # Print matrices | |
| echo "Final matrix values:" | |
| echo "matrix: $matrix" | |
| echo "civ2_matrix: $civ2_matrix" | |
| echo "civ2_viommu_matrix: $civ2_viommu_matrix" | |
| build-artifact: | |
| uses: ./.github/workflows/build-artifact.yaml | |
| permissions: | |
| packages: write | |
| secrets: inherit | |
| with: | |
| build-type: ${{ inputs.build-type || 'Release' }} | |
| build-wheel: true | |
| tracy: true | |
| platform: ${{ inputs.platform || 'Ubuntu 22.04' }} | |
| build-umd-tests: true | |
| enable-lto: ${{ inputs.enable-lto || false }} | |
| run-profiler-regression: | |
| needs: [build-artifact, generate-matrix] | |
| uses: ./.github/workflows/run-profiler-regression.yaml | |
| secrets: inherit | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| test-group: ${{ fromJson(needs.generate-matrix.outputs.civ2-matrix) }} | |
| with: | |
| arch: "blackhole" | |
| runner-label: ${{ matrix.test-group }} | |
| post_commit_only: true | |
| docker-image: ${{ needs.build-artifact.outputs.dev-docker-image }} | |
| build-artifact-name: ${{ needs.build-artifact.outputs.build-artifact-name }} | |
| wheel-artifact-name: ${{ needs.build-artifact.outputs.wheel-artifact-name }} | |
| enable-watcher: ${{ inputs.enable-watcher || false }} | |
| umd-unit-tests: | |
| needs: [build-artifact, generate-matrix] | |
| secrets: inherit | |
| uses: ./.github/workflows/umd-unit-tests.yaml | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| test-group: ${{ fromJson(needs.generate-matrix.outputs.civ2-matrix) }} | |
| with: | |
| arch: blackhole | |
| runner-label: ${{ matrix.test-group }} | |
| docker-image: ${{ needs.build-artifact.outputs.dev-docker-image }} | |
| build-artifact-name: ${{ needs.build-artifact.outputs.build-artifact-name }} | |
| enable-watcher: ${{ inputs.enable-watcher || false }} | |
| models-unit-tests: | |
| needs: [build-artifact, generate-matrix] | |
| secrets: inherit | |
| uses: ./.github/workflows/models-post-commit.yaml | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| test-group: ${{ fromJson(needs.generate-matrix.outputs.matrix) }} | |
| with: | |
| arch: blackhole | |
| runner-label: ${{ matrix.test-group }} | |
| timeout: 20 | |
| docker-image: ${{ needs.build-artifact.outputs.dev-docker-image }} | |
| wheel-artifact-name: ${{ needs.build-artifact.outputs.wheel-artifact-name }} | |
| enable-watcher: ${{ inputs.enable-watcher || false }} | |
| ttnn-unit-tests: | |
| needs: [build-artifact, generate-matrix] | |
| secrets: inherit | |
| uses: ./.github/workflows/ttnn-post-commit.yaml | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| test-group: ${{ fromJson(needs.generate-matrix.outputs.civ2-matrix) }} | |
| with: | |
| arch: blackhole | |
| runner-label: ${{ matrix.test-group }} | |
| timeout: ${{ (inputs.enable-watcher && 120) || 40 }} | |
| docker-image: ${{ needs.build-artifact.outputs.dev-docker-image }} | |
| wheel-artifact-name: ${{ needs.build-artifact.outputs.wheel-artifact-name }} | |
| enable-watcher: ${{ inputs.enable-watcher || false }} | |
| ops-unit-tests: | |
| needs: [build-artifact, generate-matrix] | |
| secrets: inherit | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| test-group: ${{ fromJson(needs.generate-matrix.outputs.civ2-matrix) }} | |
| uses: ./.github/workflows/ops-post-commit.yaml | |
| with: | |
| arch: blackhole | |
| runner-label: ${{ matrix.test-group }} | |
| docker-image: ${{ needs.build-artifact.outputs.dev-docker-image }} | |
| build-artifact-name: ${{ needs.build-artifact.outputs.build-artifact-name }} | |
| wheel-artifact-name: ${{ needs.build-artifact.outputs.wheel-artifact-name }} | |
| enable-watcher: ${{ inputs.enable-watcher || false }} | |
| metalium-smoke-tests: | |
| needs: [build-artifact, generate-matrix] | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| platform: ${{ fromJson(needs.generate-matrix.outputs.civ2-viommu-matrix) }} | |
| uses: ./.github/workflows/smoke.yaml | |
| with: | |
| docker-image: ${{ needs.build-artifact.outputs.dev-docker-image }} | |
| package-artifact-name: ${{ needs.build-artifact.outputs.packages-artifact-name }} | |
| runner: ${{ matrix.platform }} | |
| product: tt-metalium | |
| enable-watcher: ${{ inputs.enable-watcher || false }} | |
| ttnn-smoke-tests: | |
| needs: [build-artifact, generate-matrix] | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| platform: ${{ fromJson(needs.generate-matrix.outputs.civ2-viommu-matrix) }} | |
| uses: ./.github/workflows/smoke.yaml | |
| with: | |
| docker-image: ${{ needs.build-artifact.outputs.dev-docker-image }} | |
| package-artifact-name: ${{ needs.build-artifact.outputs.packages-artifact-name }} | |
| runner: ${{ matrix.platform }} | |
| product: tt-nn | |
| enable-watcher: ${{ inputs.enable-watcher || false }} | |
| metalium-basic-tests: | |
| needs: [build-artifact, generate-matrix] | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| platform: ${{ fromJson(needs.generate-matrix.outputs.civ2-viommu-matrix) }} | |
| uses: ./.github/workflows/basic.yaml | |
| with: | |
| docker-image: ${{ needs.build-artifact.outputs.dev-docker-image }} | |
| package-artifact-name: ${{ needs.build-artifact.outputs.packages-artifact-name }} | |
| per-test-timeout: 11 | |
| runner: ${{ matrix.platform }} | |
| product: tt-metalium | |
| enable-watcher: ${{ inputs.enable-watcher || false }} | |
| ttnn-basic-tests: | |
| needs: [build-artifact, generate-matrix] | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| platform: ${{ fromJson(needs.generate-matrix.outputs.civ2-viommu-matrix) }} | |
| uses: ./.github/workflows/basic.yaml | |
| with: | |
| docker-image: ${{ needs.build-artifact.outputs.dev-docker-image }} | |
| package-artifact-name: ${{ needs.build-artifact.outputs.packages-artifact-name }} | |
| per-test-timeout: 11 | |
| runner: ${{ matrix.platform }} | |
| product: tt-nn | |
| enable-watcher: ${{ inputs.enable-watcher || false }} | |
| # TT-CNN Unit Tests | |
| tt-cnn-unit-tests: | |
| needs: [build-artifact, generate-matrix] | |
| secrets: inherit | |
| uses: ./.github/workflows/tt-cnn-post-commit.yaml | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| test-group: ${{ fromJson(needs.generate-matrix.outputs.civ2-matrix) }} | |
| with: | |
| arch: blackhole | |
| runner-label: ${{ matrix.test-group }} | |
| docker-image: ${{ needs.build-artifact.outputs.dev-docker-image }} | |
| wheel-artifact-name: ${{ needs.build-artifact.outputs.wheel-artifact-name }} | |
| enable-watcher: ${{ inputs.enable-watcher || false }} | |
| # Multi-card post-commit tests | |
| blackhole-multi-card-fast-unit-tests: | |
| if: ${{ !contains(fromJson(needs.generate-matrix.outputs.matrix), 'P100') }} | |
| needs: [build-artifact, generate-matrix] | |
| secrets: inherit | |
| uses: ./.github/workflows/blackhole-multi-card-unit-tests-impl.yaml | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| test-group: [ "BH-LLMBox", "BH-LoudBox", "P300-viommu"] | |
| with: | |
| arch: blackhole | |
| runner-label: ${{ matrix.test-group }} | |
| docker-image: ${{ needs.build-artifact.outputs.dev-docker-image }} | |
| build-artifact-name: ${{ needs.build-artifact.outputs.build-artifact-name }} | |
| wheel-artifact-name: ${{ needs.build-artifact.outputs.wheel-artifact-name }} | |
| fast-only: true |