# hip::host not working for NVIDIA platforms

**URL:** https://discourse.cmake.org/t/hip-host-not-working-for-nvidia-platforms/13577
**Category:** Development
**Tags:** os:linux
**Created:** [February 14, 2025, 4:32pm UTC](https://discourse.cmake.org/t/hip-host-not-working-for-nvidia-platforms/13577 "2025-02-14T16:32:41Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![brad.king](https://discourse.cmake.org/user_avatar/discourse.cmake.org/brad.king/32/11_2.png) [@brad.king](https://discourse.cmake.org/u/brad.king)
#### Post date: [February 14, 2025, 10:48pm UTC](https://discourse.cmake.org/t/hip-host-not-working-for-nvidia-platforms/13577/3 "2025-02-14T22:48:12Z")

</div>

I can reproduce this in containers started from the `rocm/dev-ubuntu-24.04:6.3.2` base image.

After configuring the posted sample project, I re-ran `cmake . --trace-expand 2>log` in the build tree.

On an AMD platform, the log shows the `hip::host` target getting built, and the `/opt/rocm/include` include directory added:

```auto
/opt/rocm/lib/cmake/hip/hip-targets.cmake(59): add_library(hip::amdhip64 SHARED IMPORTED )
...
/opt/rocm/lib/cmake/hip/hip-targets.cmake(66): add_library(hip::host INTERFACE IMPORTED )
/opt/rocm/lib/cmake/hip/hip-targets.cmake(68): set_target_properties(hip::host PROPERTIES INTERFACE_LINK_LIBRARIES hip::amdhip64 )
...
/opt/rocm/lib/cmake/hip/hip-config-amd.cmake(136): set_target_properties(hip::amdhip64 PROPERTIES INTERFACE_INCLUDE_DIRECTORIES /opt/rocm/include INTERFACE_SYSTEM_INCLUDE_DIRECTORIES /opt/rocm/include )

```

The `hip::host` target is created under an `include()` in the HIP cmake package:

```console
$ grep "^include" /opt/rocm/lib/cmake/hip/hip-config-amd.cmake
include( "${CMAKE_CURRENT_LIST_DIR}/hip-targets.cmake" )

```

On an NVIDIA platform, the log shows the `hip::host` target being created but not populated:

```auto
/opt/rocm/lib/cmake/hip/hip-config-nvidia.cmake(22): add_library(hip::host INTERFACE IMPORTED )
...

```

The `hip::host` target is created directly in the HIP cmake package, but not populated:

```console
$ grep -v '^#' /opt/rocm/lib/cmake/hip/hip-config-nvidia.cmake

add_library(hip::device INTERFACE IMPORTED)
add_library(hip::host INTERFACE IMPORTED)
add_library(hip::amdhip64 INTERFACE IMPORTED)

```

I suspect that the NVIDIA-backed implementation of HIP’s cmake package is incomplete.

---

_[View the full topic](https://discourse.cmake.org/t/hip-host-not-working-for-nvidia-platforms/13577)._
