Skip to content

[Issue]: CMake lookup of LLVM binaries uses wrong path on Windows #266

@j-stephan

Description

@j-stephan

Problem Description

While looking at HIP-Basic\CMakeLists.txt I noticed the following lookup code for the LLVM binaries:

    find_program(
        LLVM_DIS_COMMAND
        llvm-dis
        PATH_SUFFIXES bin
        PATHS ${ROCM_ROOT}/llvm ${CMAKE_INSTALL_PREFIX}/llvm
        NO_DEFAULT_PATH
    )

The issue here is that on Windows, ROCM_ROOT (which is set to the environment variable HIP_PATH which in turn is set by the HIP SDK installer) does not contain a llvm directory. Although the LLVM binaries are present, CMake won't find them and therefore disable the example on Windows.

Operating System

Windows 11

CPU

AMD Ryzen 7 PRO 8840U with Radeon 780M Graphics

GPU

AMD Radeon 780M

ROCm Version

ROCm 6.2 and ROCm 6.4

ROCm Component

No response

Steps to Reproduce

  1. Install the official HIP SDK for Windows or use an AMD-internal version.
  2. Observe that the installed HIP SDK version will not contain a llvm directory.
  3. Configure the project with CMake and note the disabled examples.

(Optional for Linux users) Output of /opt/rocm/bin/rocminfo --support

No response

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions