Skip to content

Outdated HIP/ROCm Build #477

Closed
Closed

Description

@Spaarsh

I am a Debian package developer working with the rocm-team.

The current HIP/ROCm build is outdated and does not lead to a successful build.

If one removes the strict version requirement of HIP 1.0, the next error encountered is:

CMake Error at cmake/Dependencies.cmake:168 (hip_include_directories):
  Unknown CMake command "hip_include_directories".

The current build configuration is using a legacy mode, which uses FindHIP.cmake while recent ROCm versions use hip-config.cmake and hip-lang-config.cmake. The entire HIP/ROCm build needs to be updated.

I have already patched this in the gloo package in Debian, which is currently under review.

It had to be built with USE_RCCL=OFF due to an issue with the rccl package in Debian. The package passes all the tests (that it is supposed to pass with RCCL OFF) and has been tested on an AMD Instinct MI210.

The logs can be found here.

The patch can be found here.

I shall make a PR in a short while to enable easier review of the changes made.

Activity

  1. GZGavinZhao commented on Jan 7, 2026

    @GZGavinZhao
    Contributor

    PyTorch also needs to switch to CMake's native HIP support. Right now the HIP compiler is tied to the C++ compiler. They should be separated because the user might want to use a different, possibly more optimized, compiler for the CPU code and just use the HIP compiler for the HIP code.

  2. GZGavinZhao commented on Jan 7, 2026

    @GZGavinZhao
    Contributor

    add_definitions(-D__HIP_PLATFORM_AMD__ -D__HIP_PLATFORM_HCC__) shouldn't be needed, either CMake or LLVM should add it for you.

  3. GZGavinZhao commented on Jan 10, 2026

    @GZGavinZhao
    Contributor

    The CMake minimum version needs to be bumped from the current 3.18 to 3.21. Do any PyTorch/GLOO maintainers know whether this change would cause any trouble?

  4. Spaarsh commented on Jan 11, 2026

    @Spaarsh
    Author

    Sorry I did not realize that you had already made the PR @GZGavinZhao

    As for the CMake version, I had built my debian package on the latest version on the apt unstable branch which was 4.1.1 so I do not think this should be problematic. The CPU package also built successfully, though I did not test it.

  5. GZGavinZhao commented on Jan 11, 2026

    @GZGavinZhao
    Contributor

    Oops no no sorry for submitting a PR when you already have your changes. Feel free to PR to my branch if you have more ROCm things from your patch that you want to get merged.

  6. Spaarsh commented on Jan 11, 2026

    @Spaarsh
    Author

    @GZGavinZhao sure, I will do so. Additionally, the version of CMake is actually 4.1.1+really3.31.6-2 so essentially it is 3.31 and not 4.1. Either way, the minimum version requirement of 3.21 should be alright.

  7. d4l3k commented on Feb 6, 2026

    @d4l3k
    Member

    I'm adding a rocm build in #488 which hopefully will help us test this

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