Skip to content

helios: import driver::Access in the Windows host allocator - #293

Merged
lukealonso merged 1 commit into
NVIDIA:mainfrom
gmbuell:pr/windows-host-access-import
Nov 15, 2026
Merged

lukealonso merged 1 commit into
NVIDIA:mainfrom
gmbuell:pr/windows-host-access-import

Conversation

@gmbuell

@gmbuell gmbuell commented Nov 14, 2026

Copy link
Copy Markdown
Contributor

Helios does not compile on Windows with the runtime-core feature, which
flare/Cargo.toml enables for every Flare build. The Windows host-backed
VMM allocator, NativeResources::allocate_host in
helios/src/runtime_core/host.rs, imports Access from the runtime_core
module. runtime_core imports only the driver types its own code uses,
and Access is not among them, so the import fails with E0432
(unresolved import super::Access). Linux builds do not compile this
function, which is why the defect does not appear there.

The allocator now imports Access from runtime_core::driver, where the
type is defined. The other imports and the allocator's behavior are
unchanged.

On Windows 11 with MSVC and Rust 1.100.0,
cargo check --manifest-path helios/Cargo.toml --features runtime-core
fails with E0432 at 7006928 and passes with this change. No test in
this change exercises Windows host allocation at runtime.

🤖 Generated with Claude Code

Helios does not compile on Windows with the runtime-core feature, which
flare/Cargo.toml enables for every Flare build. The Windows host-backed
VMM allocator, NativeResources::allocate_host in
helios/src/runtime_core/host.rs, imports Access from the runtime_core
module. runtime_core imports only the driver types its own code uses,
and Access is not among them, so the import fails with E0432
(unresolved import `super::Access`). Linux builds do not compile this
function, which is why the defect does not appear there.

The allocator now imports Access from runtime_core::driver, where the
type is defined. The other imports and the allocator's behavior are
unchanged.

On Windows 11 with MSVC and Rust 1.100.0,
`cargo check --manifest-path helios/Cargo.toml --features runtime-core`
fails with E0432 at 7006928 and passes with this change. No test in
this change exercises Windows host allocation at runtime.

Design-Signed-Off-By: Claude Opus 5.5 (Claude Code); design-review=ed22
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Garret Buell <gmbuell@gmail.com>
lukealonso pushed a commit that referenced this pull request Nov 14, 2026
…ce window, no-identity export (#297)

* Check fixed reservations against the WDDM GPU address width

Under WDDM, cuMemAddressReserve with a fixed address beyond the GPU's
virtual address space does not return. docs/windows.md records this for
host reservations at 16 TiB and 32 TiB on RTX Spark N1X. The same hang
occurs for Heliopause's default Windows device window (4 TiB, 1 TiB per
rank) on a GPU whose WDDM address space is 1 TiB. Export and load then
stall inside the driver without an error, and the process must be
killed. WDDM reports the address width per adapter, so a reservation
that cannot fit can be rejected before it is requested.

helios/src/runtime_core/address_space.rs adds virtual_address_bits,
which maps a CUDA device to its WDDM adapter (cuDeviceGetLuid, then
D3DKMTOpenAdapterFromLuid) and returns the VirtualAddressBitCount that
D3DKMTQueryAdapterInfo reports for KMTQAITYPE_QUERY_GPUMMU_CAPS. It also
adds check_fits, which rejects a range ending beyond 2^bits. Outside
Windows, or when the query fails, the width is unknown and nothing is
rejected. Helios checks each core reservation and each Windows host
reservation before reserving it; Heliopause checks every rank's device
window in flare_core_initialize. A reservation that fits behaves as
before. docs/windows.md describes the check and what it does not cover:
Linux, and Ignition's own host-region reservations during export.

Result: on a GPU whose address space cannot hold a fixed window, export
and load fail immediately with an error that names the reservation and
the width, instead of hanging.

Evidence, on Windows 11 build 26200 with an RTX 3090 (SM86, not a
supported GPU; WDDM reports 40 bits) and NVIDIA driver 621.01:
- heliopause's reports_the_device_address_width (ignored by default; run
  with --include-ignored) prints 40 bits for device 0, read through the
  CUDA LUID to adapter mapping.
