[sgl-kernel] fix: make sgl-kernel build respect MAX_JOBS (#15575)

This commit is contained in:
shuwenn
2025-12-31 10:44:45 +08:00
committed by GitHub
parent 5bf0d862dd
commit c0fc7a89e7
2 changed files with 29 additions and 1 deletions
+11
View File
@@ -32,6 +32,17 @@ Requires
make build
```
### Limit build resource usage (CPU / parallelism)
By default, `make build` uses all available CPU cores. You can override build parallelism and NVCC compile threads:
```bash
# Limit parallel jobs (controls both make and cmake parallelism)
make build MAX_JOBS=2
# Additionally limit NVCC internal threads (reduces CPU and peak memory)
make build MAX_JOBS=2 CMAKE_ARGS="-DSGL_KERNEL_COMPILE_THREADS=1"
## Contribution
### Steps to add a new kernel: