-
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.
- Loading branch information
Showing
5 changed files
with
141 additions
and
15 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,16 +148,42 @@ jobs: | |
cmake --build ${{ steps.strings.outputs.build-output-dir }} | ||
cmake --install ${{ steps.strings.outputs.build-output-dir }} | ||
- name: Run PyTorch tests | ||
- name: Copy tt-metal binaries | ||
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/torch | ||
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: Run ONNX tests | ||
- 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: Copy tt-metal directories | ||
shell: bash | ||
working-directory: ${{ steps.strings.outputs.install-output-dir }} | ||
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/onnx | ||
mkdir tt-metal | ||
cp -r ${{ steps.strings.outputs.work-dir }}/third_party/tt-mlir/src/tt-mlir/third_party/tt-metal/src/tt-metal/tt_metal tt-metal/ | ||
cp -r ${{ steps.strings.outputs.work-dir }}/third_party/tt-mlir/src/tt-mlir/third_party/tt-metal/src/tt-metal/ttnn tt-metal/ | ||
cp -r ${{ steps.strings.outputs.work-dir }}/third_party/tt-mlir/src/tt-mlir/third_party/tt-metal/src/tt-metal/runtime tt-metal/ | ||
- 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,84 @@ | ||
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 directory | ||
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 | ||
|
||
- name: copy tt-metal dirs | ||
shell: bash | ||
working-directory: ${{ steps.strings.outputs.install-output-dir }} | ||
run: | | ||
cp -r ${{ steps.strings.outputs.install-output-dir }}/tt-metal/* ${{ steps.strings.outputs.work-dir }}/third_party/tt-mlir/src/tt-mlir/third_party/tt-metal/src/tt-metal | ||
- name: Run PyTorch tests | ||
shell: bash | ||
run: | | ||
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 -v tests/torch | ||
- name: Run ONNX tests | ||
shell: bash | ||
run: | | ||
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 -v tests/onnx |