Building and Uplifting Demos
Working on models is incredibly exciting where exploratory work is done under the models/experimental folders
allowing the freedom to try new ideas and improve performance using Tenstorrent hardware. When a model is ready
to be showcased, we have a few important questions to answer before it is moved to our models/demos folder.
What you see below highlights the expectations for all our models that successfully migrate into the models/demos folder.
- 
- Does your model have good documentation?
- 
- 
- We expect a README.mdfile within your model’s folder that describes what the model is doing and how to run the model. This documentation should also include:
- 
- The origin of the model and credit to the originating authors, as appropriate. 
- Examples of how to use the model, including any necessary installation steps or dependencies. 
- A section on troubleshooting common issues or errors users might encounter. 
 
 
- We expect a 
 
- 
 
- 
- Does your model have a test demonstrating that you have adequately achieved acceptable values for the final Pearson’s correlation coefficient (pcc) and has this been integrated on our CI pipeline?
- 
- Your model should include unit tests that validate its performance metrics, specifically the PCC, to ensure it meets our standards for accuracy. 
- These tests should be integrated into our Continuous Integration (CI) pipeline to automatically run against your model upon every commit. This ensures ongoing compliance and catches any regressions early. 
- Please include documentation in your - README.mdon how to execute these tests locally.
- The PCC check should be included as part of the device and end-to-end performance that will be collected by our CI pipeline when running the appropriate test script. 
 
 
- 
- What are the device performance metrics and have you integrated this on our CI pipeline?
- 
- Document the expected device performance metrics, including but not limited to inference time and memory usage, under a variety of conditions and configurations. 
- Include scripts or instructions to measure these metrics in the - README.md. Ensure these scripts are also part of the CI pipeline to automatically validate the device performance.
- Update the documentation with any special hardware requirements or configurations needed to achieve these performance metrics. 
- Please add your test to the function - run_device_perf_models()within- run_performance.shto collect and report on device metrics. Only tests that have been marked with the annotation- @pytest.mark.models_device_performance_bare_metalwill be scheduled to run.
 
 
- 
- What are the end-to-end performance metrics and have you integrated this on our CI pipeline?
- 
- End-to-end performance metrics should include the time from input preparation to output readiness and any other relevant metrics that apply to the model’s use case. 
- Provide clear instructions or scripts to measure these end-to-end metrics within the - README.md. These should also be incorporated into the CI pipeline for automated testing.
- Discuss any external dependencies or services required for the full operation of your model and how they impact the end-to-end performance. 
- Please add your single-card performance tests to .github/workflows/perf-models-impl.yaml. Only tests marked with - @pytest.mark.models_performance_bare_metalwill be included.
 
 
- 
- Does your model have an end-to-end demo test demonstrating working output generation on real inputs and has this been integrated on our CI pipeline?
- 
- Include a test that demonstrates the model’s functionality and performance on real inputs, such as images or text, to ensure the model is producing the expected output. 
- This test should be integrated into the CI pipeline to ensure the model’s functionality is automatically validated. 
- Provide instructions on how to run this test locally in the - README.md.
- Please add your test within - run_demos_single_card_n150_tests.sh,- run_demos_single_card_n300_tests.sh, and/or- run_t3000_demo_tests.shdepending on the hardware you are targeting.
 
 
For the purpose of organizing your tests to be managed for collecting both device and end-to-end performance, please take a look at test_ttnn_functional_resnet50.py and how the ResNet50TestInfra class was setup.