First of all, thanks for taking the time to contribute!
We welcome contributions to the Chitu project! This document provides guidelines and instructions for contributing.
- Use
black
to format your Python code - Use descriptive variable names
- Add docstrings for all public functions and classes
- Keep functions focused and single-purpose
- Add type hints where possible
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests for new functionality
- Update documentation
- Submit a pull request
When submitting optimizations:
- Run the standard benchmark suite in
benchmarks/
- Include before/after performance metrics
- Document any hardware/software requirements
- Unit tests: test/pytest contains all the unit tests. Run it with pytest test/ptest. Please ensure all tests pass before submitting a PR.
- Integrated tests: Inference of full models can be tested by test/single_req_test.py. Since many of the test cases require a dedicated hardware, currently we perform the tests only in Qingcheng.AI's private environment. Qingcheng.AI employees will help you validate and improve your PR through the tests.
- Performance tests for optimizatinos are welcome but not required.