Skip to content

fix(vmm): retry access per physical mapping on Windows - #643

Draft
HUSRCF wants to merge 1 commit into
warpfront:masterfrom
HUSRCF:fix/windows-vmm-access
Draft

fix(vmm): retry access per physical mapping on Windows#643
HUSRCF wants to merge 1 commit into
warpfront:masterfrom
HUSRCF:fix/windows-vmm-access

Conversation

@HUSRCF

@HUSRCF HUSRCF commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Fixes #635.

Problem

VmmArena::map_next reapplies access to the whole contiguous mapped prefix. That works around ROCm 7.2 Linux drivers which reject some valid non-zero subrange addresses, but Windows HIP 7.2 rejects the first prefix that spans two independently mapped physical allocations.

Fix

  • keep the contiguous-prefix call as the primary path;
  • on hipErrorInvalidValue only, retry access once per physical mapping;
  • preserve all other access failures and the existing transactional cleanup path;
  • add a CPU-only reproduction of the reported 4 MiB prefix / two 2 MiB mappings.

The fallback runs only while growing a VMM arena and only after the existing call fails, so successful Linux and Windows paths are unchanged.

Test plan

  • cargo test -p hip-bridge --lib --locked — 17 passed
  • scripts/fmt-changed.sh master
  • git diff --check
  • gfx1100 GPU1: HIP_VISIBLE_DEVICES=1 cargo run --release --locked -p hip-bridge --features lab --example vmm_arena_smoke -- 0 — all boundary growth, failure cleanup, teardown, and reload checks passed

cargo clippy -p hip-bridge --lib --locked -- -D warnings currently reaches three pre-existing warnings in hipfire-config/src/rocm.rs; this PR does not modify that file.

Windows ROCm 7.2 validation on the reporter's RX 7900 XTX remains required before marking ready.

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.

Windows: VMM KV backend fails at first decode (hipMemSetAccess invalid argument) - kv_backend=contiguous works

1 participant