From adfe5bf1d481d79556c588a92da0b52f0088bd27 Mon Sep 17 00:00:00 2001 From: Tapasvi Patel Date: Thu, 1 Aug 2024 16:45:03 +0000 Subject: [PATCH] #104: Add ttrt functional and performance tests to CI --- .github/workflows/ttrt-flatbuffer-ttnn.yml | 92 +++++++++++++++++++++ test/system_desc/n150.ttsys | Bin 0 -> 264 bytes test/system_desc/n300.ttsys | Bin 0 -> 264 bytes 3 files changed, 92 insertions(+) create mode 100644 .github/workflows/ttrt-flatbuffer-ttnn.yml create mode 100644 test/system_desc/n150.ttsys create mode 100644 test/system_desc/n300.ttsys diff --git a/.github/workflows/ttrt-flatbuffer-ttnn.yml b/.github/workflows/ttrt-flatbuffer-ttnn.yml new file mode 100644 index 0000000000..6ca6707966 --- /dev/null +++ b/.github/workflows/ttrt-flatbuffer-ttnn.yml @@ -0,0 +1,92 @@ +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 + diff --git a/test/system_desc/n150.ttsys b/test/system_desc/n150.ttsys new file mode 100644 index 0000000000000000000000000000000000000000..8e571afe115fe155fae15a12e31b27876cc169c6 GIT binary patch literal 264 zcmZXOF%N<;5QU$yiI^C|z`)?Z;J{cZg_8ISjGHWu(1gXLPR76QJBpK+eD`|S>-DJ( zPyiT)`-6f5E5)24XO3~D$V@_RWJliN8D5`&if8MMtDSaJ*Ue*NjOoo}y|24->zdi> zvA0I+)&c3VJz4jse0w39oQV9Vhy-o@h4i-McPA>oa&Ay`SJHLGs=$#s&h4qC$%eeg=lJ@JsCYJh@U3YcHX2=PsSI~-ga zqjtxp^#Mqy?a8t~<=ZpSWKZNjMI>nJFQm67zdNboE9VA9cO_j{R0Vd-^PG4VWOqi& Kg;`NdUEm9O{u6`% literal 0 HcmV?d00001