-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Separate workflows for build and running tests.
- Loading branch information
Showing
5 changed files
with
138 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -121,6 +121,9 @@ jobs: | |
echo "build-output-dir=$(pwd)/build" >> "$GITHUB_OUTPUT" | ||
echo "install-output-dir=$(pwd)/install" >> "$GITHUB_OUTPUT" | ||
- name: Git safe dir | ||
run: git config --global --add safe.directory ${{ steps.strings.outputs.work-dir }} | ||
|
||
- name: ccache | ||
uses: hendrikmuhs/[email protected] | ||
with: | ||
|
@@ -134,6 +137,7 @@ jobs: | |
source env/activate | ||
cmake -G Ninja \ | ||
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ | ||
-DCMAKE_INSTALL_PREFIX=${{ steps.strings.outputs.install-output-dir }} \ | ||
-B ${{ steps.strings.outputs.build-output-dir }} \ | ||
-S ${{ steps.strings.outputs.work-dir }} | ||
|
@@ -144,9 +148,45 @@ jobs: | |
cmake --build ${{ steps.strings.outputs.build-output-dir }} | ||
cmake --install ${{ steps.strings.outputs.build-output-dir }} | ||
- name: Copy tt-metal binaries | ||
shell: bash | ||
working-directory: ${{ steps.strings.outputs.install-output-dir }} | ||
run: cp ${{ steps.strings.outputs.work-dir }}/third_party/tt-mlir/src/tt-mlir/third_party/tt-metal/src/tt-metal-build/lib/*.so lib/ | ||
|
||
- name: Copy libfmt | ||
shell: bash | ||
working-directory: ${{ steps.strings.outputs.install-output-dir }} | ||
run: cp ${{ steps.strings.outputs.work-dir }}/third_party/tt-mlir/src/tt-mlir/third_party/tt-metal/src/tt-metal-build/_deps/fmt-build/*.so* lib/ | ||
|
||
- name: Copy libnng | ||
shell: bash | ||
working-directory: ${{ steps.strings.outputs.install-output-dir }} | ||
run: cp ${{ steps.strings.outputs.work-dir }}/third_party/tt-mlir/src/tt-mlir/third_party/tt-metal/src/tt-metal-build/_deps/nanomsg-build/*.so* lib/ | ||
|
||
- name: Copy libuv | ||
shell: bash | ||
working-directory: ${{ steps.strings.outputs.install-output-dir }} | ||
run: cp ${{ steps.strings.outputs.work-dir }}/third_party/tt-mlir/src/tt-mlir/third_party/tt-metal/src/tt-metal-build/_deps/libuv-build/*.so* lib/ | ||
|
||
- name: Run tests | ||
shell: bash | ||
run: | | ||
export LD_LIBRARY_PATH="/opt/ttmlir-toolchain/lib/:${{ steps.strings.outputs.install-output-dir }}/lib:${LD_LIBRARY_PATH}" | ||
source env/activate | ||
pytest -v tests --ignore=tests/models | ||
- name: Copy descriptor | ||
shell: bash | ||
working-directory: ${{ steps.strings.outputs.install-output-dir }} | ||
run: cp ${{ steps.strings.outputs.work-dir }}/third_party/tt-mlir/src/tt-mlir/third_party/tt-metal/src/tt-metal/.umd/cluster_desc.yaml lib/ | ||
|
||
- name: 'Tar install directory' | ||
shell: bash | ||
working-directory: ${{ steps.strings.outputs.install-output-dir }} | ||
run: tar cvf artifact.tar . | ||
|
||
- name: Upload install folder to archive | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: install-artifacts | ||
path: ${{ steps.strings.outputs.install-output-dir }}/artifact.tar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
name: Test | ||
|
||
on: | ||
workflow_dispatch: | ||
workflow_call: | ||
workflow_run: | ||
workflows: [Build] | ||
types: [completed] | ||
|
||
jobs: | ||
tests: | ||
timeout-minutes: 120 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
build: [ | ||
{runs-on: n150, name: "run"}, | ||
] | ||
|
||
runs-on: | ||
- in-service | ||
- ${{ matrix.build.runs-on }} | ||
|
||
container: | ||
image: ghcr.io/tenstorrent/tt-torch/tt-torch-ci-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: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
lfs: true | ||
|
||
- name: Set reusable strings | ||
id: strings | ||
shell: bash | ||
run: | | ||
echo "work-dir=$(pwd)" >> "$GITHUB_OUTPUT" | ||
echo "build-output-dir=$(pwd)/build" >> "$GITHUB_OUTPUT" | ||
echo "install-output-dir=$(pwd)/install" >> "$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: install-artifacts | ||
path: ${{ steps.strings.outputs.install-output-dir }} | ||
|
||
- name: 'Untar install directory' | ||
shell: bash | ||
working-directory: ${{ steps.strings.outputs.install-output-dir }} | ||
run: tar xvf artifact.tar | ||
|
||
- name: make tt-metal directories | ||
shell: bash | ||
working-directory: ${{ steps.strings.outputs.install-output-dir }} | ||
run: mkdir -p ${{ steps.strings.outputs.work-dir }}/third_party/tt-mlir/src/tt-mlir/third_party/tt-metal/src/tt-metal/.umd | ||
|
||
- name: copy descriptor | ||
shell: bash | ||
working-directory: ${{ steps.strings.outputs.install-output-dir }} | ||
run: cp ${{ steps.strings.outputs.install-output-dir }}/lib/cluster_desc.yaml ${{ steps.strings.outputs.work-dir }}/third_party/tt-mlir/src/tt-mlir/third_party/tt-metal/src/tt-metal/.umd | ||
|
||
- name: Run tests | ||
shell: bash | ||
run: | | ||
echo $pwd | ||
echo ${{ steps.strings.outputs.install-output-dir }} | ||
echo ${{ steps.strings.outputs.build-output-dir }}/ | ||
source env/activate | ||
export LD_LIBRARY_PATH="/opt/ttmlir-toolchain/lib/:${{ steps.strings.outputs.install-output-dir }}/lib:${{ steps.strings.outputs.build-output-dir }}/lib:./lib/:${LD_LIBRARY_PATH}" | ||
pytest -sv tests --ignore=tests/models |