Skip to content

serve: the HRX RAG servers get IREE_HAL_AMDGPU_LIBHSA_PATH like the chat server - #289

Merged
bong-water-water-bong merged 1 commit into
mainfrom
rag-hrx-libhsa
Oct 2, 2026
Merged

bong-water-water-bong merged 1 commit into
mainfrom
rag-hrx-libhsa

Conversation

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator

rag_launch (#281) started the --embed/--rerank llama-server on HRX0 without the ROCr path the chat backend gets (hrx_libhsa), so without an exported IREE_HAL_AMDGPU_LIBHSA_PATH they exited with "invalid device: HRX0" and took 1bit serve down. Found by the power-engineering RAG demo.

Checked on strixhalo with the variable unset: 1bit serve -m Qwen3-4B-Q4_K_M.gguf --device hrx --embed Qwen3-Embedding-0.6B-Q8_0.gguf --rerank bge-reranker-v2-m3-Q8_0.gguf starts. /v1/embeddings returns 2 x 1024-dim vectors, /v1/rerank scores the right document first (2.244 vs -11.01), and /v1/models lists all three on hrx. ctest 19/19.

🤖 Generated with Claude Code

…hat server

rag_launch (engine #281) started the --embed/--rerank llama-server on HRX0 without the ROCr path the
chat backend gets, so they exited with "invalid device: HRX0" and took 1bit serve down unless the
user had exported IREE_HAL_AMDGPU_LIBHSA_PATH. Found by the power-engineering RAG demo.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@bong-water-water-bong
bong-water-water-bong merged commit 9304ff2 into main Oct 2, 2026
8 of 9 checks passed
@bong-water-water-bong
bong-water-water-bong deleted the rag-hrx-libhsa branch October 2, 2026 16:20
Comment thread app/serve.cpp
else
// the same ROCr the chat server gets, or the RAG server cannot open HRX0 ("invalid device: HRX0")
if (const std::string hsa = hrx_libhsa(o.hrx_libhsa); !hsa.empty())
l.env.push_back("IREE_HAL_AMDGPU_LIBHSA_PATH=" + hsa);

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cleanup: this is now the third copy of the identical if (const std::string hsa = hrx_libhsa(o.hrx_libhsa); !hsa.empty()) env.push_back("IREE_HAL_AMDGPU_LIBHSA_PATH=" + hsa); pattern in this file (also launch_for around line 744 and the Laya GGML scorer launch around line 1287). Worth a small helper, e.g. void add_hrx_libhsa_env(std::vector<std::string>& env, const Options& o), so the lookup logic (and its filesystem walk under /opt/rocm-therock) lives in one place instead of three call sites that can drift.

bong-water-water-bong added a commit that referenced this pull request Nov 10, 2026
… context (fixes #1989) (#2033)

Five fork commits past 50d28600a:
- 139ccd741 (#289) + 2293f95ea (#291): a spread pitch for the transposed V and 256-token attention launches from
  4,096 keys; the pitch is derived in the kernel, so no per-key-count recompile (#1989)
- cf5febf04 (#288): activations kept inside the f16 range in the two small-batch Q6_K kernels (#1962)
- 69aac7fa2 (#287), 7cc3187b5 (#290): known-answer MUL_MAT cases and failed-compute reporting in the backend
  comparison (#1997)

Measured at the exact tree on gfx1151: Qwen3-4B pp24576 warm 813-822 -> 980-1074 tok/s; cold 9,230-token prompt
8.80 s vs 8.85 s, text identical; test-hrx-fa-transposed-value 8/8; FLASH_ATTN_EXT ops 388/388.

registry/architectures.json: the recorded source pin only. docs/hrx.md: the #1989 section.

Co-authored-by: bong-water-water-bong <[email protected]>
Co-authored-by: Claude Fable 5.2 <[email protected]>
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.

1 participant