From 41a2a5bb92b3dd17398b5492fcfdfb95e988b16d Mon Sep 17 00:00:00 2001 From: kkannan Date: Thu, 26 Jun 2025 05:58:44 +0000 Subject: [PATCH] Propose demo script structure --- .gitmodules | 3 +++ demos/tt-forge-fe/cnn/efficientnet_demo.py | 20 ++++++++++++++++++++ third_party/tt_forge_models | 1 + 3 files changed, 24 insertions(+) create mode 100644 .gitmodules create mode 100644 demos/tt-forge-fe/cnn/efficientnet_demo.py create mode 160000 third_party/tt_forge_models diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 000000000..f647b8e71 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "third_party/tt_forge_models"] + path = third_party/tt_forge_models + url = https://github.com/tenstorrent/tt-forge-models.git diff --git a/demos/tt-forge-fe/cnn/efficientnet_demo.py b/demos/tt-forge-fe/cnn/efficientnet_demo.py new file mode 100644 index 000000000..8f0fa213e --- /dev/null +++ b/demos/tt-forge-fe/cnn/efficientnet_demo.py @@ -0,0 +1,20 @@ +# SPDX-FileCopyrightText: © 2025 Tenstorrent AI ULC +# SPDX-License-Identifier: Apache-2.0 + +# Efficientnet Demo Script + +import forge +from third_party.tt_forge_models.efficientnet.pytorch import ModelLoader + +# Load model and input +model = ModelLoader.load_model() +inputs = ModelLoader.load_inputs() + +# Compile the model using Forge +compiled_model = forge.compile(model, sample_inputs=[inputs]) + +# Run inference on Tenstorrent device +output = compiled_model(inputs) + +# Post-process the output +# ModelLoader.print_cls_results(output) diff --git a/third_party/tt_forge_models b/third_party/tt_forge_models new file mode 160000 index 000000000..3b8b567bb --- /dev/null +++ b/third_party/tt_forge_models @@ -0,0 +1 @@ +Subproject commit 3b8b567bb82f8dd573adc6d6ca819fa3d32b7c62