Skip to content

Bump HRX: hrx-system 7f4236924 — the APU memory-properties decode is explicit (engine #840, port of fork #9) - #1245

Merged
bong-water-water-bong merged 2 commits into
mainfrom
1bit/bump-hrx-system-7f423692
Nov 6, 2026
Merged

bong-water-water-bong merged 2 commits into
mainfrom
1bit/bump-hrx-system-7f423692

Conversation

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator

Second HRX pin move of the night, for engine#840: the AMDGPU HAL's APU memory-properties decode is now explicit, ported from fork PR #9 onto the branch the engine pins.

from to
third_party/hrx-system (1bit-MONSTER/hrx-system 1bit/e3e6a976-pin-6) 170d229a3afe 7f4236924aad

What changed

Fork PR 1bit-MONSTER/hrx-system#14 (a cherry-pick of #9, f2867b74, onto our pinned line; #9 targets the fork's main, which the engine does not run): 5 files, +115/-1.

  • physical_device_capabilities.c/.h: decode HSA_AMD_AGENT_INFO_MEMORY_PROPERTIES with the property as a mask instead of through the bit-index helper, and accept the encoding this ROCr uses (0x2) alongside the documented 0x1; the agent is unified when either is set.
  • physical_device.c + the two test files: expose/assert the unified-memory capability (device_local.unified_memory, a published dual-locality heap). The allocator_test.cc half was re-anchored on this line (it has no iree_hal_allocator_query_buffer_compatibility); the added-line sets for the other four files are byte-identical to gh pr diff 9.

Measured qualification (important)

#9's measurements say the symptom in #840 does not reproduce on this ROCr: 0x2 already decodes as APU through the bit-index helper (hsa_flag_isset64(value, mask) indexes bit 1), so unified_memory is already 1 and HOST_LOCAL|DEVICE_LOCAL allocations already succeed at 170d229a3. The landed change makes the decode correct for the documented 0x1 encoding and accepts both — a portability/correctness fix, not a behaviour change on this box. Issue #840 will be closed on that evidence (decode fixed; the reported refusal, if real somewhere, has another cause), not advertised as "refusal fixed on strixhalo".

Verification / merge gate

build is red until config/hrx-long-prompt-validated-pin.config names the new pin, and that record is written only after the hw-gate (build, ops, kat, kld, needle, placement on the strixhalo-engine runner) passes on this branch — the same gate the previous bump used. The hw-gate label is added. The .cc test files in the fork are not compiled by this repo's CI; hw-gate compiles the pin.

@bong-water-water-bong bong-water-water-bong added the hw-gate Run the HRX hardware gate on Strix Halo (docs/hw-gate.md) label Nov 6, 2026
@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

PR Reviewer Guide 🔍

(Review updated until commit 89780f2)

Here are some key observations to aid the review process:

🎫 Ticket compliance analysis ✅

840 - Fully compliant

Compliant requirements:

  • Fix the AMDGPU HAL's decoding of HSA_AMD_AGENT_INFO_MEMORY_PROPERTIES to correctly identify APU devices when ROCr returns the 0x2 encoding
  • Ensure that unified-memory APU devices properly expose the device_local.unified_memory capability
  • Allow HOST_LOCAL|DEVICE_LOCAL memory allocations to succeed on unified-memory devices
  • Make the decoding robust to both documented (0x1) and ROCr-specific (0x2) encodings
⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Memory Properties Decoding
The decoding of HSA_AMD_AGENT_INFO_MEMORY_PROPERTIES now correctly handles both the documented 0x1 encoding and the ROCr-specific 0x2 encoding. This ensures that unified-memory APU devices are properly identified regardless of which encoding the ROCr provides, fixing the issue where HOST_LOCAL|DEVICE_LOCAL allocations were incorrectly refused.

Unified Memory Capability Exposure
The physical device now correctly exposes the unified memory capability (device_local.unified_memory) for APU devices, which allows host+device-local memory allocations to succeed on unified-memory devices. This addresses the second consequence of the original issue where device_fine heap was not published.

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator Author

hw-gate attempt 1: killed by a box-wide OOM, not a gate failure — retrying

Run 42170492166 exited 137 (SIGKILL) at 05:59:47Z, 10 min into scripts/hw-gate.sh, with no phase result. The kernel threw a global OOM on strixhalo at the same second:

Jan 06 01:59:47 strixhalo kernel: oom-kill:constraint=CONSTRAINT_NONE,global_oom,task=llama-server,...
Jan 06 01:59:47 strixhalo kernel: Out of memory: Killed process 1220198 (llama-server) ...
Jan 06 01:59:47 strixhalo kernel: Out of memory: Killed process 4417 (llama-server) ...

The box was under several other lanes' gpu-hold jobs and two llama-servers at the time (load 26); the OOM took the gate's step along with unrelated services. Nothing in the gate's output names a failing phase, so this attempt validates nothing — do not merge on it. The same commit's build (without HRX) is green.

Retrying now (memory is back to ~89 GiB available); the second gate for the other pin bump (#1233) was cancelled to keep one heavy build on the box at a time, and will be re-run after this one.

@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown

Persistent review updated to latest commit 89780f2

@bong-water-water-bong
bong-water-water-bong merged commit 99c6259 into main Nov 6, 2026
10 of 11 checks passed
@bong-water-water-bong
bong-water-water-bong deleted the 1bit/bump-hrx-system-7f423692 branch November 6, 2026 08:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hw-gate Run the HRX hardware gate on Strix Halo (docs/hw-gate.md) Review effort 2/5

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant