Repository navigation
Releases
foundry-core 0.1.0rc5
foundry-core 0.1.0rc5. Release notes: RELEASE.md in this tag.
PyPI wheels (pip install foundry-core==0.1.0rc5) are built for the first pair of
[{"torch": "2.14.1", "cuda": "cu130"}, {"torch": "2.13.0", "cuda": "cu130"}] (CPython 3.10-3.13, manylinux_2_28 x86_64). Wheels with a local version
(+cuNNN.torchA.B) target other torch/CUDA pairs. Every pair has a package index:
pip install foundry-core==0.1.0rc5 --extra-index-url https://foundry-org.github.io/foundry/whl/<cuda>/torch<A.B>/
(for example https://foundry-org.github.io/foundry/whl/cu130/torch2.13/), or install the wheel by URL from this page.
foundry.ops only loads with the torch major.minor and CUDA major it was built for.
foundry-core 0.1.0rc4
foundry-core 0.1.0rc4. Release notes: RELEASE.md in this tag.
PyPI wheels (pip install foundry-core==0.1.0rc4) are built for the first pair of
[{"torch": "2.14.1", "cuda": "cu130"}, {"torch": "2.13.0", "cuda": "cu130"}] (CPython 3.10-3.13, manylinux_2_28 x86_64). Wheels with a local version
(+cuNNN.torchA.B) target other torch/CUDA pairs. Every pair has a package index:
pip install foundry-core==0.1.0rc4 --extra-index-url https://foundry-org.github.io/foundry/whl/<cuda>/torch<A.B>/
(for example https://foundry-org.github.io/foundry/whl/cu130/torch2.13/), or install the wheel by URL from this page.
foundry.ops only loads with the torch major.minor and CUDA major it was built for.
foundry-core 0.1.0rc3
foundry-core 0.1.0rc3. Release notes: RELEASE.md in this tag.
PyPI wheels (pip install foundry-core==0.1.0rc3) are built for the first pair of
[{"torch": "2.14.1", "cuda": "cu130"}, {"torch": "2.13.0", "cuda": "cu130"}] (CPython 3.10-3.13, manylinux_2_28 x86_64). Wheels with a local version
(+cuNNN.torchA.B) target other torch/CUDA pairs. Every pair has a package index:
pip install foundry-core==0.1.0rc3 --extra-index-url https://foundry-org.github.io/foundry/whl/<cuda>/torch<A.B>/
(for example https://foundry-org.github.io/foundry/whl/cu130/torch2.13/), or install the wheel by URL from this page.
foundry.ops only loads with the torch major.minor and CUDA major it was built for.
foundry-core 0.1.0rc2
foundry-core 0.1.0rc2. Release notes: RELEASE.md in this tag.
PyPI wheels (pip install foundry-core==0.1.0rc2) are built for the first pair of
[{"torch": "2.14.1", "cuda": "cu130"}, {"torch": "2.13.0", "cuda": "cu130"}] (CPython 3.10-3.13, manylinux_2_28 x86_64). Wheels with a local version
(+cuNNN.torchA.B) target other torch/CUDA pairs. Every pair has a package index:
pip install foundry-core==0.1.0rc2 --extra-index-url https://foundry-org.github.io/foundry/whl/<cuda>/torch<A.B>/
(for example https://foundry-org.github.io/foundry/whl/cu130/torch2.13/), or install the wheel by URL from this page.
foundry.ops only loads with the torch major.minor and CUDA major it was built for.
foundry-core 0.1.0rc1
Assets: sdist and manylinux_2_28 wheels for CPython 3.10-3.13 (torch 2.13.0 / cu130). Publishing creates the tag; the release workflow then rebuilds the assets, uploads them to PyPI (pip install foundry-core==0.1.0rc1) and re-attaches them here.
Release candidate of 0.1.0: the first release on PyPI (foundry-core, import
name foundry) and the first one SGLang can depend on. It carries everything
since 0.0.3.
Highlights
pip install foundry-core. manylinux_2_28 wheels for CPython 3.10-3.13,
built against torch 2.13.0 / cu130; the wheel requirestorch==2.13.0.
Importing under another torch or CUDA major raises a readableImportError.- Optional SGLang dependency. Installing Foundry does not require SGLang;
an SGLang started with--cuda-graph-persistence {save,load}requires
Foundry (pip install "sglang[foundry]") and calls
foundry.integration.sglang.apifrom its own call sites. Settings a
restored graph cannot replay are pinned with a reason; unsupported features
are rejected at resolution.python -m foundry.integration.sglang.preflight
checks a launch beforehand. - Prefill CUDA graphs are saved and restored next to the decode graphs.
With power-of-two buckets, prefill TTFT and throughput of a LOADed engine
match native capture. - LOAD re-runs SGLang's own capture loop and substitutes only
capture_one; the restore time is logged apart from the loop. - Faster restore: 0.5-1.6 s per rank for 128 decode graphs on 30B-235B
models (binary templates, build/instantiate pipeline, exec-pool prewarm).
Non-portable cluster kernels are opted in on restore. - No Boost runtime dependency. Boost is header-only (vendored subset under
third_party/boost, system Boost >= 1.83 as fallback);std::filesystem
replacesboost::filesystem.
Fixes
- SAVE over-read every fatbin (30 s per rank in distributed init, 4-5 GB
archives); the packed image is now 30-35 MB and mmap'd on LOAD. - One preallocation mechanism on LOAD (backing segments, fenced release,
on-demand holes). - Qwen3.5 + FlashInfer LOAD divergence.
- Optional udev-wait shim for bare hosts with blocked verbs devices
(tools/host/no_cdev_wait.c, TOMLverbs_udev_wait_shim_path). - The hook preload is scoped to the scheduler spawn; only schedulers and the
DP controller carryLD_PRELOAD.
Validation
4xH200, SGLang main with --cuda-graph-persistence: Qwen3-30B-A3B-FP8 (real
weights, 7 layouts), Qwen3-235B-A22B-FP8, Qwen3.5-122B-A10B-FP8,
Qwen3.5-35B-A3B, DeepSeek-V4-Flash-FP8, GLM-5.3-Flash and gpt-oss-120b in EP,
TP and DP-attention layouts. Every row restores in 0.5-1.6 s per rank, reaches
/health within a few seconds of the eager engine, and greedy output, TTFT
and TPOT match native capture (docs/sglang/validated-configs.md).
Packaging
FOUNDRY_WHEEL_BUILD=1builds a relocatable wheel;FOUNDRY_SDIST=1builds
the sdist without a CUDA toolkit..github/workflows/release.ymlbuilds, repairs, smoke-tests and publishes
(PyPI trusted publishing + GitHub Release);tools/release/build_wheel.sh
runs the same steps locally. Seedocs/release.md.
Upgrading
pip uninstall foundrybefore installingfoundry-core.- Archives written before this release (
capture_loop_version< 2) must be
re-SAVEd. - Source builds need Boost headers only (no
libboost-*libraries). - Other torch versions keep building from source
(pip install -e . --no-build-isolation).
Foundry 0.0.2
Foundry 0.0.2
SGLang graduates to a fully validated engine. This release brings the SGLang
integration to parity with vLLM across single GPU, data parallel, and expert
parallel — with a self-contained recipe and no vLLM build dependency for EP.
Highlights
- SGLang single GPU / DP / EP all validated end-to-end.
SAVE → LOAD → query verified on single-GPU Qwen3-1.7B / 4B / 14B,
data-parallel (DP=2) Qwen3-1.7B, and expert-parallel (EP=2, DeepEP
low-latency) Qwen3-30B-A3B-FP8. Foundry-restored decode graphs match baseline
throughput within run-to-run noise; cold start drops from ~30 s of capture to
a ~0.4 s restore. - NVSHMEM auto-detection — no manual path, no vLLM ep_kernels.
Foundry now resolves DeepEP'slibnvshmem_host.sofrom thenvidia-nvshmem
wheel (atorchdependency) the same way it auto-detectslibcuda_hook.so.
DeepEP installs via SGLang's ownci_install_deepep.sh; the vLLM EP-kernel
helper is no longer required. - Minimal SGLang fork — 47 lines, activation only.
The fork carries just a CLI flag, a config field, and threeapply_server_args
call sites (server_args.py,foundry_shim.py,scheduler.py,
data_parallel_controller.py). All save/load logic lives in the integration
layer; the edits are inert unless--foundry-graph-extension-config-pathis set.
Engine integrations
-
SGLang — integration for SGLang v0.5.13. Working configurations: single
GPU, data parallel (DP), expert parallel (EP, DeepEP low-latency + DP-attention with fa3). Self-contained recipes underrecipe/sglang/(shared TOML pair +
per-config serve scripts, mirroringrecipe/vllm/) for Qwen3-1.7B (single),
Qwen3-1.7B (DP), and Qwen3-30B-A3B-FP8 (EP). TP attention stays unsupported
(NCCL all-reduce vs the VMM region) — EP uses DP-attention instead. EP requires
SGLang's pinned kernels — DeepEP9af0e0d(not vLLM's29d31c0),
sgl-deep-gemm >= 0.1.2, andflash-attn-3(fa3 sidesteps a FlashInfer
ragged-prefill off-by-one under this config). -
Manual DeepEP / NVSHMEM bootstrap (SGLang has no
prepare_comm_buffer).
vLLM exposesprepare_communication_buffer_for_model, a clean upstream site
where foundry brings up the NVSHMEM runtime. SGLang has no equivalent — it
creates the singleton DeepEPBufferlazily on the first MoE dispatch, inside
the warmup forwards foundry suppresses, which would pushBuffer(...)into the
captured stream ("operation not permitted when stream is capturing"). Foundry
instead walks the model to theDeepEPDispatcherand forces buffer creation
(bootstrap_deepep_buffer) before the capture loop on SAVE and before replay
on LOAD, withinit_nvshmem_for_loaded_modulesrun once on LOAD before any
NVSHMEM-kernel graph replays.
Fixes
- Per-rank VMM device binding (DP/TP/EP).
set_allocation_regionbinds to
the current CUDA device, so the integration now callsset_device(gpu_id)
before reserving the region — rank > 0 previously reserved oncuda:0and
faulted. - Set the main CUDA context on graph-build pool workers (C++). EP graphs
carryNODE_EVENT_RECORD/WAITnodes, so on-demand prep callscuEventCreate
onSimpleThreadPoolworkers that had no current context. Added
cuCtxSetCurrent(main_ctx)as the first call on those workers (mirroring the
background thread) — without it LOAD faulted with "invalid device context".
Dense graphs never hit this path, which is why it surfaced only on SGLang EP. - EP capture/load correctness. A SAVE-only warmup pass (triggers DeepGEMM
per-shape JIT + lazy init outside the captured graph),deepep_adaptermode
init on LOAD (replay asserts on_captured_deepep_mode, which the replaced
capture loop never sets), and the FlashInfer per-bs pre-pass gated off for fa3
while still populatingdecode_cuda_graph_metadatapost-load for replay.
Docs
- New
docs/sglang/set (overview, direct-edits, hooks, memory-lifecycle,
save-load-workflow, memory-consistency) and a self-containedrecipe/sglang/
README with install, run, performance, and troubleshooting. - Top-level README parallelism status table updated to mark SGLang single GPU,
DP, and EP as validated.
Foundry v0.0.1
Foundry 0.0.1
First public release of Foundry — a CUDA-graph persistence library that
captures an entire model's CUDA graphs (plus their device context: modules,
workspaces, VMM layout) once and replays them at startup, eliminating compile,
warmup, and capture from cold-start time.
Highlights
- Deterministic memory layout — zero patching on graph load.
Foundry indirects memory allocation to the same reserved memory region
with monotonic cursor advancing for both SAVE and LOAD. Therefore,
during CUDA graph reconstruction, captured pointers resolve as-is — no
pointer rewriting, no per-graph fix-ups, no runtime recompilation. - CUDA module extraction — library-agnostic execution context saving.
A driver-levelLD_PRELOADhook (libcuda_hook.so) intercepts CUDA module
loads at the driver boundary, so foundry captures the device-resident code
irrespective of which framework, kernel library, or codegen path produced
it (PyTorch, Inductor, cuBLAS NVJET, NVSHMEM, DeepEP, DeepGEMM, …). - Fast graph reconstruction via template-based CUDA graph grouping.
Captured graphs are grouped by topology into templates with node-param sets;
On load, the template is rebuilt once per group and instances are reconstructed
on demand, keeping load fast and asynchronous.
Engine integrations
- vLLM — compatible with vLLM v0.21. Working configurations: single GPU,
data parallel (DP), expert parallel (EP, DeepEP low-latency). End-to-end
recipes underrecipe/vllm/for Qwen3-1.7B, Qwen3-14B (DP),
Qwen3-30B-A3B (EP), Qwen3-30B-A3B-FP8 (EP). - SGLang — integration layer for SGLang v0.5.13 (adapted fork coming
soon). - Integration architecture. Engine-specific logic lives in a thin
integration layer (foundry/integration/<engine>/); engine forks contain
only minimal hook calls.
Verified kernel & comm support
- cuBLAS NVJET kernels (Hopper+).
- torch.compile modules.
- NVSHMEM / DeepEP validated.
- DeepGEMM FP8 MoE validated.
Dependency
- PyTorch 2.11.0 (compatible with 2.9 – 2.11).
- CUDA 12+, CMake 4.0+, Boost.
Documentation
- Integration design notes and per-engine recipes under
docs/andrecipe/. - vLLM recipe README covers save/load workflow, archive layout, and required
env settings.
Repository hygiene
- Open-source pre-commit hooks (ruff, ruff-format, clang-format,
markdownlint, actionlint, DCO sign-off). - Smoke tests covering re-export imports and archive round-trip.
Roadmap
- Adapted vLLM and SGLang forks published alongside the release.
- Tensor parallel support.
- Host-process checkpoint/restore.
- PD-disaggregated serving.
- Single shared communication-stub capture across replicas.