Pull requests / #3305
#3305 [Other] fix(setup AMD): engine probes get the engine's lib_dirs on LD_LIBRARY_PATH on Linux (the PATH-only #2372 env made strata --families exit 127, so setup falsely refused Qwen3.6)
open · @xxxliqu1dxxx · 0 comentarios · En GitHub
Setup & installServer & APIMulti-GPUAMD / HIPNVIDIA / CUDAWindowsLinux
Descripción
## Problem and result
Setup's own engine probes (`strata --families`, `strata-device --list-devices`) only got the
engine's ROCm `lib_dirs` on `PATH` (#2372), which the dynamic loader only honors on Windows.
On AMD Linux the probes exited 127 on `libhipblas.so.3`, so `./setup.sh --backend hip` Step 4
falsely said "this engine does not run Qwen3.6-35B-A3B yet" while the local HIP engine does
run it. After the change, on POSIX the `lib_dirs` are prepended to `LD_LIBRARY_PATH` (existing
value preserved); on Windows the `PATH` behavior is byte-identical. The probes exit 0.
## Related discussion
Resubmission of #2914, closed by the 0.2.0-beta tracker reset (its head branch was force-pushed, so GitHub
would not reopen it — this one links that PR). Follow-up to #2372 (commit 093108c). No open issue. Focused fix,
no scope agreement needed.
## Approach
`engine_env` only: on POSIX, `lib_dirs` are prepended to `LD_LIBRARY_PATH` instead of `PATH`;
on Windows the `PATH` prepend is unchanged. Mirrors `serve/server.py`'s existing
`"PATH" if os.name == "nt" else "LD_LIBRARY_PATH"` choice. Left alone: the engine binary, the
build, the server launch env, the `engine_families` fallback, `hip_lib_dirs`, prebuilt Windows
engine handling.
## Validation
**Passed:**
- `python tools/test_setup_amd.py` — revision d409ec38 (rebased on main, 0.2.0-beta), local
Windows PC (no GPU needed): 42 tests OK. Covers `EngineLaunchEnv`: the Windows `PATH`
behavior (pinned to `os.name = "nt"`), the new `LD_LIBRARY_PATH` test (lib dir first,
existing value preserved, `PATH` untouched), and the two probe tests.
- Live check on an AMD Linux box (Radeon RX 9060 series, gfx1200, 16 GB VRAM, 31 GB RAM,
local HIP engine 0.1.45): `env = setup.engine_env(Path('engine'))` +
`engine/strata --families` → rc 0, prints `qwen4exp qwen35moe` (previously exit 127).
**Failed:** none observed.
**Not run:** multi-GPU, Windows live run (no Windows AMD box), NVIDIA/CUDA paths (untouched by
the change).
## Limits
Only affects the two setup probe commands' environment on non-Windows. No behavior change on
Windows, in the engine, the build, or the server.
En el sitio
Enlaces a install, modelos, releases.