mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #2516] [CLOSED] setup: Build on ROCm 10 (TheRock Packaging) #4090
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#4090
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/2516
Author: @brookpatten
Created: 10/15/2026
Status: ❌ Closed
Base:
main← Head:main📝 Commits (4)
2d3aec4update build for the changes introduced by modern rocm versions18fddf3remove extra comments78dbe83fix order of clang/amdclang2582f14fix order of clang/amdclang📊 Changes
2 files changed (+16 additions, -7 deletions)
View changed files
📝
setup.py(+12 -5)📝
tools/image/qimage.py(+4 -2)📄 Description
Summary
Updates compilation to handle the changes in rocm 10
What changed
setup.py: detect ROCm toolchain layout instead of hardcoding ROCm 9 paths
ROCm 10 (TheRock packaging) moved the LLVM toolchain under core/: the compiler is now bin/amdclang++ (no more llvm/bin/clang++), headers live in core/include, and device bitcode is in core/lib/llvm/amdgcn/bitcode. Two hardcoded assumptions broke on that layout:
-DCMAKE_HIP_COMPILER pointed at the nonexistent llvm/bin/clang++. CMake treats a changed, missing compiler as a cache reset and silently reconfigures CPU-only — which drops the strata target from build.ninja, so the build dies with ninja: error: unknown target 'strata'.
--rocm-path / HIP_PATH pointed at the ROCm top level. With ROCm 10's clang, that skips injecting the HIP device runtime wrapper, so device-context math (fmaxf, fabsf, logf, __expf, …) resolves to host-only glibc declarations and every kernel .cu fails with "no matching function" (~44 errors across sampler, router_top10, quantize_act, …).
The fix detects which layout is present and picks the first path that exists, in both build_engine_hip and build_image_engine:
hip_compiler: bin/amdclang++ → llvm/bin/clang++ → core/lib/llvm/bin/clang++
rocm_inc (for HIP_PATH and --rocm-path): core when core/include exists, else the top level
bitcode path list gains core/lib/llvm/amdgcn/bitcode
Older ROCm layouts keep working — the previous paths remain in each fallback chain.
Verified on ROCm 10.1.0 / gfx1201 (Radeon AI PRO R9700): full clean build, engine launches, on cachyos with rocm-bin 10 installed from paru.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.