Skip to content

blt_hip_smoke does not compile #700

Open
@gzagaris

Description

Hello,

I am trying to compile with HIP and it seems that CMake attempts to compile the blt_hip_smoke test using the host-compiler.

My host-config looks like this:

#---------------------------------------------------------------------------------------------------
# Compiler settings
#---------------------------------------------------------------------------------------------------
set(CMAKE_C_COMPILER "/opt/cray/pe/gcc/12.2.0/snos/bin/gcc" CACHE PATH "Path to the C compiler." )
set(CMAKE_CXX_COMPILER "/opt/cray/pe/gcc/12.2.0/snos/bin/g++" CACHE PATH "Path to the C++ compiler." )

...

#---------------------------------------------------------------------------------------------------
# ROCM / HIP 
#---------------------------------------------------------------------------------------------------
set(ENABLE_HIP ON CACHE BOOL "")
set(ROCM_ROOT_DIR "/opt/rocm-5.7.0" CACHE PATH "")
set(HIP_ROOT_DIR "${ROCM_ROOT_DIR}/hip" CACHE PATH "")
set(HIP_CXX_COMPILER "${HIP_ROOT_DIR}/bin/hipcc" CACHE PATH "")
set(CMAKE_HIP_COMPILER "${ROCM_ROOT_DIR}/llvm/bin/clang++" CACHE FILEPATH "")

set(CMAKE_HIP_ARCHITECTURES "gfx90a" CACHE STRING "")
set(AMDGPU_TARGETS "gfx90a" CACHE STRING "")
set(GPU_TARGETS "gfx90a" CACHE STRING "")

I configure with CMake successfully, but, I see the following warnings:

-- Creating BLT HIP targets...
CMake Deprecation Warning at /opt/rocm-5.7.0/lib/cmake/hip/hip-config.cmake:20 (cmake_minimum_required):
  Compatibility with CMake < 3.5 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.
Call Stack (most recent call first):
  contrib/blt/cmake/thirdparty/BLTSetupHIP.cmake:38 (find_package)
  contrib/blt/cmake/BLTSetupTargets.cmake:108 (include)
  contrib/blt/cmake/SetupThirdParty.cmake:6 (include)
  contrib/blt/SetupBLT.cmake:129 (include)
  CMakeLists.txt:39 (mint_blt_setup)


CMake Deprecation Warning at /opt/rocm-5.7.0/lib/cmake/hip/hip-config-amd.cmake:21 (cmake_minimum_required):
  Compatibility with CMake < 3.5 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.
Call Stack (most recent call first):
  /opt/rocm-5.7.0/lib/cmake/hip/hip-config.cmake:150 (include)
  contrib/blt/cmake/thirdparty/BLTSetupHIP.cmake:38 (find_package)
  contrib/blt/cmake/BLTSetupTargets.cmake:108 (include)
  contrib/blt/cmake/SetupThirdParty.cmake:6 (include)
  contrib/blt/SetupBLT.cmake:129 (include)
  ...

When building, e.g., with make -j, or just make make blt_hip_smoke/fast

I get the following error:

Building CXX object blt/tests/smoke/CMakeFiles/blt_hip_smoke.dir/blt_hip_smoke.cpp.o
g++: error: unrecognized command-line option '--rocm-path=/opt/rocm-5.7.0'
g++: error: unrecognized command-line option '--offload-arch=gfx90a'
make[1]: *** [blt/tests/smoke/CMakeFiles/blt_hip_smoke.dir/build.make:76: blt/tests/smoke/CMakeFiles/blt_hip_smoke.dir/blt_hip_smoke.cpp.o] Error 1

Any ideas? Am I missing any flags?

I tried this with blt v0.5.3 and the latest v0.6.2.

Thank you for all your help.

Activity

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

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