docs: add README build mode guidance - #2120
Conversation
Greptile SummaryThis PR adds a new "Installation / build modes" section to the root README, documenting three build paths: a prebuilt pip install, a CPU-only AVX2 source build, and a CUDA source build for heterogeneous serving. It also clarifies the scope of
Confidence Score: 5/5Documentation-only change; all three build paths have been verified against the actual install.sh scripts and are correct. The CPU-only build correctly uses Files Needing Attention: No files require special attention.
|
| Filename | Overview |
|---|---|
| README.md | Adds an 'Installation / build modes' section with three build paths (prebuilt, CPU-only source, CUDA source); commands are correct against the actual install.sh scripts |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[User wants to install ktransformers] --> B{Build path?}
B --> C[Prebuilt]
B --> D[CPU-only source]
B --> E[CUDA source]
C --> C1["pip install kt-kernel sglang-kt"]
D --> D1["git clone --recursive"]
D1 --> D2["cd ktransformers/kt-kernel"]
D2 --> D3["CPUINFER_USE_CUDA=0 CPUINFER_CPU_INSTRUCT=AVX2\n./install.sh all --manual"]
D3 --> D4["install_dependencies (libhwloc-dev, pkg-config)"]
D4 --> D5["build_step --manual (AVX2, no CUDA)"]
E --> E1["cd /path/to/ktransformers"]
E1 --> E2["CPUINFER_USE_CUDA=1 ./install.sh all"]
E2 --> E3["init_submodules"]
E3 --> E4["install_deps - kt-kernel/install.sh deps"]
E4 --> E5["install_sglang"]
E5 --> E6["install_kt_kernel - kt-kernel/install.sh build (CUDA)"]
Reviews (2): Last reviewed commit: "[docs]: use all for fresh CPU build mode" | Re-trigger Greptile
|
Thanks for the review — I pushed Changes made:
Validation:
|
Summary
balance_serveremains a CPU-GPU heterogeneous serving path.Refs #1187
Test Plan
pythonREADME guard check for the new build-mode text./install.sh --helpoutput contains--manualkt-kernel/install.sh --helpoutput containsCPUINFER_CPU_INSTRUCTandCPUINFER_ENABLE_AMXgit diff --check HEAD~1..HEAD