Skip to content

Commit

Permalink
Add supported models to CI
Browse files Browse the repository at this point in the history
  • Loading branch information
AleksKnezevic committed Jan 13, 2025
1 parent 4853ccb commit 1d981e7
Show file tree
Hide file tree
Showing 13 changed files with 38 additions and 17 deletions.
17 changes: 13 additions & 4 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,15 +107,24 @@ jobs:
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/models/mgp-str-base/test_mgp_str_base.py::test_mgp_str_base[False-eval] \
pytest -v \
tests/models/autoencoder_linear/test_autoencoder_linear.py::test_autoencoder_linear[False-eval] \
tests/models/MobileNetV2/test_MobileNetV2.py::test_MobileNetV2[False-eval] \
tests/models/beit/test_beit_image_classification.py::test_beit_image_classification[False-microsoft/beit-base-patch16-224-eval] \
tests/models/beit/test_beit_image_classification.py::test_beit_image_classification[False-microsoft/beit-large-patch16-224-eval] \
tests/models/perceiver_io/test_perceiver_io.py::test_perceiver_io[False-eval] \
tests/models/detr/test_detr.py::test_detr[False-eval] \
tests/models/glpn_kitti/test_glpn_kitti.py::test_glpn_kitti[False-eval] \
tests/models/mgp-str-base/test_mgp_str_base.py::test_mgp_str_base[False-eval] \
tests/models/mlpmixer/test_mlpmixer.py::test_mlpmixer[False-eval] \
tests/models/mnist/test_mnist.py::test_mnist_train[False-eval] \
tests/models/MobileNetV2/test_MobileNetV2.py::test_MobileNetV2[False-eval] \
tests/models/openpose/test_openpose_v2.py::test_openpose_v2[False-eval] \
tests/models/perceiver_io/test_perceiver_io.py::test_perceiver_io[False-eval] \
tests/models/resnet/test_resnet.py::test_resnet[False-eval] \
tests/models/resnet50/test_resnet50.py::test_resnet[False-eval] \
tests/models/segformer/test_segformer.py::test_segformer[False-eval] \
tests/models/squeeze_bert/test_squeeze_bert.py::test_squeeze_bert[False-eval] \
tests/models/mlpmixer/test_mlpmixer.py::test_mlpmixer[False-eval] \
tests/models/vilt/test_vilt.py::test_vilt[False-eval] \
tests/models/yolov3/test_yolov3.py::test_yolov3[False-eval] \
--junit-xml=${{ steps.strings.outputs.test_report_path_models }}
- name: Upload Test Report Models
Expand Down
2 changes: 0 additions & 2 deletions tests/models/MobileNetV2/test_MobileNetV2.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@ def test_MobileNetV2(record_property, mode, nightly):
cc.consteval_parameters = True
if nightly:
cc.compile_depth = CompileDepth.EXECUTE_OP_BY_OP
else:
cc.compile_depth = CompileDepth.TTNN_IR

tester = ThisTester(model_name, mode, compiler_config=cc)
results = tester.test_model()
Expand Down
2 changes: 2 additions & 0 deletions tests/models/detr/test_detr.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ def test_detr(record_property, mode, nightly):
cc.consteval_parameters = True
if nightly:
cc.compile_depth = CompileDepth.EXECUTE_OP_BY_OP
else:
cc.compile_depth = CompileDepth.TTNN_IR

tester = ThisTester(model_name, mode, compiler_config=cc)
results = tester.test_model()
Expand Down
2 changes: 2 additions & 0 deletions tests/models/glpn_kitti/test_glpn_kitti.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ def test_glpn_kitti(record_property, mode, nightly):
cc.consteval_parameters = True
if nightly:
cc.compile_depth = CompileDepth.EXECUTE_OP_BY_OP
else:
cc.compile_depth = CompileDepth.TTNN_IR

tester = ThisTester(model_name, mode, compiler_config=cc)
results = tester.test_model()
Expand Down
6 changes: 3 additions & 3 deletions tests/models/mlpmixer/test_mlpmixer.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ def test_mlpmixer(record_property, mode, nightly):
cc.consteval_parameters = True
if nightly:
cc.compile_depth = CompileDepth.EXECUTE_OP_BY_OP
else:
cc.compile_depth = CompileDepth.TTNN_IR

tester = ThisTester(model_name, mode, compiler_config=cc)
tester = ThisTester(
model_name, mode, compiler_config=cc
)
results = tester.test_model()
record_property("torch_ttnn", (tester, results))
4 changes: 3 additions & 1 deletion tests/models/mnist/test_mnist.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,9 @@ def test_mnist_train(record_property, mode, nightly):
if nightly:
cc.compile_depth = CompileDepth.EXECUTE_OP_BY_OP

tester = ThisTester(model_name, mode, compiler_config=cc)
tester = ThisTester(
model_name, mode, compiler_config=cc
)
results = tester.test_model()

record_property("torch_ttnn", (tester, results))
6 changes: 3 additions & 3 deletions tests/models/openpose/test_openpose_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,10 @@ def test_openpose_v2(record_property, mode, nightly):
cc.consteval_parameters = True
if nightly:
cc.compile_depth = CompileDepth.EXECUTE_OP_BY_OP
else:
cc.compile_depth = CompileDepth.TTNN_IR

tester = ThisTester(model_name, mode, compiler_config=cc)
tester = ThisTester(
model_name, mode, compiler_config=cc
)
results = tester.test_model()
if mode == "eval":
print(f"Output: {results}")
Expand Down
2 changes: 0 additions & 2 deletions tests/models/perceiver_io/test_perceiver_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@ def test_perceiver_io(record_property, mode, nightly):
cc.consteval_parameters = True
if nightly:
cc.compile_depth = CompileDepth.EXECUTE_OP_BY_OP
else:
cc.compile_depth = CompileDepth.TTNN_IR

tester = ThisTester(model_name, mode, compiler_config=cc)
results = tester.test_model()
Expand Down
4 changes: 3 additions & 1 deletion tests/models/resnet/test_resnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ def test_resnet(record_property, mode, nightly):
if nightly:
cc.compile_depth = CompileDepth.EXECUTE_OP_BY_OP

tester = ThisTester(model_name, mode, compiler_config=cc)
tester = ThisTester(
model_name, mode, compiler_config=cc
)
results = tester.test_model()

# Check inference result
Expand Down
2 changes: 2 additions & 0 deletions tests/models/resnet50/test_resnet50.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ def test_resnet(record_property, mode, nightly):
cc.consteval_parameters = True
if nightly:
cc.compile_depth = CompileDepth.EXECUTE_OP_BY_OP
else:
cc.compile_depth = CompileDepth.TTNN_IR

tester = ThisTester(model_name, mode, compiler_config=cc)
results = tester.test_model()
Expand Down
2 changes: 2 additions & 0 deletions tests/models/segformer/test_segformer.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ def test_segformer(record_property, mode, nightly):
cc.consteval_parameters = True
if nightly:
cc.compile_depth = CompileDepth.EXECUTE_OP_BY_OP
else:
cc.compile_depth = CompileDepth.TTNN_IR

tester = ThisTester(model_name, mode, compiler_config=cc)
results = tester.test_model()
Expand Down
2 changes: 2 additions & 0 deletions tests/models/vilt/test_vilt.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ def test_vilt(record_property, mode, nightly):
cc.consteval_parameters = True
if nightly:
cc.compile_depth = CompileDepth.EXECUTE_OP_BY_OP
else:
cc.compile_depth = CompileDepth.TTNN_IR

tester = ThisTester(model_name, mode, compiler_config=cc)
results = tester.test_model()
Expand Down
4 changes: 3 additions & 1 deletion tests/models/yolov3/test_yolov3.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@ def test_yolov3(record_property, mode, nightly):
if nightly:
cc.compile_depth = CompileDepth.EXECUTE_OP_BY_OP

tester = ThisTester(model_name, mode, compiler_config=cc)
tester = ThisTester(
model_name, mode, compiler_config=cc
)
results = tester.test_model()

record_property("torch_ttnn", (tester, results))

0 comments on commit 1d981e7

Please sign in to comment.