build: auto-fetch prebuilt wheels in install_deps.sh (Hopper), fall back to source - #322
Draft
Andrewxu313 wants to merge 8 commits into
Draft
build: auto-fetch prebuilt wheels in install_deps.sh (Hopper), fall back to source#322Andrewxu313 wants to merge 8 commits into
Andrewxu313 wants to merge 8 commits into
Conversation
…ack to source install_deps.sh now tries matching pre-built wheels (flash-attn 3, FlashMLA, DeepGEMM, batchgen_kernels) from the public GitHub release for the detected Python/GPU-arch and installs them (~2 min, no compile); if the complete set is not available it transparently falls back to building from source. Adds --from-source and --release-tag, skips batchgen_kernels recompile when a wheel is already present, and keeps the local --wheel-dir path intact.
9 tasks
…nd nvcc, warn on CUDA-major mismatch) check_prerequisites used 'bc' for the Python version check, which breaks on minimal images without bc (e.g. fresh Ubuntu 22.04 GPU pods) — replaced with a pure-python comparison. Also auto-add a CUDA toolkit under /usr/local/cuda* to PATH (preferring 12.x) when nvcc isn't found, and warn loudly when the CUDA major != 12 (reference is 12.8/torch2.9+cu128) so a mismatch fails clearly upfront instead of cryptically mid-build. Surfaced validating source install on a fresh Hopper H20 node.
--from-source (and --skip-gpu-check/--wheel-dir/--release-tag/--keep-build) passed alone left INSTALL_ALL=0 with every target flag 0, so the script built nothing yet printed 'Installation complete!'. Default to a full install unless a target flag explicitly narrows it.
Lets users point at a CUDA 12.8 toolkit provisioned to a non-standard prefix, or override a mismatched system nvcc (e.g. a CUDA 13 fleet image), which the prior /usr/local-only scan could not reach. Guidance now names CUDA_HOME.
…weight daemon The core_engine JIT (first server launch) compiles Weights_Storage/distributed_weight_daemon.cpp, which uses the UCP memory-handle API (UCP_OP_ATTR_FIELD_MEMH) added in UCX 1.14. A fresh Ubuntu node has no UCX, and apt only offers 1.12 (too old) -> the JIT fails with 'ucp/api/ucp.h: No such file' or the memh compile error, so the server never starts. Build UCX 1.17 from source to /usr/local when a suitable UCX is absent; skip if UCX >=1.14 already present.
…ch main package) Prevents a user landing on Python 3.10, which the main batchgen package rejects and for which no cp310 prebuilt wheels exist.
…build The core_engine distributed-weight daemon needs UCX >=1.14 (UCP memh API). Declare libucx-cu12 (manylinux wheel, ships headers+libs, portable, no compiler/OS-pkg) in requirements.txt; point the core_engine JIT include/link at the wheel and bake an rpath so libucp/libuct/libucs/libucm resolve at runtime; preload via libucx.load_library() in engine_loader as a belt-and-suspenders. Removes install_deps.sh's from-source UCX build (install_ucx_dev). Falls back to a system UCX if the wheel is absent.
…cal --model, core_engine warm) - server_args: fail fast with a clear message when --host-kv-cache-size is omitted (was a cryptic 'NoneType * int' crash deep in the worker at startup). - worker_manager: if --model is a local directory, use it directly as cache_dir (skip snapshot_download, which rejected a filesystem path as an HF repo id). - install_deps: warm the core_engine JIT at install time so the first server launch needs no CUDA_HOME / nvcc on PATH (CPU-only compile; non-fatal on failure).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Make the canonical source install fast by default:
install_deps.shnow tries matching pre-built wheels (flash-attn 3, FlashMLA, DeepGEMM, batchgen_kernels) from the public GitHub release for the detected(python, GPU-arch)and installs them (~2 min, no compile), and transparently falls back to a full source build if the complete set isn't available for that environment.try_download_wheels()(Hopper): GitHub-API asset lookup → filter by python-ABI +BUILD_ARCH→curlinto$INSTALL_DIR/prebuilt_wheels→ all-or-nothing (a partial/missing set falls back to source).install_batchgen_kernelsnow skips compilation whenbatchgen_kernelsis already importable (e.g. from a wheel) — matches the existing FA3/FlashMLA/DeepGEMM guards.--from-source(force compile) and--release-tag TAG/BATCHGEN_RELEASE_TAG. Existing local--wheel-dirpath unchanged.bash -n+ a unit test of the asset filter; needs one Hopper-node run to confirm end-to-end.Motivation
pip-from-PyPI and a per-config wheel matrix are out of scope (see release discussion); the canonical distribution is source install via
install_deps.sh. This removes the manual "download wheels from GitHub Releases" step and the 40–60 min compile for users whose env matches the reference build, while keeping source-build as the universal fallback — the same UX model aspip install flash-attn.Type of Change
model— add/extend model support (models/**+ registration seam + model kernels only)kernel— add/optimize a compute kernel (batchgen_kernels/**+ in-tree kernel dirs)core— change scheduling/serving/runtime scaffolding (the only type that may)fix— narrow bug fix (+ a regression test)infra— build / CI / packaging / scripts / Dockerdocs— documentation onlyFile changes
scripts/install_deps.sh--from-source/--release-tag; skipbatchgen_kernelsrecompile if already installedChecklist