-
Notifications
You must be signed in to change notification settings - Fork 14
92 lines (80 loc) · 3 KB
/
ttrt-flatbuffer-ttnn.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
name: TTRT Flatbuffer TTNN Tests
on:
workflow_dispatch:
workflow_call:
push:
branches: [ "tpatel/issue-104" ]
jobs:
build:
strategy:
fail-fast: false
matrix:
build: [
{name: "TTRT TTNN n150 runtime tests", runs-on: n150, c_compiler: clang, cpp_compiler: clang++, build_type: Release, enable_runtime: ON, enable_perf: OFF},
{name: "TTRT TTNN n300 runtime tests", runs-on: n300, c_compiler: clang, cpp_compiler: clang++, build_type: Release, enable_runtime: ON, enable_perf: OFF},
]
name: ${{ matrix.build.name }}
runs-on: ${{ matrix.build.runs-on }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch all history and tags
- name: Install build dependencies
uses: ./.github/actions/install-deps
with:
os: ${{ matrix.build.runs-on }}
- name: Build and cache ttmlir-toolchain
uses: ./.github/actions/build-toolchain
with:
os: ${{ matrix.build.runs-on }}
sdk: ${{ env.SDK_VERSION }}
- name: Set reusable strings
id: strings
shell: bash
run: |
echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT"
- name: Configure CMake
shell: bash
run: |
source env/activate
cmake -G Ninja \
-B ${{ steps.strings.outputs.build-output-dir }} \
-DCMAKE_CXX_COMPILER=${{ matrix.build.cpp_compiler }} \
-DCMAKE_C_COMPILER=${{ matrix.build.c_compiler }} \
-DCMAKE_BUILD_TYPE=${{ matrix.build.build_type }} \
-DTTMLIR_ENABLE_RUNTIME=${{ matrix.build.enable_runtime }} \
-DTTMLIR_ENABLE_RUNTIME_TESTS=${{ matrix.build.enable_runtime }} \
-DTT_RUNTIME_ENABLE_PERF_TRACE=${{ matrix.build.enable_perf }} \
-S ${{ github.workspace }}
- name: Set perf env variables
if: ${{ matrix.build.enable_perf }} == 'ON'
shell: bash
run: |
export ENABLE_TRACY=1
- name: Build
shell: bash
run: |
source env/activate
cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ matrix.build.build_type }}
- name: Run Test
shell: bash
run: |
source env/activate
export SYSTEM_DESC_PATH=${{ github.workspace }}/test/system_desc/${{ matrix.build.runs-on }}.ttsys
llvm-lit -v ${{ github.workspace }}/build/test/ttmlir/Silicon
cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ matrix.build.build_type }} -- check-ttmlir
- name: Build ttrt
shell: bash
run: |
source env/activate
cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ matrix.build.build_type }} -- ttrt
- name: Run ttrt functional tests
if: ${{ matrix.build.enable_perf }} == 'OFF'
shell: bash
run: |
source env/activate
pip install loguru
pip install torch
pip install pandas
pip install seaborn
ttrt run ${{ steps.strings.outputs.build-output-dir }}/test/ttmlir/Silicon