Repository navigation
Fix CUDA 12 batched copies, Linux ARM64 release portability, and Selene unified-memory budgeting - #589
Conversation
…ne unified-memory budgeting
Three concrete defects affect CUDA 12.x GPUs, stock JetPack 6 / Ubuntu 22.04
Linux hosts, and unified-memory prefix-cache offloading:
1. On CUDA < 13.0 drivers where `cuMemcpyBatchAsync_v2` is absent,
`Stream::copy_batch` in `helios/src/cuda.rs` fell back to
`cuMemcpyDtoDAsync_v2`. Callers in `helios/src/execution/transport.rs` and
`helios/src/offload/transfer.rs` pass raw pinned-host pointers from
`cuMemHostAlloc(..., 0)` alongside device pointers, which breaks discrete
CUDA 12.x GPUs because `cuMemcpyDtoDAsync_v2` requires device-to-device
semantics whereas `cuMemcpyAsync` infers transfer direction under UVA.
2. `.github/workflows/release.yml` built Linux release tarballs on Ubuntu 24.04
runners (`GLIBC_2.39`), and `helios/build.rs` hard-linked `libibverbs` when
the `roce` feature is enabled (default on Linux aarch64). Stock JetPack 6
(Ubuntu 22.04, `glibc 2.35`, without `libibverbs1`) therefore could not
execute `flare-linux-arm64.tgz`, which CI missed because smoke checks ran
only in `ubuntu:24.04` with `libibverbs1` installed.
3. In `selene/src/offload.rs`, `host_pool_budget` always subtracted an unscaled
`2 GiB + total / 20` reserve and `prepare_with_inputs` re-evaluated it after
GPU KV allocation—ignoring small-SoC headroom scaling (`<= 16 GiB` and
`<= 64 GiB`) and explicit `--memory-limit` settings on integrated GPUs, which
shrunk intake or failed pool-only capture startup. Separately, memory-only
`--prefix-cache-memory` unconditionally required `HOST_NUMA` VMM split
allocation (`SlabPool::sized_by_rank`), failing on GA10B and Windows WDDM.
Finally, `eos/src/unix.rs` passed `MAP_POPULATE` to `mmap` before calling
`madvise(MADV_HUGEPAGE)`, faulting 4 KiB base pages before transparent huge
page advice took effect.
Changes:
- CUDA 12 batched-copy fallback (`helios/src/cuda.rs`,
`docs/prefix-cache-offload.md`): Added `cuMemcpyAsync` to `Driver` and
replaced `cuMemcpyDtoDAsync_v2` in `Stream::copy_batch`'s fallback loop with
`cuMemcpyAsync` while retaining `cuMemcpyDtoDAsync_v2` for `copy_dtod_async`.
- Lazy `libibverbs.so.1` loading and Ubuntu 22.04 release builds
(`helios/native/roce_proxy_dlopen.c`, `helios/build.rs`,
`helios/src/execution/roce.rs`, `.github/workflows/release.yml`,
`flare-cli/Cargo.toml`, `flare/Cargo.toml`, `helios/Cargo.toml`,
`docs/release.md`, `docs/runtime-core-design.md`, `docs/multi-host.md`):
Replaced direct `-libverbs` linking in `helios/build.rs` with `-ldl` and
compiled `helios/native/roce_proxy_dlopen.c`, which lazily loads
`libibverbs.so.1` via `dlopen` / `dlvsym` (`IBVERBS_1.1`, optional
`IBVERBS_1.8`) under `pthread_once` and wraps the vendored
`helios/native/roce_proxy.c` without modifying it. `RoceTransport::open`
calls `roce_ensure_libibverbs` after preflight checks so missing RDMA
libraries fail with an install hint only during multi-host RoCE setup.
Updated `.github/workflows/release.yml` to build and package both Linux
targets inside `ubuntu:22.04`, assert no `libibverbs.so` `DT_NEEDED` entry
and no `GLIBC_` symbol version above `2.35`, and smoke-test the extracted
archive in clean `ubuntu:22.04` and `ubuntu:24.04` containers without
`libibverbs1`.
- Selene host budgeting, `HOST_NUMA` fallback, and Eos THP ordering
(`selene/src/offload.rs`, `selene/src/offload/tests.rs`,
`selene/src/registrar.rs`, `selene/src/slab.rs`, `helios/src/cuda.rs`,
`helios/src/offload/mod.rs`, `helios/src/offload/registrar.rs`,
`helios/src/runtime_core/memory.rs`, `helios/src/runtime_core/model.rs`,
`eos/src/unix.rs`, `docs/prefix-cache-offload.md`):
Replaced the fixed `2 GiB` host headroom in `selene/src/offload.rs` with
`host_service_headroom_bytes` (`64 MiB` at `<= 16 GiB`, `min(2 GiB, total / 32)`
above `16 GiB`) shared by `helios/src/runtime_core/memory.rs`. Added
`integrated_offload_host_budget` to honor explicit `--memory-limit` on
integrated GPUs without implicit reserves, and threaded the pre-planned
offload host budget from `NativeModel::allocate_caches` into
`NativeModel::prepare_offload` -> `prepare_with_inputs_budget` so
post-KV-allocation setup matches the budget already reserved. Added
`try_map_device_host_parts` / `HostRegistrar::try_map_split` /
`SlabPool::try_sized_by_rank` so `CUDA_ERROR_INVALID_VALUE` (1) or
`CUDA_ERROR_NOT_SUPPORTED` (801) on `HOST_NUMA` VMM falls back to a
registered anonymous mapping while real errors such as OOM still propagate.
Updated `eos/src/unix.rs::map_host` to omit `MAP_POPULATE`, call
`madvise(MADV_HUGEPAGE)` first, and then prefault via
`madvise(MADV_POPULATE_WRITE)` on Linux with a page-stride `write_volatile`
fallback.
Claimed results:
- Observed on x86_64 Linux: building `flare-cli --features roce` inside
`ubuntu:22.04` with `libibverbs-dev` produces an executable with `Max GLIBC:
GLIBC_2.34`, no `libibverbs.so` `DT_NEEDED` entry, and no `ibv_*` dynamic
symbols, passing `flare --version` and `flare {run,agent,orbit} --help` in
clean `ubuntu:22.04` and `ubuntu:24.04` containers without `libibverbs1`.
`eos::map_host` sets `MADV_HUGEPAGE` (`VmFlags: hg`) before prefaulting.
- Expected on hardware not tested here: stock JetPack 6 ARM64 hosts can run
`flare-linux-arm64.tgz` without `libibverbs1`, discrete CUDA 12.x GPUs execute
`Stream::copy_batch` without `cuMemcpyDtoDAsync_v2` host-pointer failures, and
GA10B / Windows WDDM hosts support `--prefix-cache-memory` without `HOST_NUMA`
VMM failure or post-KV-allocation host-budget double-subtraction.
Supporting evidence and limitations:
- `cargo test --locked --release --manifest-path eos/Cargo.toml`: 2 passed
(including `map_host_advises_hugepages_and_prefaults_zeroed_pages`).
- `cargo test --locked --release --manifest-path selene/Cargo.toml --features test-support`:
506 passed (including small-SoC/explicit-limit budget tests,
`prepare_with_inputs_budget` tests, and `HOST_NUMA` fallback vs OOM tests).
- `cargo test --locked --release --manifest-path helios/Cargo.toml --features runtime-core,server,roce --lib -- cuda::tests runtime_core::memory::tests runtime_core::model::tests offload:: execution::roce::tests`:
40 passed, 16 ignored (GPU-only), including
`lazy_libibverbs_loader_resolves_symbols_or_reports_install_hint` and
`integrated_offload_host_budget_matches_small_soc_scaling_and_explicit_limits`.
- `cargo test --locked --release --manifest-path flare/Cargo.toml`: 228 passed
across full run (226 passed + 2 hub tests passed on individual rerun), 4
ignored.
- `cargo test --locked --release --manifest-path flare-cli/Cargo.toml`: 24/24
integration tests passed (`cache_commands`, `cli`, `inspect`,
`unverified_payload`); 196 unit tests passed (195 + 1 serial rerun), 3
ignored, with 1 unrelated timeout/BrokenPipe in untouched
`distribution::tests::source_waits_for_receiver_file_verification`.
- `cargo test --locked --release --manifest-path selene-manager/Cargo.toml --features test-support`:
84/85 passed in `tests/client.rs`; 1 unrelated failure in untouched
`a_record_put_into_a_manager_on_another_host_is_restored_over_tcp`
(`stream: 2 windows` vs `>= 3` on `moved()` metrics snapshot).
- End-to-end x86_64 Docker build in `ubuntu:22.04` (`--features roce`,
`libibverbs-dev`, `packaging/archive.py`) + ELF `DT_NEEDED`/`--version-info`
checks + clean `ubuntu:22.04` and `ubuntu:24.04` smoke checks passed.
- Unrun checks: native `aarch64` build and `ubuntu-24.04-arm` CI run, live
hardware GPU tests on discrete CUDA 12.x / Jetson Orin GA10B / Windows WDDM,
and full `helios` chat-template tests requiring `FLARE_TEST_TEMPLATE_DIR`.
Design-Signed-Off-By: Antigravity (Gemini 4 Neon); design-review=c3a9
|
A case file has been opened for 589. Future reviews will auto-run 90 minutes after code updates are pushed.
|
Autobot ReviewFull Review · Value Proposition · Case File Recommendation: Changes RequestedThe core fixes (CUDA 12
Have your agent review the Full Review for complete verified findings, To opt out, include |
…head Why Disk-only prefix-cache offload (`--prefix-cache-memory 0` with `--prefix-cache-disk`, default `--lossless-kv-compression off`) incurred five host and coordination costs: (1) opening a raw v1-v3 record file (`selene/src/disk.rs`) issued two sequential `O_DIRECT` reads (4 KiB header, then page checksums); (2) `xxh3` page hashing ran serially on the single disk thread across up to 64 pages (`268 MB` at `4.19 MB`/page); (3) `Staged::pump_all` (`selene/src/disk_store.rs`) submitted unlinks/truncates and outbound writes ahead of interactive restores; (4) while waiting on an inbound restore with an idle GPU, Helios's worker (`helios/src/server/runtime.rs`) slept up to `2 ms` and multi-host disk peers (`selene/src/shard.rs`) slept `1 ms` instead of waking on socket readability; and (5) on integrated-memory GPUs (`CU_DEVICE_ATTRIBUTE_INTEGRATED`), disk-only offload scaled registered host intake with concurrency (`2 * max_active * row_slots + 128`, up to `8.2 GiB` needed on `Qwen3.8-27B-NVFP4` at `--max-concurrency 16`), carving GPU KV cache out of shared RAM even though paged disk streaming stages at most two windows (`2 * (64 + row_slots)` slots). What - Single-read raw open (`selene/src/disk.rs`): preserve `NVIDIA#504`'s v4 packed `Header::read_metadata` open branch, and on raw v1-v3 `O_DIRECT` opens read the 4 KiB header and expected checksum segment in one transfer when `expected.tail_pages <= MAX_TAIL_PAGES` (`CHECKSUM_SCRATCH_BYTES = 1 MiB`), falling back to a 4 KiB header-only read on failure while preserving retry I/O errors, truncated-file checks, and shared scratch span helpers. - Scoped parallel page hashing (`selene/src/disk.rs`): cache `parallel_cpus` once at `Worker::new` and hash raw batches of >= `HASH_PARALLEL_MIN_PAGES` (`4`) pages across `parallel_cpus.min(MAX_HASH_THREADS).min(buffers.len())` `std::thread::scope` threads (`MAX_HASH_THREADS = 4`) when `parallel_cpus >= HASH_PARALLEL_MIN_CPUS` (`4`), with `0` idle helper threads, Linux `SCHED_BATCH` inheritance via `clone`, inline recomputation on helper spawn or unwind failure, and fault hooks folded into `Faults` under `cfg(any(test, feature = "test-support"))` (zero test-only parameters on shipped signatures). - Bounded restore-first submission and wakeup (`disk_store.rs`, `helios/src/server/runtime.rs`, `shard.rs`): order `Staged::pump_all` as inbound restores, then outbound writes, then maintenance while submitting one reserved maintenance job ahead of inbound and outbound after `MAINTENANCE_DEFER_LIMIT` (`8`) consecutive passes where queued maintenance lost free disk-queue space; poll `Worker::idle_wait` at `50 us` during active/waiting inbound restores; and wake Unix disk peers via `libc::poll` (`POLLIN`). - Bounded integrated disk-only intake & `NVIDIA#589` unified-memory budget integration (`selene/src/offload.rs`, `helios/src/offload/mod.rs`, `helios/src/runtime_core/{memory,model}.rs`, `docs/prefix-cache-offload.md`): pass explicit `PrepareInputs` (`max_active`, `input_staging`, `shard`, `integrated`) into `headroom_with_inputs`, `headroom_with_inputs_for_budget`, `prepare_with_inputs`, and `prepare_with_inputs_budget` (deleting unused `prepare` and dead `core: &Path`), unify `disk_enabled()`, `headroom_inner`, private `target_intake_slots`, and parameterless `Prepared::intake_warning()` (`required_intake` + `sized_concurrency`), preserve `options.pool_only()` so a degraded disk directory under `--prefix-cache-pool --prefix-cache-memory 0` remains restore-only against `NVIDIA#589`'s `planned_offload_host`, and target `intake_slots(layout, 1)` (`2 * (64 + row_slots)`) on integrated disk-only hosts without shrink warnings across `NVIDIA#589`'s small-SoC headroom scaling, explicit `--memory-limit` budgets, pre-planned post-KV `planned_offload_host`, and `HOST_NUMA` split-mapping fallback while preserving `NVIDIA#504` lossless KV compression. No core re-export or record-format change is required. Result Live `flare run` A/B on NVIDIA GB10 (SM121) measured `NVIDIA#497` standalone (`cd5a366b`) against pre-`NVIDIA#504` `main` (`c0c4f798`) with `--prefix-cache-memory 0 --prefix-cache-disk /tmp/selene-disk` and default `--lossless-kv-compression off` (the raw v3 `.ckpt` path, whose default GB10 disk-only execution is unchanged by rebasing onto `ba3afb13` / `NVIDIA#589` because GB10 128 GiB exceeds the 16 GiB small-SoC threshold and disk-only intake targets the same two-window floor; ingress-to-first-token TTFT; bandwidth is rank-0 `flare_host_cache_inbound_bytes_per_second`): - `Qwen3.8-27B-NVFP4` (TP1, `--max-concurrency 16 --prefix-cache-disk-limit 40G`, 3 interleaved repeats): intake drops `7.3 GiB` (`1,877` slots, shrink warning) -> `1.0 GiB` (`252` slots, `0` warnings), raising GPU KV cache `64.4 -> 71.6 GiB` (`+7.2 GiB` / `+235.5K` tokens); median single-restore bandwidth and TTFT improve `7.05 -> 8.02 GB/s` (`348.0 -> 301.7 ms`, `-13.3%`; wall `353.5 -> 306.5 ms`) at `30.0K` and `6.28 -> 8.68 GB/s` (`+38.2%`, `551.8 -> 447.6 ms`, `-18.9%`; wall `561.7 -> 455.4 ms`) at `61.1K`; `NVIDIA#497` standalone 8-way `61.1K` cold-restart burst mean median TTFT drops `8,156.1 -> 6,963.4 ms` (`-14.6%`, 2 interleaved repeats; combining this change with concurrent ancestor-restore read coalescing in companion PR `NVIDIA#496` is unmeasured). - Isolated `std::thread::scope` `xxh3` (`cd5a366b` with `MAX_HASH_THREADS = 1` at `selene/src/disk.rs:157` and no other change vs unmodified `cd5a366b` with `MAX_HASH_THREADS = 4`, 3 interleaved repeats on `Qwen3.8-27B-NVFP4`): parallel hashing alone improves median TTFT `486.8 -> 447.6 ms` (`-8.1%`, `7.73 -> 8.68 GB/s`, `+12.3%`, faster on all 3 repeats: `[447.6, 432.7, 451.2]` vs `[479.9, 557.5, 486.8] ms`) at `61.1K` and `322.4 -> 301.7 ms` (`7.55 -> 8.02 GB/s`) at `30.0K`. `HASH_PARALLEL_MIN_PAGES = 4` and `HASH_PARALLEL_MIN_CPUS = 4` assign at least one page per thread at the 4-thread cap and leave cores for serving threads on narrow hosts (not swept separately). - `Qwen3.8-Flash-Next` (TP1, `--max-concurrency 8 --prefix-cache-disk-limit 24G`, `cd5a366b` vs `c0c4f798`): intake drops `1.9 -> 0.3 GiB` (`2,288 -> 398` slots), raising GPU KV cache `23.28 -> 24.98 GiB` (`+1.70 GiB` / `+127.0K` tokens); bandwidth improves `5.67 -> 7.05 GB/s` (`372.1 -> 355.6 ms`) at `30.0K` and `6.65 -> 8.35 GB/s` (`+25.6%`, `458.0 -> 413.8 ms`, `-9.7%`) at `61.0K`; `NVIDIA#497` standalone 8-way burst median TTFT drops `3,327.5 -> 3,078.5 ms` (`-7.5%`). - Expected interaction with `NVIDIA#589` (`ba3afb13`): on unified-memory GPUs with an explicit `--memory-limit`, disk-only intake remains bounded at `intake_slots(layout, 1)` so unlocked unified RAM expands GPU KV cache rather than concurrency-scaled staging, while warm+disk (`--prefix-cache-memory > 0`) and pool-only capture retain `NVIDIA#589`'s pre-planned host budget and small-SoC scaling. What it costs: up to three short-lived scoped `xxh3` helpers during >=4-page raw batches (`0` idle helpers), `50 us` `Worker::idle_wait` polling during active/waiting inbound restores (`969.9 -> 1,069.2 ms/s` `/proc/<pid>/stat` server CPU across 8-way `Qwen3.8-27B-NVFP4` bursts: `+99.3 ms/s` / ~`0.10` of 20 Grace cores combined; the `50 us` poll's CPU share and latency contribution are unisolated from scoped `xxh3` helpers), two-window serialization for concurrent unique-prefix restores and outbound stores on integrated disk-only hosts, and up to `8` passes of maintenance deferral. Companion PR (NVIDIA#496, concurrent ancestor-restore open and window coalescing): merge `NVIDIA#497` first, then rebase `NVIDIA#496` onto `main` so `Staged::pump_all` retains `MAINTENANCE_DEFER_LIMIT = 8` (submitting one reserved maintenance job first after `8` deferred passes) and runs `NVIDIA#496`'s private `host_inbound` and shared `pump_device_inbound` queues ahead of `outbound` and `maintenance`. Evidence - Rebased crate and Python checks over `origin/main` (`ba3afb13`, `NVIDIA#589`) on x86_64 Linux (`O_DIRECT` + `io_uring`): `selene --features test-support` (`514` lib + `1` `mixed_codec_root` integration passed, `0` warnings; also `cargo check --release` without `test-support`, `0` warnings), `selene-manager --features test-support --test client --test offload` (`85 + 2` passed, `0` warnings), `helios --features runtime-core,server --lib -- offload:: runtime_core::memory::tests runtime_core::model::tests server::runtime::phase_tests` (`144` passed, `14` GPU-only ignored, `0` warnings in touched files, covering `NVIDIA#497` + `NVIDIA#589` small-SoC, `--memory-limit`, and degraded-disk restore-only pool coexistence), and `pytest tests/preparation/test_core_boundary.py tests/test_design_review_hook.py` (`22` passed). - Prior SM121 GPU unit and live checks (at `cd5a366b`, `--lossless-kv-compression off`): `helios` `offload::` (`FLARE_RUN_CUDA_TESTS=1 --include-ignored`, `21` single-GPU SM121 tests passed; `split_pools` requires 2 local GPUs); corrupting a multi-page `.ckpt` payload on `Qwen3.8-27B-NVFP4` incremented `fetch_failed_total` (`1`), launched `0` `restore` graphs, and recomputed identical `top-5 logprobs` and tokens; under `--prefix-cache-disk-limit 6G` (`4` concurrent restores + `3` fresh `30K` stores), disk bytes peaked at `6.38 GB` (`<= 6 GiB`) and settled at `6.37 GB` with `0` `retry_abandoned` and `0` `io_error` drops (`2` normal `end_of_chain` evictions); four concurrent decode streams spilling checkpoints over 30 s on `Qwen3.8-Flash-Next` had `0` errors (`100.0 -> 95.9 tok/s`). - Not covered: live `--lossless-kv-compression` (`cpu`/`gpu`) serving, post-rebase SM121 `flare run` re-measurement, live Jetson Orin GA10B / `--memory-limit` GPU serving, isolated `50 us` `Worker::idle_wait` A/B, `NVIDIA#496 + NVIDIA#497` combined serving, multi-host RoCE serving, 2-GPU `split_pools`, discrete PCIe GPUs, Windows serving, and live warm-plus-disk (`--prefix-cache-memory > 0`) or `PooledStore` HTTP serving (`CompositeStore` + `DiskStore` CUDA transfers were covered at `cd5a366b` in `helios` `offload::`). Discord: Dooner Design-Signed-Off-By: Antigravity (Gemini 4); design-review=c3a9 Signed-off-by: FujitsuPolycom <[email protected]>
Why
Three defects affect CUDA 12.x GPUs, stock JetPack 6 / Ubuntu 22.04 Linux hosts, and unified-memory prefix-cache offloading on
main:cuMemcpyBatchAsync_v2is absent on CUDA < 13.0 drivers,Stream::copy_batchinhelios/src/cuda.rsfell back tocuMemcpyDtoDAsync_v2. Callers inhelios/src/execution/transport.rs(frame.input.address()allocated withcuMemHostAlloc(..., flags = 0)) andhelios/src/offload/transfer.rspass pinned/registered host addresses alongside device addresses. On discrete CUDA 12.x GPUs,cuMemcpyDtoDAsync_v2rejects raw host pointers, whereascuMemcpyAsyncinfers transfer direction under unified virtual addressing (UVA).flare-linux-arm64.tgzcannot start on stock JetPack 6 / Ubuntu 22.04..github/workflows/release.ymlbuilt both Linux release archives directly on Ubuntu 24.04 runners (GLIBC_2.39), andhelios/build.rshard-linked-libverbswhen therocefeature is enabled (default onaarch64Linux). Stock JetPack 6 ships Ubuntu 22.04 (glibc 2.35) withoutlibibverbs1, so the dynamic loader rejects the binary beforemain. Release CI missed both incompatibilities because it checked the archive only insideubuntu:24.04withlibibverbs1installed.HOST_NUMA-only memory offload, and Eos THP ordering.selene/src/offload.rs::host_pool_budgetalways subtracted an unscaled2 GiB + total / 20reserve, andprepare_with_inputsre-evaluated it after GPU KV-cache allocation. On unified-memory SoCs (8–32 GiB Jetson Orin or any integrated GPU with--memory-limit), KV allocation already consumesMemAvailableand leaves only the reserved offload budget plus the scaled/explicit reserve, so re-subtracting2 GiB + total / 20post-KV-alloc shrinks intake to minimum or fails pool-only capture startup. Independently, memory-only--prefix-cache-memoryunconditionally calledSlabPool::sized_by_rank(CU_MEM_LOCATION_TYPE_HOST_NUMAVMM), which fails on GA10B and Windows WDDM whereHOST_NUMAVMM is unsupported. Finally,eos/src/unix.rs::map_hostpassedMAP_POPULATEtommapbefore callingmadvise(MADV_HUGEPAGE), faulting 4 KiB base pages before transparent huge page advice could apply.What changed
cuMemcpyAsyncfallback (helios/src/cuda.rs,docs/prefix-cache-offload.md):Stream::copy_batchcalledcuMemcpyDtoDAsync_v2per entry whencuMemcpyBatchAsync_v2was absent.DriverloadscuMemcpyAsync, andStream::copy_batch's fallback callscuMemcpyAsyncper entry (copy_dtod_asyncretainscuMemcpyDtoDAsync_v2).libibverbs.so.1loading and Ubuntu 22.04 release builds (helios/native/roce_proxy_dlopen.c,helios/build.rs,helios/src/execution/roce.rs,.github/workflows/release.yml,flare-cli/Cargo.toml,flare/Cargo.toml,helios/Cargo.toml,docs/release.md,docs/runtime-core-design.md,docs/multi-host.md):helios/build.rscompilednative/roce_proxy.cdirectly and emittedcargo:rustc-link-lib=ibverbs;.github/workflows/release.ymlbuilt on Ubuntu 24.04 runners and smoke-tested only inubuntu:24.04withlibibverbs1installed.helios/build.rscompilesnative/roce_proxy_dlopen.cand linksdlandpthreadwithoutibverbs.roce_proxy_dlopen.clazily openslibibverbs.so.1viadlopen/dlvsym(IBVERBS_1.1, optionalIBVERBS_1.8) underpthread_once, redirects all 17ibv_*calls to static trampolines without exportingibv_*symbols, and#includes the unmodified vendoredhelios/native/roce_proxy.c.RoceTransport::opencallsroce_ensure_libibverbsafter preflight checks so missing RDMA packages report an install hint only when opening multi-host RoCE transport..github/workflows/release.ymlbuilds and packages both Linux targets insideubuntu:22.04, verifies zerolibibverbs.soDT_NEEDEDentries and noGLIBC_symbol versions above2.35, and runs clean-container smoke checks in bothubuntu:22.04andubuntu:24.04withoutlibibverbs1.HOST_NUMAfallback, and Eos THP ordering (selene/src/offload.rs,selene/src/offload/tests.rs,selene/src/registrar.rs,selene/src/slab.rs,helios/src/cuda.rs,helios/src/offload/mod.rs,helios/src/offload/registrar.rs,helios/src/runtime_core/memory.rs,helios/src/runtime_core/model.rs,eos/src/unix.rs,docs/prefix-cache-offload.md):selene/src/offload.rs::host_pool_budgetalways subtracted2 GiB + total / 20,prepare_offloadre-queriedhost_pool_budgetpost-KV-alloc, memory-only--prefix-cache-memoryfailed wheneverHOST_NUMAVMM was unsupported, andeos::map_hostpassedMAP_POPULATEbeforeMADV_HUGEPAGE.selene/src/offload.rsprovideshost_service_headroom_bytes(64 MiBat<= 16 GiB,min(2 GiB, total / 32)above16 GiB) andhost_reserve_bytes, shared withhelios/src/runtime_core/memory.rs.integrated_offload_host_budgethonors explicit--memory-limiton integrated GPUs without implicit reserves, andNativeModel::allocate_cachesreturns the pre-planned offload host budget intoNativeModel::prepare_offload->prepare_with_inputs_budgetso post-KV-alloc setup matches the budget reserved before KV allocation.try_map_device_host_parts/HostRegistrar::try_map_split/SlabPool::try_sized_by_rankfall back toSlabPool::sized+cuMemHostRegister_v2only whenHOST_NUMAVMM returnsCUDA_ERROR_INVALID_VALUE(1) orCUDA_ERROR_NOT_SUPPORTED(801), while real errors such as OOM propagate unchanged.eos/src/unix.rs::map_hostomitsMAP_POPULATE, callsmadvise(MADV_HUGEPAGE)first, and then prefaults viamadvise(MADV_POPULATE_WRITE)on Linux with a page-stridewrite_volatilefallback.Claimed results
flare-cli --features roceinsideubuntu:22.04withlibibverbs-devproduces an executable withMax GLIBC: GLIBC_2.34, nolibibverbs.soDT_NEEDEDentry, and noibv_*dynamic symbols, passingflare --versionandflare {run,agent,orbit} --helpin cleanubuntu:22.04andubuntu:24.04containers withoutlibibverbs1.eos::map_hostappliesMADV_HUGEPAGE(VmFlags: hg) before prefaulting zeroed pages.flare-linux-arm64.tgzwithoutlibibverbs1, discrete CUDA 12.x GPUs executeStream::copy_batchwithoutcuMemcpyDtoDAsync_v2failures on pinned-host pointers, and GA10B / Windows WDDM hosts support--prefix-cache-memorywithoutHOST_NUMAVMM errors or post-KV-alloc host-budget double-subtraction.Evidence and limitations
cargo test --locked --release --manifest-path eos/Cargo.toml: 2 passed (includingmap_host_advises_hugepages_and_prefaults_zeroed_pages).cargo test --locked --release --manifest-path selene/Cargo.toml --features test-support: 506 passed (including small-SoC/explicit-limit budget tests,prepare_with_inputs_budgettests, andHOST_NUMAfallback vs OOM propagation tests).cargo test --locked --release --manifest-path helios/Cargo.toml --features runtime-core,server,roce --lib -- cuda::tests runtime_core::memory::tests runtime_core::model::tests offload:: execution::roce::tests: 40 passed, 16 ignored (GPU-only), includinglazy_libibverbs_loader_resolves_symbols_or_reports_install_hintandintegrated_offload_host_budget_matches_small_soc_scaling_and_explicit_limits.cargo test --locked --release --manifest-path flare/Cargo.toml: 228 passed across full run (226 passed + 2 hub tests passed on individual rerun), 4 ignored.cargo test --locked --release --manifest-path flare-cli/Cargo.toml: 24/24 integration tests passed (cache_commands,cli,inspect,unverified_payload); 196 unit tests passed (195 + 1 serial rerun), 3 ignored, with 1 unrelated timeout/BrokenPipe in untoucheddistribution::tests::source_waits_for_receiver_file_verification.cargo test --locked --release --manifest-path selene-manager/Cargo.toml --features test-support: 84/85 passed intests/client.rs; 1 unrelated failure in untoucheda_record_put_into_a_manager_on_another_host_is_restored_over_tcp(stream: 2 windowsvs>= 3onmoved()metrics snapshot).release.ymlflow inubuntu:22.04(cargo build --locked --release --manifest-path flare-cli/Cargo.toml --features roce --bin flare+packaging/archive.py) passed ELF checks (Max GLIBC: GLIBC_2.34, nolibibverbs.soDT_NEEDED) and cleanubuntu:22.04andubuntu:24.04smoke checks withoutlibibverbs1.aarch64build andubuntu-24.04-armCI run, live GPU tests on discrete CUDA 12.x / Jetson Orin GA10B / Windows WDDM hardware, and fullhelioschat-template tests requiringFLARE_TEST_TEMPLATE_DIR.Discord: no username provided