Thank you for your interest in contributing to Liger-Kernel! This guide will help you set up your development environment, add a new kernel, run tests, and submit a pull request (PR).
@ByronHsu(admin) @qingquansong @yundai424 @kvignesh1420 @lancerts @JasonZhu1313
Leave #take
in the comment and tag the maintainer.
- Clone the Repository
git clone https://github.com/linkedin/Liger-Kernel.git cd Liger-Kernel
- Install Dependencies and Editable Package
If encounter error
pip install . -e[dev]
no matches found: .[dev]
, please usepip install -e .'[dev]'
To get familiar with the folder structure, please refer to https://github.com/linkedin/Liger-Kernel?tab=readme-ov-file#structure.
-
Create Your Kernel Add your kernel implementation in
src/liger_kernel/
. -
Add Unit Tests Create unit tests and convergence tests for your kernel in the tests directory. Ensure that your tests cover all kernel functionalities.
- run
make test
to ensure correctness. - run
make checkstyle
to ensure code style. - run
make test-convergence
to ensure convergence.
python -m pytest test_sample.py::test_function_name
Fork the repo, copy and paste the successful test logs in the PR and submit the PR followed by the PR template (example PR).
As a contributor, you represent that the code you submit is your original work or that of your employer (in which case you represent you have the right to bind your employer). By submitting code, you (and, if applicable, your employer) are licensing the submitted code to LinkedIn and the open source community subject to the BSD 2-Clause license.
- Bump the version in setup.py
- Submit a PR and merge
- Create a new release based on the current HEAD
- New pip uploading will be triggered upon a new release