- CoreStorage() with the default Windows window fails after 0.02 s:
  "native core device window 0x40000000000+0x10000000000 exceeds the
  GPU's 40-bit virtual address space". Without this check the same call
  does not return. This ran on a tree that also contains the explicit
  device window and device identity changes that follow and #293/#294,
  which Windows builds and exports need.
- With the check active, the Helios loader loaded a 15.5 GiB core
  exported at 256 GiB, and an existing core, and replayed all 13 of each
  one's graphs bit-identically to the export.
- heliopause's library suite passes except
  sync_parent_normalizes_a_relative_basename, which fails with "Access is
  denied" with and without this change. check_fits's unit test is in
  Helios, whose library tests do not compile on Windows
  (execution/roce_fabric.rs uses std::os::unix); it was not run.
Not tested: any supported GPU. Whether RTX Spark N1X reports 44 bits,
which would explain the 16 TiB host hang, is unverified.

Design-Signed-Off-By: Claude Opus 5.5 (Claude Code); design-review=ed22
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Garret Buell <gmbuell@gmail.com>

* Accept an explicit fixed device window in CoreStorage

Heliopause places each rank's fixed device window at a compile-time
base: 4 TiB on Windows, 8 TiB on Linux, 1 TiB per rank. A caller whose
GPU address space ends below that base cannot export, and with the
preceding address-width check it now fails with an explicit error
instead of hanging. The only remedies were to patch the constants in
heliopause/src/allocator.rs and ignition/preparation/core_storage.py,
or to add an environment override, which docs/design-review.md
principle 10 prohibits. An explicit, typed argument lets a caller that
drives CoreStorage and export_capture as a library place the window
where the device can reserve it.

CoreStorage gains a keyword argument, device_window=(base, extent).
Rank r's window is then base + r * extent, extent bytes long; omitted,
the defaults (DEVICE_BASE, RESERVATION_BYTES) apply as before. The base
must lie at or above EXTERNAL_FLOOR and the extent must be nonzero,
checked before CUDA is touched. Heliopause adds
flare_core_initialize_window(rank, world, device, base, extent), and
flare_core_initialize now calls it with the platform defaults. It
rejects empty or overflowing windows, windows that are not aligned to
the allocation granularity (the extent to twice it, since its halves
serve the pool and persistent storage), and windows that overlap the
host ranges. With the default window the overlap condition is the same
as before. Host ranges keep their 1 TiB per rank stride, now named
HOST_RESERVATION_BYTES in CoreStorage, and host bounds no longer depend
on the device extent. docs/windows.md documents the argument.

Result: on a GPU whose address space cannot hold the default window,
export works with a window the caller chooses. Recipes and callers that
do not pass device_window see no change.

Evidence, on Windows 11 build 26200 with an RTX 3090 (SM86, not a
supported GPU) and NVIDIA driver 621.01, on a tree that also contains
the device identity change that follows and #293/#294:
- CoreStorage(device_window=(0x4000000000, 0x1000000000)) initializes.
  Windows below EXTERNAL_FLOOR and empty windows raise ValueError.
- A core export with that window captured 13 CUDA graphs (15.5 GiB
  mapped), and a separate process loaded the core through Helios and
  replayed all 13 bit-identically to the export.
- heliopause's library suite passes, including
  explicit_device_windows_are_validated, except
  sync_parent_normalizes_a_relative_basename, which fails with "Access is
  denied" with and without this change.
- tests/preparation/test_core_storage.py passes on Windows (8 tests,
  including the two device-window cases); its Linux layout test was
  skipped.
Limits: the caller chooses a window that WDDM's own per-process
placements leave free. One of four loads of that core failed with an
address collision at the window base; the other three succeeded. No
supported GPU or Linux system was tested.

Design-Signed-Off-By: Claude Opus 5.5 (Claude Code); design-review=ed22
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Garret Buell <gmbuell@gmail.com>

* Let capture exports record no device identity

Heliopause's capture export names every core after the platform that the
capture GPU's PCI id maps to in helios/src/core/naming.rs. It fails when
the id maps to none ("NVML reports unsupported GPU PCI id"). A program
that drives export_capture as a library on a development or test GPU
outside that table therefore cannot export at all, unless it adds the GPU
to the platform table, which would present it as a supported platform.
Helios already defines cores without a device identity: they load,
their cache entries use the unknown-device label
(naming::unknown_device_candidate), and Flare's catalog and hub, which
filter on naming::PLATFORMS, never list them as a supported platform.
Export is the one path that cannot produce such a core.

