Improve docs and developer guide (#9044)
This commit is contained in:
@@ -69,9 +69,10 @@ Another effective strategy is to review the file modification history and contac
|
||||
If you modify files protected by code owners, their approval is required to merge the code.
|
||||
|
||||
## General Code Style
|
||||
- Avoid code duplication. If the same code snippet (more than 5 lines) appears multiple times, extract it into a shared function.
|
||||
- Minimize device synchronization. Reduce expensive CPU-GPU synchronization operations, such as `tensor.item()` or `tensor.cpu()`, as much as possible. Use vectorized code instead.
|
||||
- Keep files short. If a file exceeds 2,000 lines of code, please split it into multiple smaller files.
|
||||
- Avoid code duplication. If the same code snippet (more than five lines) appears multiple times, extract it into a shared function.
|
||||
- Minimize device synchronization. Reduce expensive CPU-GPU synchronization operations, such as `tensor.item()` or `tensor.cpu()`, whenever possible. Use vectorized code.
|
||||
- Keep files concise. If a file exceeds 2,000 lines of code, split it into multiple smaller files.
|
||||
- Prioritize extreme efficiency. SGLang is a runtime, and most of your code runs on the critical path for every request. Optimize every minor overhead as much as possible.
|
||||
|
||||
## Tips for newcomers
|
||||
|
||||
|
||||
Reference in New Issue
Block a user