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 148557f commit 7384842
Showing 1 changed file with 181 additions and 182 deletions.
363 changes: 181 additions & 182 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch all history and tags
fetch-depth: 0

- name: Set reusable strings
id: strings
Expand Down Expand Up @@ -169,184 +169,183 @@ jobs:
with:
name: system-desc-${{ matrix.build.runs-on }}.ttsys
path: ttrt-artifacts/system-desc.ttsys
#
#generate-tests:
# needs: get-system-descs
# strategy:
# fail-fast: false
# matrix:
# build: [
# {runs-on: self-hosted},
# ]
#
# runs-on: ${{ matrix.build.runs-on }}
#
# container:
# image: ghcr.io/${{ github.repository }}/tt-mlir-ubuntu-22-04:latest
# options: --user root
#
# steps:
# - uses: actions/checkout@v4
# with:
# fetch-depth: 0 # Fetch all history and tags
#
# - name: Set reusable strings
# id: strings
# shell: bash
# run: |
# echo "work-dir=$(pwd)" >> "$GITHUB_OUTPUT"
# echo "build-output-dir=$(pwd)/build" >> "$GITHUB_OUTPUT"
#
# - name: Git safe dir
# run: git config --global --add safe.directory ${{ steps.strings.outputs.work-dir }}
#
# - name: Use build artifacts
# uses: actions/download-artifact@v4
# with:
# name: build-artifacts
# path: build
#
# - name: Config compiler
# shell: bash
# run: |
# source env/activate
# cmake -G Ninja \
# -B build \
# -DCMAKE_CXX_COMPILER=clang++-17 \
# -DCMAKE_C_COMPILER=clang-17 \
# -DCMAKE_BUILD_TYPE=Release \
# -DTTMLIR_ENABLE_RUNTIME=ON \
# -DTTMLIR_ENABLE_RUNTIME_TESTS=ON
#
# - name: Download n150 system descriptor
# uses: actions/download-artifact@v4
# with:
# name: system-desc-n150.ttsys
#
# - name: Download n300 system descriptor
# uses: actions/download-artifact@v4
# with:
# name: system-desc-n300.ttsys
#
# - name: Run test cases against n150 system
# shell: bash
# run: |
# source env/activate
# export SYSTEM_DESC_PATH=system-desc-n150.ttsys
# cmake --build build -- check-ttmlir
#
# - name: Upload n150 test artifacts
# uses: actions/upload-artifact@v4
# with:
# name: n150/Silicon
# path: build/test/ttmlir/Silicon
#
# - name: Run test cases against n300 system
# shell: bash
# run: |
# source env/activate
# export SYSTEM_DESC_PATH=system-desc-n300.ttsys
# cmake --build build -- check-ttmlir
#
# - name: Upload n300 test artifacts
# uses: actions/upload-artifact@v4
# with:
# name: n300/Silicon
# path: build/test/ttmlir/Silicon
#
#run-tests:
# needs: generate-tests
# strategy:
# 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:
# - 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 perf whls
# uses: actions/download-artifact@v4
# with:
# name: ttrt-whl-perf.whl
#
# - name: Install ttrt perf 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 perf ${{ matrix.build.runs-on }}/Silicon
#

generate-tests:
needs: get-system-descs
strategy:
fail-fast: false
matrix:
build: [
{runs-on: self-hosted},
]

runs-on: ${{ matrix.build.runs-on }}

container:
image: ghcr.io/${{ github.repository }}/tt-mlir-ubuntu-22-04:latest
options: --user root

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set reusable strings
id: strings
shell: bash
run: |
echo "work-dir=$(pwd)" >> "$GITHUB_OUTPUT"
echo "build-output-dir=$(pwd)/build" >> "$GITHUB_OUTPUT"
- name: Git safe dir
run: git config --global --add safe.directory ${{ steps.strings.outputs.work-dir }}

- name: Use build artifacts
uses: actions/download-artifact@v4
with:
name: build-artifacts
path: build

- name: Config compiler
shell: bash
run: |
source env/activate
cmake -G Ninja \
-B build \
-DCMAKE_CXX_COMPILER=clang++-17 \
-DCMAKE_C_COMPILER=clang-17 \
-DCMAKE_BUILD_TYPE=Release \
-DTTMLIR_ENABLE_RUNTIME=ON \
-DTTMLIR_ENABLE_RUNTIME_TESTS=ON
- name: Download n150 system descriptor
uses: actions/download-artifact@v4
with:
name: system-desc-n150.ttsys

- name: Download n300 system descriptor
uses: actions/download-artifact@v4
with:
name: system-desc-n300.ttsys

- name: Run test cases against n150 system
shell: bash
run: |
source env/activate
export SYSTEM_DESC_PATH=system-desc-n150.ttsys
cmake --build build -- check-ttmlir
- name: Upload n150 test artifacts
uses: actions/upload-artifact@v4
with:
name: n150/Silicon
path: build/test/ttmlir/Silicon

- name: Run test cases against n300 system
shell: bash
run: |
source env/activate
export SYSTEM_DESC_PATH=system-desc-n300.ttsys
cmake --build build -- check-ttmlir
- name: Upload n300 test artifacts
uses: actions/upload-artifact@v4
with:
name: n300/Silicon
path: build/test/ttmlir/Silicon

run-tests:
needs: generate-tests
strategy:
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:
- 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 perf whls
uses: actions/download-artifact@v4
with:
name: ttrt-whl-perf.whl

- name: Install ttrt perf 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 perf ${{ matrix.build.runs-on }}/Silicon

0 comments on commit 7384842

Please sign in to comment.