From 400a8a6b3373d5ed0ecabf684f14b4d5562a1b1c Mon Sep 17 00:00:00 2001 From: bong-water-water-bong Date: Sun, 8 Nov 2026 09:16:41 -0400 Subject: [PATCH] os: the two comments that still call ONEBIT_HRX_LIBHSA a compiled-in path #1460 (6dab50cb, Fixes #1459) stopped baking the build's HSA runtime path into 1bit: the macro is now opt-in via -DONEBIT_HRX_LIBHSA_BAKE and ONEBIT_HRX_LIBHSA is build metadata for mkimage. It touched CMakeLists.txt, cmake/hrx.cmake, docs/hrx.md and scripts/weekly.sh, so two OS comments still describe the old behaviour: os/v3/puppy/build.sh:32 and os/v3/puppy/vm-check.sh:346 both say "ONEBIT_HRX_LIBHSA is a CMake compile definition, not a variable", which is now wrong in the way that matters - a reader would think the path is in the binary. Comment-only: same claim, corrected, with the opt-in named so the next person looking for "why is no path baked" finds the answer. bash -n clean on both scripts. Refs #1459 --- os/v3/puppy/build.sh | 9 +++++---- os/v3/puppy/vm-check.sh | 4 ++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/os/v3/puppy/build.sh b/os/v3/puppy/build.sh index 623226dbe..2e12fdaf6 100755 --- a/os/v3/puppy/build.sh +++ b/os/v3/puppy/build.sh @@ -29,10 +29,11 @@ # libhsa-runtime64.so.1 plus every sibling it needs at load time (the TheRock `librocm_sysdeps_*` set and # librocprofiler-register.so.0). Cycle 13's board boot measured why the set and not one file (engine#715 + # the 2 Nov hardware run): -# * `ONEBIT_HRX_LIBHSA` is a CMake compile definition, not a variable - nothing in the engine reads it at -# run time (CMakeLists.txt:279, cmake/hrx.cmake). app/serve.cpp:201 resolves in the order --hrx-libhsa, -# the BAKED build-machine path if it exists, then a recursive scan of /opt/rocm-therock. On the appliance -# the baked path is a release-build directory that does not exist, so the scan is the only route left; +# * nothing bakes an HSA path into `1bit` by default (engine#1459 / #1460): `ONEBIT_HRX_LIBHSA` is a CMake +# cache value the build fills by globbing ONEBIT_HRX_TOOLCHAIN, kept as build metadata because mkimage reads +# it to decide which runtime to SHIP; `-DONEBIT_HRX_LIBHSA_BAKE=` is the explicit opt-in that compiles +# one in. app/serve.cpp:201 resolves in the order --hrx-libhsa, a baked path if one was asked for, then a +# recursive scan of /opt/rocm-therock - so on the appliance the scan is the route; # * the pinned libhsa carries `RUNPATH=$ORIGIN` and NEEDED librocm_sysdeps_{elf,drm,drm_amdgpu,numa} + # librocprofiler-register, so a lone file cannot load even when handed to the loader: measured `ldd` = 4 # `not found`. With the release kit's own directory on the path: 0 not found. diff --git a/os/v3/puppy/vm-check.sh b/os/v3/puppy/vm-check.sh index 9d70aaaa0..d19583308 100755 --- a/os/v3/puppy/vm-check.sh +++ b/os/v3/puppy/vm-check.sh @@ -343,8 +343,8 @@ rows = [ "[ \"$n\" = 3 ] && grep -q 'trap .one_rescue' /initrd/init && echo init-guard-3-paths", "init-guard-3-paths"), # Cycle 14, item 1 - the GPU blocker the board found: HRX registered no device because nothing ever opened - # libhsa-runtime64.so.1. `ONEBIT_HRX_LIBHSA` is a CMake compile definition, not a variable (measured in - # CMakeLists.txt:279 and app/serve.cpp:201), so the only runtime route on an appliance is the engine"'"'s + # libhsa-runtime64.so.1. Nothing bakes an HSA path into `1bit` by default (engine#1459 / #1460), so the only + # runtime route on an appliance is the engine"'"'s # scan of /opt/rocm-therock - and even handed the file, the pinned libhsa cannot load without its # $ORIGIN siblings. This row asserts all three halves on the artifact: the set at the path the scan walks, # no unresolved dependency, and a dlopen by BARE soname inside the guest (what libggml-hrx does when the