diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 6a01f8f296..03adcbf94a 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -15,7 +15,7 @@ jobs: fail-fast: false matrix: build: [ - {runs-on: self-hosted, enable_perf: OFF, name: "runtime"}, + {runs-on: self-hosted, enable_perf: OFF, name: "run"}, {runs-on: self-hosted, enable_perf: ON, name: "perf"}, ] @@ -44,7 +44,7 @@ jobs: uses: hendrikmuhs/ccache-action@v1.2 with: create-symlink: true - key: ${{ matrix.build.runs-on }}-runtime-ON-perf-${{ matrix.build.enable_perf }}-${{ env.SDK_VERSION }} + key: ${{ matrix.build.runs-on }}-run-ON-perf-${{ matrix.build.enable_perf }}-${{ env.SDK_VERSION }} - name: Configure CMake shell: bash @@ -73,31 +73,13 @@ jobs: source env/activate cmake --build ${{ steps.strings.outputs.build-output-dir }} -- ttrt - - name: Get the latest tag - id: get_tag - run: | - latest_tag=$(git describe --tags --abbrev=0) - echo "latest_tag=$latest_tag" >> $GITHUB_ENV - - - name: Get the number of commits since the latest tag - id: get_commit_count - run: | - commit_count=$(git rev-list ${{ env.latest_tag }}..HEAD --count) - echo "commit_count=$commit_count" >> $GITHUB_ENV - - - name: Generate version - id: generate_version - run: | - version="${{ env.latest_tag }}.${{ env.commit_count }}" - echo "version=$version" >> $GITHUB_ENV - - name: Upload ttrt whl uses: actions/upload-artifact@v4 with: name: ttrt-whl-${{ matrix.build.name }}.whl path: build/runtime/tools/python/build/*.whl - - name: Upload build foder to archive + - name: Upload build folder to archive uses: actions/upload-artifact@v4 with: name: build-artifacts-${{ matrix.build.name }} @@ -128,12 +110,12 @@ jobs: - /opt/tt_metal_infra/provisioning/provisioning_env:/opt/tt_metal_infra/provisioning/provisioning_env steps: - - name: Download ttrt runtime whls + - name: Download ttrt run whls uses: actions/download-artifact@v4 with: - name: ttrt-whl-runtime.whl + name: ttrt-whl-run.whl - - name: Install ttrt runtime whls + - name: Install ttrt run whls shell: bash run: | python3 -m venv whls_env @@ -141,6 +123,7 @@ jobs: pip install *.whl --force-reinstall - name: Generate system descriptor + shell: bash run: | source whls_env/bin/activate ttrt query --save-artifacts @@ -157,7 +140,7 @@ jobs: fail-fast: false matrix: build: [ - {runs-on: self-hosted, enable_perf: OFF, name: "runtime"}, + {runs-on: self-hosted, enable_perf: OFF, name: "run"}, {runs-on: self-hosted, enable_perf: ON, name: "perf"}, ] @@ -216,13 +199,13 @@ jobs: shell: bash run: | source env/activate - cmake --build ${{ steps.strings.outputs.build-output-dir }} -- check-ttmlir + cmake --build build -- check-ttmlir - name: Run test cases against n150 system shell: bash run: | source env/activate - export SYSTEM_DESC_PATH=system-desc-n150.ttsys + export SYSTEM_DESC_PATH="${GITHUB_WORKSPACE}/system-desc-n150.ttsys" cmake --build build -- check-ttmlir - name: Upload n150 test artifacts @@ -235,7 +218,7 @@ jobs: shell: bash run: | source env/activate - export SYSTEM_DESC_PATH=system-desc-n300.ttsys + export SYSTEM_DESC_PATH="${GITHUB_WORKSPACE}/system-desc-n300.ttsys" cmake --build build -- check-ttmlir - name: Upload n300 test artifacts @@ -250,56 +233,8 @@ jobs: fail-fast: false matrix: build: [ - {runs-on: n150}, - {runs-on: n300}, - ] - - runs-on: - - self-hosted - - ${{ matrix.build.runs-on }} - - container: - image: ghcr.io/${{ github.repository }}/tt-mlir-ubuntu-22-04:latest - options: --user root --device /dev/tenstorrent/0 - volumes: - - /dev/hugepages:/dev/hugepages - - /dev/hugepages-1G:/dev/hugepages-1G - - /etc/udev/rules.d:/etc/udev/rules.d - - /lib/modules:/lib/modules - - /opt/tt_metal_infra/provisioning/provisioning_env:/opt/tt_metal_infra/provisioning/provisioning_env - - steps: - - name: Download ttrt runtime whls - uses: actions/download-artifact@v4 - with: - name: ttrt-whl-runtime.whl - - - name: Install ttrt runtime whls - shell: bash - run: | - python3 -m venv whls_env - source whls_env/bin/activate - pip install *.whl --force-reinstall - - - name: Download tests - uses: actions/download-artifact@v4 - with: - name: ${{ matrix.build.runs-on }}/Silicon - - - name: Run tests - shell: bash - run: | - source whls_env/bin/activate - ttrt run ${{ matrix.build.runs-on }}/Silicon - - run-tests-perf: - needs: generate-tests - strategy: - fail-fast: false - matrix: - build: [ - {runs-on: n150}, - {runs-on: n300}, + {runs-on: n150, name: "run"}, + {runs-on: n300, name: "perf"}, ] runs-on: @@ -317,12 +252,12 @@ jobs: - /opt/tt_metal_infra/provisioning/provisioning_env:/opt/tt_metal_infra/provisioning/provisioning_env steps: - - name: Download ttrt perf whls + - name: Download ttrt whls uses: actions/download-artifact@v4 with: - name: ttrt-whl-perf.whl + name: ttrt-whl-${{ matrix.build.name }}.whl - - name: Install ttrt perf whls + - name: Install ttrt whls shell: bash run: | python3 -m venv whls_env @@ -338,4 +273,4 @@ jobs: shell: bash run: | source whls_env/bin/activate - ttrt perf ${{ matrix.build.runs-on }}/Silicon + ttrt ${{ matrix.build.name }} ${{ matrix.build.runs-on }}/Silicon