Skip to content

Commit

Permalink
Minor include tweeks to hip extension
Browse files Browse the repository at this point in the history
Fix include search paths per #8648.
Add config support for ROCm 6.2
Remove release of unused config.h

Signed-off-by: Soren Soe <[email protected]>
  • Loading branch information
stsoe committed Jan 23, 2025
1 parent 3836e58 commit a3b024d
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 15 deletions.
2 changes: 1 addition & 1 deletion src/runtime_src/hip/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ install(TARGETS xrt_hip
)

# Release headers
install (FILES config.h xrt_hip.h
install (FILES xrt_hip.h
DESTINATION ${XRT_INSTALL_INCLUDE_DIR}/hip
COMPONENT ${XRT_BASE_DEV_COMPONENT}
)
5 changes: 2 additions & 3 deletions src/runtime_src/hip/api/hip_device.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright (C) 2023-2024 Advanced Micro Devices, Inc. All rights reserved.

#include "core/include/experimental/xrt_system.h"
// Copyright (C) 2023-2025 Advanced Micro Devices, Inc. All rights reserved.
#include "core/include/xrt/experimental/xrt_system.h"

#include "hip/core/common.h"
#include "hip/core/device.h"
Expand Down
6 changes: 3 additions & 3 deletions src/runtime_src/hip/core/memory.h
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright (C) 2024 Advanced Micro Devices, Inc. All rights reserved.
// Copyright (C) 2024-2025 Advanced Micro Devices, Inc. All rights reserved.
#ifndef xrthip_memory_h
#define xrthip_memory_h

#include "core/common/device.h"
#include "core/common/unistd.h"
#include "device.h"
#include "experimental/xrt_bo.h"
#include "experimental/xrt_ext.h"
#include "core/include/xrt/xrt_bo.h"
#include "core/include/xrt/experimental/xrt_ext.h"

namespace xrt::core::hip
{
Expand Down
6 changes: 3 additions & 3 deletions src/runtime_src/hip/core/memory_pool.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright (C) 2024 Advanced Micro Devices, Inc. All rights reserved.
// Copyright (C) 2024-2025 Advanced Micro Devices, Inc. All rights reserved.
#ifndef xrthip_memory_POOL_h
#define xrthip_memory_POOL_h

Expand All @@ -9,8 +9,8 @@
#include <mutex>

#include "core/common/device.h"
#include "experimental/xrt_bo.h"
#include "experimental/xrt_ext.h"
#include "core/include/xrt/xrt_bo.h"
#include "core/include/xrt/experimental/xrt_ext.h"

#include "device.h"
#include "memory.h"
Expand Down
8 changes: 4 additions & 4 deletions src/runtime_src/hip/core/module.h
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright (C) 2024 Advanced Micro Devices, Inc. All rights reserved.
// Copyright (C) 2024-2025 Advanced Micro Devices, Inc. All rights reserved.
#ifndef xrthip_module_h
#define xrthip_module_h

#include "common.h"
#include "context.h"
#include "experimental/xrt_ext.h"
#include "xrt/xrt_hw_context.h"
#include "xrt/xrt_kernel.h"
#include "core/include/xrt/experimental/xrt_ext.h"
#include "core/include/xrt/xrt_hw_context.h"
#include "core/include/xrt/xrt_kernel.h"

namespace xrt::core::hip {

Expand Down
2 changes: 1 addition & 1 deletion src/runtime_src/hip/hip_config.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ else ()
# HIP SDK installs hip files to C:/Program Files/AMD/ROCm in windows
# Latest version installed (6.1, 5.7 or whatever available) will be picked
# Users can set HIP_DIR to location of HIP installation or default path is used
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} $ENV{HIP_DIR} "C:/Program Files/AMD/ROCm/6.1/lib/cmake/hip" "C:/Program Files/AMD/ROCm/5.7/lib/cmake/hip")
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} $ENV{HIP_DIR} "C:/Program Files/AMD/ROCm/6.2/lib/cmake/hip" "C:/Program Files/AMD/ROCm/6.1/lib/cmake/hip" "C:/Program Files/AMD/ROCm/5.7/lib/cmake/hip")
endif ()

include(hip-config)
Expand Down

0 comments on commit a3b024d

Please sign in to comment.