Skip to content

Installion/compilation for hip : Unknown target amdgcn--amdhsa for libclc V7.1.1 #23372

Closed

Description

@cloirec

Describe the bug

I try to install v7.1.1 and the buildbot/configure.py program returns an error. It seems the CMakeLists.txt for libcl does not recognize a target option although it is implemented in the configure.py program.

To reproduce

with this command line :

python3 buildbot/configure.py  \
	--disable-jit \
	--hip --hip-platform=AMD \
	--cmake-opt="-DCMAKE_C_COMPILER=amdclang" \
	--cmake-opt="-DCMAKE_CXX_COMPILER=amdclang++" \
	--cmake-opt="-DGPU_TARGETS=gfx90a:gfx942" \
	--cmake-opt="-DCMAKE_INSTALL_PREFIX=${INSTALL_PATH}" \
	--cmake-gen="Ninja"

returns the error below :

Make Error at /......./libclc/CMakeLists.txt:221 (message):
  Unknown target in LIBCLC_TARGETS_TO_BUILD: "amdgcn--amdhsa"

  Valid targets are:
  amdgcn--;amdgcn-amd-amdhsa;clspv--;clspv64--;r600--;nvptx64--;nvptx64--nvidiacl;nvptx64-nvidia-cuda;amdgcn-mesa-mesa3d

Environment

Linux RH 9.6
AMD GPU gfx90a and gfx942
for clang 22
with rocm/6.4.3
compiler clang19

Additional context

No response

Activity

  1. added
    bugSomething isn't working
    hipIssues related to execution on HIP backend.
    on Oct 5, 2026
  2. bratpiorka commented on Oct 8, 2026

    @bratpiorka
    Contributor

    Hi @cloirec, would you like to address this issue yourself? We are no longer actively developing the HIP adapter.

  3. cloirec commented on Oct 22, 2026

    @cloirec
    Author

    Hi,

    I used this patch ( patch_cmake_libclc_v7.1.1.txt ) with a SPIRV-Tools pre-installation following :

    git clone https://github.com/KhronosGroup/SPIRV-Headers.git -b v2026.08.0
    SRC_SPIRV_HEADERS_PATH="$(pwd)/SPIRV-Headers"
    
    git clone https://github.com/KhronosGroup/SPIRV-Tools.git -b v2026.4
    cd SPIRV-Tools
    INSTALL_SPIRV_TOOLS_PATH="$(pwd)/install"
    mkdir build
    cd build
    cmake .. -DCMAKE_INSTALL_PREFIX="${INSTALL_SPIRV_TOOLS_PATH}"  -DSPIRV-Headers_SOURCE_DIR="${SRC_SPIRV_HEADERS_PATH}"
    make install -j 128
    
    cd ../..
    
    git clone --branch="sycl" https://github.com/intel/llvm -b sycl
    cd llvm
    
    #https://github.com/intel/llvm/releases/tag/v7.1.1
    git checkout 504366f
    
    cd libclc
    patch -p1 CMakeLists.txt < ../../patch_cmake_libclc_v7.1.1
    cd ..
    
    INSTALL_PATH="$(pwd)/install"
    
    rm -rf ./build ./install
    
    PKG_CONFIG_PATH="${INSTALL_SPIRV_TOOLS_PATH}"/lib64/pkgconfig
    
    python3 buildbot/configure.py  \
    	--hip --hip-platform=AMD \
     	--cmake-opt="-DCMAKE_C_COMPILER=amdclang" \
     	--cmake-opt="-DCMAKE_CXX_COMPILER=amdclang++" \
     	--cmake-opt="-DGPU_TARGETS=gfx90a:gfx942" \
     	--cmake-gen="Ninja"
    
    cd build
    
    time ninja -k0 -j 128 all lib/all
    time ninja -k0 -j 128 install
    

    It seems to work.

  4. self-assigned this
    on Oct 22, 2026
  5. bratpiorka commented on Oct 30, 2026

    @bratpiorka
    Contributor

    @cloirec Hi, I see that this issue is fixed in the latest version (v7.2.0). Could you please try using this version?
    I will close this issue for now, but please feel free to reopen it if you need any further help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinghipIssues related to execution on HIP backend.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions