Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 15 additions & 6 deletions unified-runtime/source/adapters/hip/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
2 changes: 1 addition & 1 deletion unified-runtime/source/adapters/hip/context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<uint32_t>(hContext->Devices.size()));
case UR_CONTEXT_INFO_DEVICES:
Expand Down
1 change: 1 addition & 0 deletions unified-runtime/source/adapters/hip/device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include "context.hpp"
#include "event.hpp"

#include <array>
#include <hip/hip_runtime.h>
#include <sstream>

Expand Down
1 change: 1 addition & 0 deletions unified-runtime/source/adapters/hip/kernel.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

#include <ur_api.h>

#include <array>
#include <atomic>
#include <cassert>
#include <numeric>
Expand Down
Loading