Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

[HIP] configure.py --hip names the AMD libclc target "amdgcn-amd-amdhsa-llvm", but sycl/CMakeLists.txt requires "amdgcn-amd-amdhsa"

Open Beginner friendly
#23,531 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 2 days

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
67/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
cmake, cpp

Research direction

Read configure.py around the libclc_amd_target_names setting and the LLVM runtime target arguments, then compare with the libclc target check in sycl/CMakeLists.txt around lines 619–623. Make the AMD target name consistent so --hip configuration succeeds; verify by reproducing the reported configure command on an AMD HIP setup.

Written by the indexing model from the issue text.

Description

bug hip
Describe the bug

Configuring with buildbot/configure.py --hip (default --hip-platform AMD) fails, because the script and the SYCL CMake check use different names for the AMD libclc runtime target.

  • buildbot/configure.py (line 32) sets libclc_amd_target_names = ";amdgcn-amd-amdhsa-llvm" and adds it to LLVM_RUNTIME_TARGETS (lines 93-96, 254-266).
  • sycl/CMakeLists.txt (lines 619-623) requires the plain triple:
if("hip" IN_LIST SYCL_ENABLE_BACKENDS)
  if(NOT ("amdgcn-amd-amdhsa" IN_LIST libclc_targets))
    message(FATAL_ERROR "HIP support requires building \"libclc\" for the AMDGCN target")

libclc_targets comes from get_targets_building_llvm_runtime(libclc ...), so it contains amdgcn-amd-amdhsa-llvm, the check fails, and configure stops.

To reproduce

On Ubuntu 22.04 x86_64 with ROCm 7.0 (hip-dev, rocm-device-libs) installed:

git clone https://github.com/intel/llvm && cd llvm
git checkout dfcf0080a27749a5c8c73b9d83658593726b01ea   # nightly-2026-10-14
python3 buildbot/configure.py --hip --cmake-opt=-DUR_HIP_ROCM_DIR=/opt/rocm

Expected: configure succeeds and builds libclc for AMDGCN.
Actual: configure stops at sycl/CMakeLists.txt:622.

Workaround (later -D options win):

python3 buildbot/configure.py --hip --cmake-opt=-DUR_HIP_ROCM_DIR=/opt/rocm \
  "--cmake-opt=-DLLVM_RUNTIME_TARGETS=default;amdgcn-amd-amdhsa;spirv64-unknown-unknown" \
  --cmake-opt=-DRUNTIMES_amdgcn-amd-amdhsa_LLVM_ENABLE_RUNTIMES=libclc

With this the toolchain builds, libur_adapter_hip.so is installed, and SYCL programs run correctly on an AMD Instinct MI350X (gfx950).

Suggested fix: use one name in both places: either amdgcn-amd-amdhsa in configure.py, or accept the -llvm variant in the CMake check.

Environment
  • OS: Ubuntu 22.04 x86_64
  • ROCm 7.0 (apt packages), CMake 3.x, Ninja
  • intel/llvm nightly-2026-10-14 (dfcf0080a27749a5c8c73b9d83658593726b01ea); lines unchanged on sycl as of 2026-10-18
Additional context

As far as I can tell no intel/llvm CI job configures with --hip, which may be why this went unnoticed. A related problem in the driver's libspirv lookup comes up after this one is worked around; I'll file it separately. The full build script with both workarounds: https://github.com/checocadena/oneapi-agent-toolkit/blob/main/scripts/build-sycl-hip.sh

Dominant language
LLVM
Stars
1.5k
Forks
869
Avg merge
3d 1h
Merged PRs (30d)
194

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from intel/llvm

All issues in intel/llvm

Similar issues

More Backend & API Design issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.