diff --git a/unified-runtime/source/adapters/hip/CMakeLists.txt b/unified-runtime/source/adapters/hip/CMakeLists.txt index d5c92c90ef01..d0674ad504d4 100644 --- a/unified-runtime/source/adapters/hip/CMakeLists.txt +++ b/unified-runtime/source/adapters/hip/CMakeLists.txt @@ -110,12 +110,21 @@ if("${UR_HIP_PLATFORM}" STREQUAL "AMD") # Import HIP runtime library add_library(rocmdrv SHARED IMPORTED GLOBAL) - set_target_properties( - rocmdrv PROPERTIES - IMPORTED_LOCATION "${UR_HIP_LIB_DIR}/libamdhip64.so" - INTERFACE_INCLUDE_DIRECTORIES "${HIP_HEADERS}" - INTERFACE_SYSTEM_INCLUDE_DIRECTORIES "${HIP_HEADERS}" - ) + if(WIN32) + set_target_properties( + rocmdrv PROPERTIES + IMPORTED_IMPLIB "${UR_HIP_LIB_DIR}/amdhip64.lib" + INTERFACE_INCLUDE_DIRECTORIES "${HIP_HEADERS}" + INTERFACE_SYSTEM_INCLUDE_DIRECTORIES "${HIP_HEADERS}" + ) + else() + set_target_properties( + rocmdrv PROPERTIES + IMPORTED_LOCATION "${UR_HIP_LIB_DIR}/libamdhip64.so" + INTERFACE_INCLUDE_DIRECTORIES "${HIP_HEADERS}" + INTERFACE_SYSTEM_INCLUDE_DIRECTORIES "${HIP_HEADERS}" + ) + endif() if(UR_ENABLE_COMGR) set(UR_COMGR_VERSION5_HEADER "${UR_HIP_INCLUDE_DIR}/amd_comgr/amd_comgr.h") diff --git a/unified-runtime/source/adapters/hip/context.cpp b/unified-runtime/source/adapters/hip/context.cpp index 30bf4743a4cc..12c5f8348c02 100644 --- a/unified-runtime/source/adapters/hip/context.cpp +++ b/unified-runtime/source/adapters/hip/context.cpp @@ -61,7 +61,7 @@ urContextGetInfo(ur_context_handle_t hContext, ur_context_info_t propName, UrReturnHelper ReturnValue(propSize, pPropValue, pPropSizeRet); - switch (uint32_t{propName}) { + switch (propName) { case UR_CONTEXT_INFO_NUM_DEVICES: return ReturnValue(static_cast(hContext->Devices.size())); case UR_CONTEXT_INFO_DEVICES: diff --git a/unified-runtime/source/adapters/hip/device.cpp b/unified-runtime/source/adapters/hip/device.cpp index 98ab6184e341..613a8b6bbe82 100644 --- a/unified-runtime/source/adapters/hip/device.cpp +++ b/unified-runtime/source/adapters/hip/device.cpp @@ -13,6 +13,7 @@ #include "context.hpp" #include "event.hpp" +#include #include #include diff --git a/unified-runtime/source/adapters/hip/kernel.hpp b/unified-runtime/source/adapters/hip/kernel.hpp index 7c91742550eb..97c80c32709e 100644 --- a/unified-runtime/source/adapters/hip/kernel.hpp +++ b/unified-runtime/source/adapters/hip/kernel.hpp @@ -11,6 +11,7 @@ #include +#include #include #include #include