llvm-project/mlir/CONTRIBUTING.md

55 lines
3.1 KiB
Markdown
Raw Normal View History

# How to Contribute
2019-06-29 03:51:30 +08:00
Everyone is welcome to contribute to MLIR. There are several ways of getting involved and contributing including reporting bugs, improving documentation, writing models or tutorials.
2019-06-29 06:00:57 +08:00
Please read our our [Code of Conduct](https://github.com/tensorflow/tensorflow/blob/master/CODE_OF_CONDUCT.md) before participating.
## Community Guidelines
This project follows [Google's Open Source Community
Guidelines](https://opensource.google.com/conduct/).
2019-06-29 03:51:30 +08:00
## How to become a contributor and submit your own code
### Contributor License Agreements
We'd love to accept your patches! Before we can take them, please fill out either the individual or corporate Contributor License Agreement (CLA).
* If you are an individual writing original source code and you're sure you own the intellectual property, then you'll need to sign an [individual CLA](https://code.google.com/legal/individual-cla-v1.0.html).
* If you work for a company that wants to allow you to contribute your work, then you'll need to sign a [corporate CLA](https://code.google.com/legal/corporate-cla-v1.0.html).
Follow either of the two links above to access the appropriate CLA and instructions for how to sign and return it. Once we receive it, we'll be able to accept your pull requests.
***NOTE***: Only original source code from you and other people that have signed the CLA can be accepted into the main repository.
### Contributing code
2019-06-29 06:00:57 +08:00
If you have improvements to MLIR, send us your pull requests! For those
2019-06-29 03:51:30 +08:00
just getting started, Github has a [howto](https://help.github.com/articles/using-pull-requests/).
MLIR team members will be assigned to review your pull requests. Once the pull requests are approved and pass continuous integration checks, a team member will merge your pull request submitted to our internal repository. After the change has been submitted internally, your pull request will be merged automatically on GitHub.
2019-06-29 06:00:57 +08:00
If you want to contribute, start working through the MLIR codebase, navigate to [Github "issues" tab](https://github.com/tensorflow/mlir/issues) and start looking through interesting issues. If you decide to start on an issue, leave a comment so that other people know that you're working on it. If you want to help out, but not alone, use the issue comment thread to coordinate.
2019-06-29 03:51:30 +08:00
### Contribution guidelines and standards
* Follow coding style (see below).
* Ensure that you use the correct license. Examples are provided below.
2019-06-29 06:11:04 +08:00
* Include tests when you contribute new features, as they help to a)
2019-06-29 03:51:30 +08:00
prove that your code works correctly, and b) guard against future breaking
changes to lower the maintenance cost.
* Bug fixes also generally require unit tests, because the presence of bugs
usually indicates insufficient test coverage.
#### License
Include a license at the top of new files.
2019-06-29 06:00:57 +08:00
* [C/C++ license example](https://github.com/tensorflow/mlir/blob/master/examples/toy/Ch1/toyc.cpp)
* [Python license example](https://github.com/tensorflow/mlir/blob/master/bindings/python/test/test_py2and3.py)
2019-06-29 03:51:30 +08:00
#### C++ coding style
2019-06-29 06:05:13 +08:00
Changes to MLIR C++ code should conform to
2019-06-29 03:51:30 +08:00
[LLVM Coding standards](https://llvm.org/docs/CodingStandards.html).