From 61c163ecb05a1003c48c618b50d967013fb1053a Mon Sep 17 00:00:00 2001 From: Michael Chiou Date: Mon, 29 Jul 2024 19:28:16 -0700 Subject: [PATCH] #10800: Rework SD build and unit test workflow to accept inputs --- .../build-and-unit-tests-wrapper.yaml | 19 ++++++- .github/workflows/build-and-unit-tests.yaml | 52 +++++++++++-------- 2 files changed, 47 insertions(+), 24 deletions(-) diff --git a/.github/workflows/build-and-unit-tests-wrapper.yaml b/.github/workflows/build-and-unit-tests-wrapper.yaml index 8b97b7e55fec..7869e0530e72 100644 --- a/.github/workflows/build-and-unit-tests-wrapper.yaml +++ b/.github/workflows/build-and-unit-tests-wrapper.yaml @@ -7,7 +7,24 @@ jobs: build-artifact: uses: ./.github/workflows/build-artifact.yaml secrets: inherit - sd-unit-tests: + sd-unit-tests-gs: needs: build-artifact uses: ./.github/workflows/build-and-unit-tests.yaml secrets: inherit + with: + arch: grayskull + runner-label: E150 + sd-unit-tests-n150: + needs: build-artifact + uses: ./.github/workflows/build-and-unit-tests.yaml + secrets: inherit + with: + arch: wormhole_b0 + runner-label: N150 + sd-unit-tests-n300: + needs: build-artifact + uses: ./.github/workflows/build-and-unit-tests.yaml + secrets: inherit + with: + arch: wormhole_b0 + runner-label: N300 diff --git a/.github/workflows/build-and-unit-tests.yaml b/.github/workflows/build-and-unit-tests.yaml index c7f0bee30627..7808e7c9fd99 100644 --- a/.github/workflows/build-and-unit-tests.yaml +++ b/.github/workflows/build-and-unit-tests.yaml @@ -2,41 +2,47 @@ name: "[internal] Slow Dispatch unit tests impl" on: workflow_call: + inputs: + arch: + required: true + type: choice + options: + - grayskull + - wormhole_b0 + - blackhole + runner-label: + required: true + type: string + workflow_dispatch: + inputs: + arch: + required: true + type: choice + options: + - grayskull + - wormhole_b0 + - blackhole + runner-label: + required: true + type: string jobs: unit-tests-slow-dispatch: - name: ${{ matrix.runner-info.arch }} ${{ matrix.runner-info.name }} - - strategy: - # Do not fail-fast because we need to ensure all tests go to completion - # so we try not to get hanging machines - fail-fast: false - matrix: - runner-info: [ - {arch: grayskull, runs-on: ["grayskull"], name: E150}, - # N150 - {arch: wormhole_b0, runs-on: ["wormhole_b0", "multi-chip-num-pcie-1", "multi-chip-num-chips-1"], name: N150}, - # N300 - {arch: wormhole_b0, runs-on: ["wormhole_b0", "multi-chip-num-pcie-1", "multi-chip-num-chips-2"], name: N300}, - ] + name: ${{ inputs.arch }} ${{ inputs.runner-label }} + runs-on: + - ${{ inputs.runner-label }} + - "in-service" env: TT_METAL_ENV: ${{ vars.TT_METAL_ENV }} - ARCH_NAME: ${{ matrix.runner-info.arch }} + ARCH_NAME: ${{ inputs.arch}} TT_METAL_SLOW_DISPATCH_MODE: 1 LOGURU_LEVEL: INFO LD_LIBRARY_PATH: ${{ github.workspace }}/build/lib - runs-on: ${{ matrix.runner-info.runs-on }} steps: - - uses: tenstorrent-metal/metal-workflows/.github/actions/checkout-with-submodule-lfs@v2.0.0 + - uses: ./.github/actions/prepare-metal-run - name: Set up dynamic env vars for build run: | echo "TT_METAL_HOME=$(pwd)" >> $GITHUB_ENV - - uses: actions/download-artifact@v4 - with: - name: TTMetal_build_${{ matrix.runner-info.arch }} - - name: Extract files - run: tar -xvf ttm_${{ matrix.runner-info.arch }}.tar - - uses: ./.github/actions/install-python-deps - name: Run pre/post regression tests timeout-minutes: 15 run: |