Workflow

Our development community has been growing fastly; it doesn't make sense for everyone to write into the official repo. So, please file Pull Requests from your fork. To make a fork, just head over to the GitHub page and click the "Fork" button.

Clone

To make a copy of your fork to your local computers, please run

git clone https://github.com/your-github-account/paddle
cd paddle

Create the local feature branch

For daily works like adding a new feature or fixing a bug, please open your feature branch before coding:

git checkout -b my-cool-stuff

Commit

Before issuing your first git commit command, please install pre-commit by running the following commands:

Coding Standard

Code Style

Our build process helps to check the code style. In build.sh, the entry point of our builder Docker image, the CMake argument WITH_STYLE_CHECK is set to ON by default. This flag is on

Please install pre-commit, which automatically reformat the changes to C/C++ and Python code whenever we run git commit. To check the whole codebase, we can run the command pre-commit run -a, as in the check_style.sh file, which is invoked by our Travis CI configuration.

This will enable VLOG messages generated by buddy_allocator.{h,cc} and in the verbose range of 0 to 3, so you will see above example VLOG message, which is in level 3. This suggests that we output overall messages in lower verbose levels, so they display with higher probability. When coding C++, please follow the verbose level convention as follows: