Skip to content
This repository was archived by the owner on Aug 10, 2023. It is now read-only.
This repository was archived by the owner on Aug 10, 2023. It is now read-only.

CMake integration #23

Open
Open

Description

@Kerilk

Hello,

Disclaimer: I am no expert in CMake...

We are currently trying to run hipcl on our test base:
https://github.com/jz10/hip-test_suite
Most simple examples are fine, and auto-tools build systems can also be configured without too much issues.
Problems start arising when trying to build CMake based projects. The FindHIP.cmake of hipcl file seems to have diverged quite a bit from what HIP proposes nowadays:
https://github.com/ROCm-Developer-Tools/HIP/blob/main/cmake/FindHIP.cmake
In most cases this causes cmake to crash when a macro like hip_add_executable is missing, or reject hipcl:

  The following configuration files were considered but not accepted:

    /soft/compilers/hipcl/master-202010107/lib/hipcl/cmake/hip-config.cmake, version: unknown

As I already mentioned, I am no CMake expert so I don't feel confident adequately solving those issues. Nonetheless, it seems like a worthwhile investment, as hipcl is becoming increasingly stable, using it with bigger projects seems the likely next step.

Thanks

Activity

  1. franz commented on Feb 8, 2021

    @franz
    Contributor

    CMake should be now more compatible with upstream HIP in master, although i have only tried it on a few samples. Please try it out and see if it works. You'll need to do a reinstall hipcl (there's no need to recompile clang+llvm).

  2. Kerilk commented on Feb 8, 2021

    @Kerilk
    ContributorAuthor

    Thanks, we'll try this out and let you know.

  3. colleeneb commented on Feb 25, 2021

    @colleeneb

    Thanks for this!

    We tried it out on our system and it works to build more things than it used to! However, I was hoping that I could more or less use the exact same CMakeLists.txt from AMD hip to compile hipcl code.

    I ran into one main issue: one of the codes I was trying to build with HIPCL uses the hip::device target from find_package(hip) to add compilation flags. hipcl doesn't define hip::device, but it defines just "hip::hipcl". Are there any plans to also define hip::device for hipcl so we can more easily use the same CMakeLists.txt as AMD hip?

    I can respond with the CMakeLists.txt if that would help. Thanks!

  4. colleeneb commented on Mar 4, 2021

    @colleeneb

    Ping on this!

  5. franz commented on Mar 16, 2021

    @franz
    Contributor

    Sorry, i'm not aware of what is "hip::device" and what should it provide. Haven't seen it in the HIP CMake code. We could add an empty target but i'm not sure if that would work.

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

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