From d5a437ea2decd3fa15e0e3e3227a6ac4bcfddfa2 Mon Sep 17 00:00:00 2001 From: Jeroen Schweitzer Date: Wed, 15 Apr 2026 23:18:40 +0200 Subject: [PATCH] =?UTF-8?q?fix(tooling):=20run-atlas-naming.sh=20=E2=80=94?= =?UTF-8?q?=20use=20grep=20-a=20instead=20of=20strings=20(#833)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The gfx1201 preflight check piped `strings` into grep, which fails silently on a Bazzite host where binutils is not installed and `strings` is not on PATH. `grep -a` reads the binary directly as text, works everywhere grep exists, and produces the same result. Co-Authored-By: Claude Opus 4.6 (1M context) --- tooling/planet-gen/run-atlas-naming.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tooling/planet-gen/run-atlas-naming.sh b/tooling/planet-gen/run-atlas-naming.sh index 36b8b1d5e..bd79d404c 100755 --- a/tooling/planet-gen/run-atlas-naming.sh +++ b/tooling/planet-gen/run-atlas-naming.sh @@ -54,7 +54,10 @@ fi # "amdgcn-amd-amdhsa--gfx1201". If gfx1201 is missing and e.g. only # gfx906 is present, the build shipped kernels for a different arch # and every inference will crash with "invalid device function". -if ! strings "$BIN" 2>/dev/null | grep -qw gfx1201; then +# +# Uses `grep -a` to scan the binary directly so we don't depend on +# `strings` being on PATH (not present on a stock Bazzite host). +if ! grep -a -q gfx1201 "$BIN"; then echo "error: $BIN does not contain gfx1201 kernels" >&2 echo " expected target for AMD Radeon RX 9070 (Navi 48)" >&2 echo " rebuild with CMAKE_HIP_ARCHITECTURES=gfx1201 inside $DISTROBOX_NAME" >&2