From 2c03b530cb097fe267ef5b13fa9c1446aefdc579 Mon Sep 17 00:00:00 2001 From: Maisam Arif Date: Fri, 24 Jul 2026 13:27:46 -0500 Subject: [PATCH 1/4] build: disable rocm-smi-lib build (deprecated) Pass -DROCM_SMI_DISABLE=True to the rocm_smi_lib subproject so it configures to a no-op. rocm-smi-lib is deprecated in favor of AMD SMI. Signed-off-by: Maisam Arif --- base/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/base/CMakeLists.txt b/base/CMakeLists.txt index 3c54f0bae1c..1ef4b96b647 100644 --- a/base/CMakeLists.txt +++ b/base/CMakeLists.txt @@ -82,6 +82,9 @@ therock_cmake_subproject_declare(rocm_smi_lib # 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 From 5851fe163ecf2831c99de467f1da5dcc03fa58d9 Mon Sep 17 00:00:00 2001 From: gabrpham Date: Tue, 11 Aug 2026 15:49:30 -0500 Subject: [PATCH 2/4] Update post_hook_rocm_smi_lib to prevent failure of base build ROCM_SMI_DISABLE gate caused rocm_smi64 and oam to not be defined which in turn caused post_hook_rocm_smi_lib.cmake to return error. This prevented base from building which cascades down into rocprofiler_sdk failing and finally causing the compiler-runtime stage to fail. Added TARGET guards in post_hook_rocm_smi_lib.cmake to skip including those targets and unblock everything downstream. --- base/post_hook_rocm_smi_lib.cmake | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/base/post_hook_rocm_smi_lib.cmake b/base/post_hook_rocm_smi_lib.cmake index 02a0eba5e17..93c0aca9b40 100644 --- a/base/post_hook_rocm_smi_lib.cmake +++ b/base/post_hook_rocm_smi_lib.cmake @@ -9,10 +9,14 @@ # 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 - "$" - ) - target_include_directories(oam PUBLIC - "$" - ) + if(TARGET rocm_smi64) + target_include_directories(rocm_smi64 PUBLIC + "$" + ) + endif() + if(TARGET oam) + target_include_directories(oam PUBLIC + "$" + ) + endif() endif() From dabcf045052bdeaa65c7f52683d5c4d7439d8b69 Mon Sep 17 00:00:00 2001 From: gabrpham Date: Wed, 19 Aug 2026 16:11:29 -0500 Subject: [PATCH 3/4] remove additional rocm_smi references from build procedures in pytorch and rocm sdk core --- build_tools/packaging/python/templates/rocm-sdk-core/setup.py | 1 - .../python/templates/rocm-sdk-core/src/rocm_sdk_core/_cli.py | 4 ---- .../python/templates/rocm/src/rocm_sdk/_dist_info.py | 1 - .../python/templates/rocm/src/rocm_sdk/tests/core_test.py | 1 - external-builds/pytorch/build_prod_wheels.py | 1 - 5 files changed, 8 deletions(-) diff --git a/build_tools/packaging/python/templates/rocm-sdk-core/setup.py b/build_tools/packaging/python/templates/rocm-sdk-core/setup.py index 5f8d1c5e9dd..cc9464bbd82 100644 --- a/build_tools/packaging/python/templates/rocm-sdk-core/setup.py +++ b/build_tools/packaging/python/templates/rocm-sdk-core/setup.py @@ -88,7 +88,6 @@ 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", diff --git a/build_tools/packaging/python/templates/rocm-sdk-core/src/rocm_sdk_core/_cli.py b/build_tools/packaging/python/templates/rocm-sdk-core/src/rocm_sdk_core/_cli.py index 29106bb513e..adc1ccab22c 100644 --- a/build_tools/packaging/python/templates/rocm-sdk-core/src/rocm_sdk_core/_cli.py +++ b/build_tools/packaging/python/templates/rocm-sdk-core/src/rocm_sdk_core/_cli.py @@ -184,10 +184,6 @@ def rocm_info(): _exec("bin/rocminfo", expand_devel=False) -def rocm_smi(): - _exec("bin/rocm-smi", expand_devel=False) - - def roccoremerge(): _exec("bin/roccoremerge") diff --git a/build_tools/packaging/python/templates/rocm/src/rocm_sdk/_dist_info.py b/build_tools/packaging/python/templates/rocm/src/rocm_sdk/_dist_info.py index cc0c1301b37..7c7b6fb53a4 100644 --- a/build_tools/packaging/python/templates/rocm/src/rocm_sdk/_dist_info.py +++ b/build_tools/packaging/python/templates/rocm/src/rocm_sdk/_dist_info.py @@ -269,7 +269,6 @@ 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*", "") LibraryEntry("rocjpeg", "core", "librocjpeg.so*", "") LibraryEntry("amd_smi", "core", "libamd_smi.so*", "") diff --git a/build_tools/packaging/python/templates/rocm/src/rocm_sdk/tests/core_test.py b/build_tools/packaging/python/templates/rocm/src/rocm_sdk/tests/core_test.py index c361ae6d4a4..6fbd29b3073 100644 --- a/build_tools/packaging/python/templates/rocm/src/rocm_sdk/tests/core_test.py +++ b/build_tools/packaging/python/templates/rocm/src/rocm_sdk/tests/core_test.py @@ -47,7 +47,6 @@ ("amd-smi", [], "AMD-SMI", True), ("rocm_agent_enumerator", [], "", True), ("rocminfo", [], "", True), - ("rocm-smi", [], "Management", True), ("hipify-perl", ["--help"], "USAGE:", True), ] diff --git a/external-builds/pytorch/build_prod_wheels.py b/external-builds/pytorch/build_prod_wheels.py index 2a2dc71a49c..2c797eaa86c 100755 --- a/external-builds/pytorch/build_prod_wheels.py +++ b/external-builds/pytorch/build_prod_wheels.py @@ -188,7 +188,6 @@ "hipdnn", "rocm_sysdeps_liblzma", "rocm-openblas", - "rocm_smi64", # Linux only. "rocprofiler-sdk", # Needed by torch since kineto uses rocprofiler-sdk. "rocprofiler-sdk-roctx", From 677f652d256b62321c422a4528a5c7f999029205 Mon Sep 17 00:00:00 2001 From: gabrpham Date: Fri, 28 Aug 2026 16:28:51 -0500 Subject: [PATCH 4/4] removed post_hook_rocm_smi_lib.cmake --- base/CMakeLists.txt | 2 -- base/post_hook_rocm_smi_lib.cmake | 22 ---------------------- 2 files changed, 24 deletions(-) delete mode 100644 base/post_hook_rocm_smi_lib.cmake diff --git a/base/CMakeLists.txt b/base/CMakeLists.txt index 1ef4b96b647..adcdf4f0c08 100644 --- a/base/CMakeLists.txt +++ b/base/CMakeLists.txt @@ -79,8 +79,6 @@ 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. diff --git a/base/post_hook_rocm_smi_lib.cmake b/base/post_hook_rocm_smi_lib.cmake deleted file mode 100644 index 93c0aca9b40..00000000000 --- a/base/post_hook_rocm_smi_lib.cmake +++ /dev/null @@ -1,22 +0,0 @@ -# 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) - if(TARGET rocm_smi64) - target_include_directories(rocm_smi64 PUBLIC - "$" - ) - endif() - if(TARGET oam) - target_include_directories(oam PUBLIC - "$" - ) - endif() -endif()