Skip to content

HIP: INTERFACE_INCLUDE_PATH not proppagated

Using CMake 3.21.4 and ROCM 4.5 https://github.com/ye-luo/cmake_gpu/tree/master/test_rocm mkdir build; cd build; cmake .. runs fine.

... # I print INTERFACE_INCLUDE_PATH in the CMakeLists.txt
hipblas INTERFACE_INCLUDE_PATH = /opt/rocm-4.5.0/include
...

When I dug into the generated files

$ grep INCL CMakeFiles/foo.dir/flags.make 
HIP_INCLUDES = 

It is empty. A following make succeeded but it was correct because of special treatment in the ROCM shipped compiler I guess. The cause of empty HIP_INCLUDES is

set_source_files_properties(foo.hip.cpp PROPERTIES LANGUAGE HIP)

The reason I declare this file as HIP because in my full application, it would contain HIP kernel source codes. For this reason, I'm wondering why INTERFACE_INCLUDE_PATH was not propagated and how to get this fixed.

Edited by Brad King
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information