Skip to content

Latest commit

 

History

History
58 lines (39 loc) · 2.39 KB

CONTRIBUTING.md

File metadata and controls

58 lines (39 loc) · 2.39 KB

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repositories using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

Contributing Code

We encourage contributions such as bug fixes, DirectML kernels, or general performance and stability improvements. For more substantial changes, we ask that you reach out first with GitHub issues or by contacting us directly at [email protected]. This project's focus is currently on improving functional and performance parity with the official CUDA backend, so unrelated changes are less likely to be approved.

Before creating a pull request, make sure to format your change in accordance with TensorFlow's coding style (see below).

C++ coding style

Changes to TensorFlow C++ code should conform to Google C++ Style Guide.

Use clang-tidy to check your C/C++ changes. To install clang-tidy on ubuntu:16.04, do:

apt-get install -y clang-tidy

You can check a C/C++ file by doing:

clang-format <my_cc_file> --style=google > /tmp/my_cc_file.cc
diff <my_cc_file> /tmp/my_cc_file.cc

Python coding style

Changes to TensorFlow Python code should conform to Google Python Style Guide

Use pylint to check your Python changes. To install pylint and retrieve TensorFlow's custom style definition:

pip install pylint
wget -O /tmp/pylintrc https://raw.githubusercontent.com/tensorflow/tensorflow/master/tensorflow/tools/ci_build/pylintrc

To check a file with pylint:

pylint --rcfile=/tmp/pylintrc myfile.py