Package: libamdhip64-dev
Version: 5.2.3-8
Severity: normal
X-Debbugs-Cc: c...@slerp.xyz

Dear Maintainer,

The libamdhip64-dev package requires hipcc in order for
find_package(hip) to succeed. This is because within hip-config.cmake,
the variable hip_HIPCC_EXECUTABLE is set with the path to hipcc and
the existence is checked.

That seems overly restrictive to me. Programs written in C or C++ can
use the HIP API and prebuilt GPU libraries to do useful GPU calculations
without ever needing to use hipcc (and the entire clang toolchain that
comes along with it).

What was done:

    apt-get -y update
    apt-get -y install build-essential cmake libamdhip64-dev
    cat << 'EOF' > main.cpp
    #include <hip/hip_runtime_api.h>
    int main() {
      return 0;
    }
    EOF
    cat << 'EOF' > CMakeLists.txt
    cmake_minimum_required(VERSION 3.16)
    project(example LANGUAGES CXX)
    find_package(hip REQUIRED)
    add_executable(example main.cpp)
    target_link_libraries(example PRIVATE hip::host)
    EOF
    cmake -S. -Bbuild

What was seen:

    # cmake -S. -Bbuild
    -- The C compiler identification is GNU 12.2.0
    -- Detecting C compiler ABI info
    -- Detecting C compiler ABI info - done
    -- Check for working C compiler: /usr/bin/cc - skipped
    -- Detecting C compile features
    -- Detecting C compile features - done
    CMake Error at /usr/lib/x86_64-linux-gnu/cmake/hip/hip-config.cmake:42 
(message):
      File or directory /usr/bin/hipcc referenced by variable
      hip_HIPCC_EXECUTABLE does not exist !
    Call Stack (most recent call first):
      /usr/lib/x86_64-linux-gnu/cmake/hip/hip-config.cmake:135 (set_and_check)
      CMakeLists.txt:3 (find_package)
    
    
    -- Configuring incomplete, errors occurred!

This problem can be worked around by installing hipcc, but IMO this
should work even if hipcc is not installed.

-- System Information:
Debian Release: 12.0
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 6.1.0-8-amd64 (SMP w/32 CPU threads; PREEMPT)
Locale: LANG=C, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: unable to detect

Versions of packages libamdhip64-dev depends on:
ii  libamd-comgr-dev     5.2.3-2
ii  libamdhip64-5        5.2.3-8
ii  libhiprtc-builtins5  5.2.3-8
ii  libhsa-runtime-dev   5.2.3-3

libamdhip64-dev recommends no packages.

libamdhip64-dev suggests no packages.

-- no debconf information

Reply via email to