Skip to content

Commit

Permalink
force ci
Browse files Browse the repository at this point in the history
  • Loading branch information
tapspatel committed Aug 26, 2024
1 parent c96109a commit ae49006
Showing 1 changed file with 17 additions and 82 deletions.
99 changes: 17 additions & 82 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"},
]

Expand Down Expand Up @@ -44,7 +44,7 @@ jobs:
uses: hendrikmuhs/[email protected]
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
Expand Down Expand Up @@ -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 }}
Expand Down Expand Up @@ -128,19 +110,20 @@ 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
source whls_env/bin/activate
pip install *.whl --force-reinstall
- name: Generate system descriptor
shell: bash
run: |
source whls_env/bin/activate
ttrt query --save-artifacts
Expand All @@ -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"},
]

Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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:
Expand All @@ -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
Expand All @@ -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

0 comments on commit ae49006

Please sign in to comment.