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
5 changes: 2 additions & 3 deletions base/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,9 @@ therock_cmake_subproject_declare(rocm_smi_lib
USE_DIST_AMDGPU_TARGETS
BACKGROUND_BUILD
CMAKE_ARGS
# See the post_hook, which needs to advertise install interface directories
# in this case.
"-DTHEROCK_HAS_BUNDLED_LIBDRM=${THEROCK_BUNDLED_LIBDRM}"
# rocm-smi-lib is deprecated in favor of AMD SMI; skip building it. The
# subproject honors this flag and configures to a no-op.
"-DROCM_SMI_DISABLE=True"
INTERFACE_LINK_DIRS
"lib"
INSTALL_RPATH_DIRS
Expand Down
18 changes: 18 additions & 0 deletions base/post_hook_rocm_smi_lib.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Copyright Advanced Micro Devices, Inc.
# SPDX-License-Identifier: MIT

# smi_lib public headers include libdrm, so in the bundled case, we must ensure
# that the installed libraries add the include directory. This is because
# libdrm does not cross the install boundary as a dep (since it is pkgconfig
# and was not set up that way).
# Conversely, if we include directories that do not exist, CMake consumers
# will error out due to the missing directories.
# See the project declaration for where this flag is defined.
if(THEROCK_HAS_BUNDLED_LIBDRM)
target_include_directories(rocm_smi64 PUBLIC
"$<INSTALL_INTERFACE:lib/rocm_sysdeps/include>"
)
target_include_directories(oam PUBLIC
"$<INSTALL_INTERFACE:lib/rocm_sysdeps/include>"
)
endif()
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ do_update_alternatives(){
# previous patch level is small.
altscore=$((altscore*1000000+(now-1600000000)/60))

binaries=( hipcc hipconfig hipify-clang rocminfo amd-smi rocm_agent_enumerator amdclang amdclang++ amdclang-cl amdclang-cpp amdflang amdlld )
binaries=( hipcc hipconfig hipify-clang rocminfo amd-smi rocm-smi rocm_agent_enumerator amdclang amdclang++ amdclang-cl amdclang-cpp amdflang amdlld )

{% if target == "deb" %}
PKG_INSTALL_PREFIX={{ install_prefix }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

binaries=( hipcc hipconfig hipify-clang rocminfo amd-smi rocm_agent_enumerator amdclang amdclang++ amdclang-cl amdclang-cpp amdflang amdlld )
binaries=( hipcc hipconfig hipify-clang rocminfo amd-smi rocm-smi rocm_agent_enumerator amdclang amdclang++ amdclang-cl amdclang-cpp amdflang amdlld )

is_debian_like() {
local id_like="$1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ do_update_alternatives(){
rocpd
rocminfo
amd-smi
rocm-smi
rocm_agent_enumerator
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ binaries=(
rocpd
rocminfo
amd-smi
rocm-smi
rocm_agent_enumerator
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ def import_dist_info():
"hipify-perl=rocm_sdk_core._cli:hipify_perl",
"rocm_agent_enumerator=rocm_sdk_core._cli:rocm_agent_enumerator",
"rocminfo=rocm_sdk_core._cli:rocm_info",
"rocm-smi=rocm_sdk_core._cli:rocm_smi",
"roccoremerge=rocm_sdk_core._cli:roccoremerge",
"rocgdb=rocm_sdk_core._cli:rocgdb",
"rocpd=rocm_sdk_core._cli:rocpd",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,10 @@ def rocm_info():
_exec("bin/rocminfo", expand_devel=False)


def rocm_smi():
_exec("bin/rocm-smi", expand_devel=False)


def roccoremerge():
_exec("bin/roccoremerge")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,7 @@ def determine_target_family() -> str:
)
LibraryEntry("amd_comgr", "core", "libamd_comgr.so*", "amd_comgr*.dll")
LibraryEntry("rocm_kpack", "core", "librocm_kpack.so*", "rocm_kpack*.dll")
LibraryEntry("rocm_smi64", "core", "librocm_smi64.so*", "")
LibraryEntry("rocdecode", "core", "librocdecode.so*", "rocdecode*.dll")
LibraryEntry("rocjpeg", "core", "librocjpeg.so*", "")
LibraryEntry("amd_smi", "core", "libamd_smi.so*", "")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
("amd-smi", [], "AMD-SMI", True),
("rocm_agent_enumerator", [], "", True),
("rocminfo", [], "", True),
("rocm-smi", [], "Management", True),
("hipify-perl", ["--help"], "USAGE:", True),
]

Expand Down
Loading