The capture request gains device_identity. "required", the default,
keeps the current behavior: the PCI id must name a platform. "none"
skips the lookup and records no platform. Export then names the core
with the existing unknown-device scheme:
- signed hardware_identity "unknown-device" (the schema requires a
  nonempty value);
- deployment unknown-device-tp<N>, unless the cluster supplies an
  export id;
- cache entry unknown-device-tp<N>-<UTC minute>, from
  deployment_candidate(None, ...).
No request field can name a platform, so a capture is either identified
by its hardware or claims none. docs/core-format-design.md describes the
field.

Result: export_capture can export on a GPU outside the platform table,
and the resulting core is marked as claiming no platform. Requests that
omit the field behave as before.

Evidence, on Windows 11 build 26200 with an RTX 3090 (SM86, PCI id
outside the platform table) and NVIDIA driver 621.01, on a tree that
also contains the two preceding changes and #293/#294:
- device_identity_defaults_to_required_and_accepts_none: an omitted field
  and "required" parse as Required, "none" as None, other values are
  rejected.
- A capture export with device_identity "none" and an unmodified
  platform table produced a core whose deployment is unknown-device-tp1,
  cache entry unknown-device-tp1-202611141806. A separate process loaded
  it through Helios's VerifiedCore and NativeResources and replayed all
  13 graphs bit-identically to the export.
- heliopause's library suite passes except
  sync_parent_normalizes_a_relative_basename, which fails with "Access is
  denied" with and without this change.
Not tested: the "required" path was not re-run, though it is the
unchanged call to current_platform. flare run, the catalog, and the hub
were not exercised with an unknown-device core.

Design-Signed-Off-By: Claude Opus 5.5 (Claude Code); design-review=ed22
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Garret Buell <gmbuell@gmail.com>

---------

Signed-off-by: Garret Buell <gmbuell@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
@lukealonso
lukealonso merged commit ec48c75 into NVIDIA:main Nov 15, 2026
lukealonso pushed a commit that referenced this pull request Nov 15, 2026
Maintainers agreed to recognize SM86 GPUs as a platform. Until now an
export on a GA102 GPU, such as the GeForce RTX 3090, either failed
("NVML reports unsupported GPU PCI id") or, with device_identity "none",
produced an unknown-device core.

helios/src/core/naming.rs gains GA102_DEVICES (RTX 3090 Ti, 3090, 3080,
3080 Ti, 3080 12 GB, 3080 LHR) and the platform "ga102", following the
device-identifier naming of gb10, gb202 and gb300. Because this table is
the single source for core export naming and for Flare's NVML revision
detection, a GA102 capture is now named ga102-tp<N>-<UTC minute>, and
flare detects the ga102 Hub revision. Other SM86 dies (GA104, GA106) are
not included.

The catalog test that requires every platform to match one of a fixed
set of branches gains a ga102 branch. docs/core-format-design.md,
docs/cli-design.md and the --revision help list ga102.

Result: export_capture names cores exported on GA102 GPUs ga102, and
the catalog and hub treat ga102 like the other platforms.

Evidence, on Windows 11 build 26200, RTX 3090 (PCI id 0x2204),
NVIDIA driver 621.01:
- naming.rs's tests, compiled on their own with rustc --test because
  Helios's library tests do not compile on Windows: 6 pass, including
  the new GA102 ids and the GA104 (0x2484) and non-NVIDIA rejections.
- flare's library tests: 191 pass, 4 ignored (built with #293 applied).
- The same table, carried as a local patch, has named the bf16 and int8
  cores of a 9B embedding model ga102-tp1; both load through Helios and
  replay bit-identically to their exports.
Not tested: GA102 GPUs other than the RTX 3090, flare run against a
ga102 Hub revision, and Linux. flare-cli's orbit keeps its own
compute-capability table and still reports these GPUs as sm86.

Design-Signed-Off-By: Claude Opus 5.5 (Claude Code); design-review=ed22

Signed-off-by: Garret Buell <gmbuell@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants