From f4b6e5f450b4ed28bb8dc15e5bfac521198735ad Mon Sep 17 00:00:00 2001 From: Donato Capitella Date: Sun, 1 Feb 2026 11:54:43 +0000 Subject: [PATCH] Fix: Unconditionally include SMI headers in build list to fix hipify missing file error --- projects/rccl/CMakeLists.txt | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/projects/rccl/CMakeLists.txt b/projects/rccl/CMakeLists.txt index 513f1e3a85..f48a8d7926 100644 --- a/projects/rccl/CMakeLists.txt +++ b/projects/rccl/CMakeLists.txt @@ -779,16 +779,20 @@ set(SRC_FILES src/misc/latency_profiler/CollTraceUtils.cc ) -if(USE_AMDSMI) - set(SMI_SOURCES - src/include/amdsmi_wrap.h - src/misc/amdsmi_wrap.cc - ) -elseif(ENABLE_AMDSMI) - set(SMI_SOURCES - src/include/rocm_smi_wrap.h - src/misc/rocm_smi_wrap.cc - ) +# Unconditionally include SMI headers so they are hipified/available +set(SMI_HEADERS + src/include/rocm_smi_wrap.h + src/include/amdsmi_wrap.h +) +list(APPEND SRC_FILES ${SMI_HEADERS}) + +if(ENABLE_AMDSMI) + # Only compile the wrapper sources if SMI is enabled + if(USE_AMDSMI) + list(APPEND SRC_FILES src/misc/amdsmi_wrap.cc) + else() + list(APPEND SRC_FILES src/misc/rocm_smi_wrap.cc) + endif() endif() list(APPEND SRC_FILES ${SMI_SOURCES})