Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 18 additions & 9 deletions docs/runtime-core-design.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ owners. Final assembly consumes rank indexes and open source file ranges
independently of the prepared model.

**Storage.** PyTorch's persistent device allocations come from one address range
reserved before model loading: 1 TiB per rank from `0x0800_0000_0000` on Linux or
`0x0400_0000_0000` on Windows, backed on
reserved before model loading: 1 TiB per rank from `0x0800_0000_0000` on Linux
(48 GiB from `0x0c_0000_0000` on integrated SM87) or `0x0400_0000_0000` on Windows, backed on
demand with `cuMemCreate` and `cuMemMap` at allocation granularity. Cores
reserve GiB-aligned ranges covering stored allocations and the declared maximum
extents of dynamic caches; unused gaps in the preparation arena are omitted. PyTorch
Expand All @@ -101,8 +101,15 @@ separate PyTorch pools backed by that arena. Mapped host buffers, including
n-gram request mailboxes, use fixed addresses from `0x0c00_0000_0000` when
the device rank ranges fit below it. Larger Linux layouts start host storage
at `0x2000_0000_0000` to avoid overlap. Each rank has a disjoint 1 TiB host
range; the native allocator reports the selected base to Ignition.
Linux maps and registers host pages; Windows uses host-backed CUDA VMM.
range (or a smaller range — 8 GiB before the device window at or above the
restore floor, or after the device windows, when the default host span cannot be
reserved on non-WDDM host-VMM devices, and up to 1 TiB within `1 << bits` on
narrow Windows WDDM adapters); on non-WDDM host-VMM devices the native allocator
holds the probed host reservation for the preparation process and reports the
selected host range and backing mode to Ignition. Linux maps and registers host pages when the device
supports identity-addressed host registration (`HOST_REGISTER_SUPPORTED` and
`CAN_USE_HOST_POINTER_FOR_REGISTERED_MEM`); Windows and Linux devices lacking
either capability use host-backed CUDA VMM (`HOST_NUMA`).
Both expose the recorded address to the CPU and GPU. A CUPTI subscriber logs
driver allocations and removes records when their context is destroyed.
Persistent device allocations outside the arena are grouped into complete
Expand All @@ -112,11 +119,13 @@ live byte spans are considered for payload storage; page gaps are zero. Before
copying, the exporter checks that each external allocation belongs to the
serving context. On Linux integrated GPUs, preparation reserves the low address
window through its external device floor (`CoreStorage.EXTERNAL_FLOOR`: 256 GiB
by default, or 36 GiB for integrated GA10B / SM 8.7's default 128 GiB VMM layout
with a 72 GiB device base and 48 GiB reservation) without physical backing.
Windows retains the driver's low allocation pool. Export on either integrated
platform rejects reachable external device storage below that floor, where
context mappings can prevent replay.
by default, or 36 GiB for integrated GA10B / SM 8.7 with a 48 GiB device base
and 48 GiB reservation, leaving `[36 GiB, 40 GiB)` for external allocations and
`[40 GiB, 48 GiB)` for host VMM within both Orin Nano's ~96.5 GiB and AGX
Orin's 128 GiB VMM ceilings) without physical backing. Windows retains the
driver's low allocation pool. Export on either integrated platform rejects
reachable external device storage below that floor, where context mappings can
prevent replay.

The model exporter retains allocations reachable from graph arguments, copy
and memset endpoints, module globals, native execution buffers, and declared
Expand Down
Loading