We welcome any contributions to LBANN in the form of Pull Requests. Please follow the guidelines below for more information.
If you have not added yourself to the authors list in CONTRIBUTORS, please do so in the appropriate place.
When ready for review and merge, Pull Requests must match the latest develop
branch commit.
If not ready, rebase the commits onto the latest commit. Avoid merge commits.
For C/C++ and GPU code, we follow the LLVM coding style with adaptations, see the coding style README and the clang-format configuration for more information.
For Python code, we follow the Google coding style guidelines, but allow some exceptions to create layers in the LBANN Python frontend.
To enforce file formatting at every commit, you can use the pre-commit hook provided in the repository.
Make a symbolic link from .git/hooks/pre-commit
to our script by running the following command
from the root of your git repository:
user@/path/to/lbann$ ln -s ../../scripts/pre-commit-hook.sh .git/hooks/pre-commit
Make sure you have clang-format
installed for C/C++ formatting. If you do not have it installed in the path,
you may override it by setting the $CLANG_FORMAT
environment variable to its path.