Skip to content

Latest commit

 

History

History
106 lines (74 loc) · 3.49 KB

contribution.md

File metadata and controls

106 lines (74 loc) · 3.49 KB

Contribute to BladeDISC

You're welcome to contribute to BladeDISC! Please sign the CLA before contributing to BladeDISC community. This document introduces how to prepare your local development environment and our workflow.

Local Development Environment

Some software is required on your host:

It's recommended to use the official development Docker image to build and test your code:

docker run --rm -it --gpus all -v $PWD:/workspace bladedisc/bladedisc:latest-devel-cuda11.0 bash

you can also find more images on install with docker.

Submit a Pull Request to BladeDISC

BladeDISC uses git branching model, the following steps guide the usual contribution.

  1. Fork

    Most commonly, forks are used to either propose changes to someone else's project or to use someone else's project as a starting point for your idea. So, please file Pull Requests from your forked repo. To make a fork, just head over to the Github page and click "Fork" button.

  2. Clone

    To make a copy of your repo on your host, please run:

    git clone git@github.com:your-github-account/BladeDISC.git

    Please go to build from source to check how to build and run tests.

  3. Create a Local Feature Branch

    For each feature or fixing a bug, it's recommended to create a new feature branch before coding:

    git checkout -b new_feature_branch
  4. Keep Pulling Upstream

    BladeDISC is growing fast, many features are merged into the official repo, to notice the conflicts early, please pull the official repo often and it's easier to fix the conflicts.

    git remote add upstream https://github.com/alibaba/BladeDISC
    git pull upstream main
  5. Git Commit

    BladeDISC uses the [pre-commit] toolkit to check the code the style for each commit, please install the toolkit before committing:

    python -m pip install pre-commit
    pre-commit install

    Once installation, you will see something like the following when you run git commit command:

    ➜  BladeDISC git:(new_feature) ✗ pre-commit run -a
    copyright_checker........................................................Passed
    
  6. Create a Pull Request

    Once the new feature or the bugfix is done, you can push the local work into your forked repo:

    git push origin new-feature-branch

    The push allows you to create a new pull request when requesting the official repo, please follow this article to create a pull request.

    If your pull request is to fix an exiting issue, please fill in the key word fixes #issue-id to close the issue when the pull request is merged.

    Please feel free to assign a reviewer and assign an associate label on your pull request page.