Skip to content

hip: Add Linux hip build - #159

Merged
0xShug0 merged 2 commits into
0xShug0:mainfrom
IIIIIllllIIIIIlllll:linux-hip-build
Jul 31, 2026
Merged

hip: Add Linux hip build#159
0xShug0 merged 2 commits into
0xShug0:mainfrom
IIIIIllllIIIIIlllll:linux-hip-build

Conversation

@IIIIIllllIIIIIlllll

@IIIIIllllIIIIIlllll IIIIIllllIIIIIlllll commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Hi! Following up on the Windows HIP work (#153 ), this adds HIP/ROCm support to the Linux helper script so Linux AMD users get the same one-command build experience:

  1. --backend hip (alias rocm), with --hip on|off and --gpu-targets flags; CUDA/Vulkan/HIP are mutually exclusive
    ROCm detection via ROCM_PATH/HIP_PATH, /opt/rocm, or hipconfig (handles split layouts like core-7.14 where clang lives under lib/llvm/bin)

  2. GPU target auto-detection via amdgpu-arch, with a strict rocminfo fallback(The code for this feature might be quite extensive)

  3. Default -j now follows nproc

  4. About --deployment-build : I enable it by default and provide --no-deployment-build to turn it off. This way, users can just copy the built outputs after compiling, instead of having to depend on the model_specs settings in the source code.

Tested: ROCm 7.14 on Linux (gfx1151 / Strix Halo, full build of audiocpp_cli passes) .
No behavior change for existing cuda/vulkan/cpu invocations.

AI usage: Kimi k3 for translate, I reviewed and tested this script

@IIIIIllllIIIIIlllll IIIIIllllIIIIIlllll changed the title Add Linux hip build hip: Add Linux hip build Jul 30, 2026

@asikul81316-star asikul81316-star left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

@0xShug0

0xShug0 commented Jul 30, 2026

Copy link
Copy Markdown
Owner

@asikul81316-star do you have comments for this PR?

@0xShug0

0xShug0 commented Jul 30, 2026

Copy link
Copy Markdown
Owner

@IIIIIllllIIIIIlllll I'm going to merge the PR if @asikul81316-star doesn't have any comments in the next few hours...

@0xShug0

0xShug0 commented Jul 30, 2026

Copy link
Copy Markdown
Owner

@IIIIIllllIIIIIlllll One minor issue. Is AUDIOCPP_DEPLOYMENT_BUILD=ON a requirement for HIP? If so, could you scope it to HIP instead of changing the global default?

- '--backend hip' (alias 'rocm'), plus explicit '--hip on|off' and
  '--gpu-targets' (comma or semicolon separated)
- ROCm detection prefers ROCM_PATH/HIP_PATH, falls back to /opt/rocm
  and hipconfig (covers split layouts such as core-7.14)
- GPU target auto-detection via amdgpu-arch, with a strict rocminfo
  'Name: gfxXXX' fallback (rejects fragments like 'gfx11')
- CUDA, Vulkan, and HIP are mutually exclusive; HIP builds select the
  ROCm clang and clear the sticky GPU_BUILD_TARGETS/AMDGPU_TARGETS
  cache entries so repeated configures honor new --gpu-targets
- Default parallel jobs now follow nproc instead of a hardcoded 8
HIP builds default to embedding package specs so the produced binaries
run standalone outside the repo checkout; other backends keep the
historical OFF default. --deployment-build / --no-deployment-build
override the default explicitly.
@IIIIIllllIIIIIlllll

Copy link
Copy Markdown
Contributor Author

@IIIIIllllIIIIIlllll One minor issue. Is AUDIOCPP_DEPLOYMENT_BUILD=ON a requirement for HIP? If so, could you scope it to HIP instead of changing the global default?

done

@0xShug0
0xShug0 merged commit f41374f into 0xShug0:main Jul 31, 2026
4 checks passed
@0xShug0

0xShug0 commented Jul 31, 2026

Copy link
Copy Markdown
Owner

Thanks @IIIIIllllIIIIIlllll! Merged.

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.

3 participants