You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create a new feature branch for your work and switch to it. Give it a
meaningful name related to the task(s) at hand:
# to do both steps at once:
git checkout -b my_new_feature_branch
# or separately:
git branch my_new_feature_branch
git checkout my_new_feature_branch
Locally build neon, with your build type configured (eg. with GPU):
# to setup your build type defaults for all future commands, edit setup.cfg
vi setup.cfg
make develop
# or
make build
# or override for a specific command
make -e DEV=1 DIST=1 GPU=cudanet develop
Ideally you'd start by creating one or more unit tests with the
functionality you expect your new feature to perform. These should reside
under the appropriate tests subdirectory of whatever you are changing.
Then hack away at the code until you feel your feature is complete. Once
satisfied, run the code through the tests and various style checking:
make test# ensure all are OK for each of your build types
make sanity # again ensure all pass OK
make style # ensure there are no style related issues
make speed # ensure there are no performance regressions
make grad # ensure sample gradient checks all pass OK
make lint # (optional). We still have a fair bit to clean up currently!
If necessary you may want to update and/or rebuild the documentation.
This all exists under doc/source and is in
Sphinx Restructed Text format:
make doc # builds documentation locally
Commit your changes and push your feature branch to ypur github fork. Be
sure to add a descriptive message and reference the github issue associated
with your task (ex. #1). You can create a sequence of separate commits in
this manner if your task is better broken down into separate components:
Create a new pull request to get your feature branch merged into master for
others to use. You'll first need to ensure your feature branch contains the
latest changes from master. Furthermore, internal devs will need to assign
the request to someone else for a code review. You should also ensure all
your tests pass when run through the items defined in step 5.
# (external contribs): make a new pull request:
https://github.com/NervanaSystems/neon/pulls
# merge latest master changes into your feature branch
git fetch origin
git checkout master
git pull origin master
git checkout my_new_feature_branch
git merge master # you may need to manually resolve any merge conflicts
If there are issues you can continue to push commits to your feature branch
by following step 7. They will automatically be added to this same merge
request.
Once your change has been successfully merged, you can remove the source
branch and ensure your local copy is up to date: