diff --git a/projects/rccl/CMakeLists.txt b/projects/rccl/CMakeLists.txt index b8bebe7703..fb669d3ca8 100644 --- a/projects/rccl/CMakeLists.txt +++ b/projects/rccl/CMakeLists.txt @@ -284,6 +284,7 @@ if(ROCM_VERSION VERSION_GREATER_EQUAL "71100" AND ENABLE_AMDSMI) else() # Force unset if disabled unset(USE_AMDSMI CACHE) + add_definitions("-DSMI_DISABLED") endif() if(NOT USE_AMDSMI AND ENABLE_AMDSMI) diff --git a/projects/rccl/src/include/amdsmi_wrap.h b/projects/rccl/src/include/amdsmi_wrap.h index 0e8918e5bc..7355f55274 100644 --- a/projects/rccl/src/include/amdsmi_wrap.h +++ b/projects/rccl/src/include/amdsmi_wrap.h @@ -7,7 +7,7 @@ #include "amd_smi/amdsmi.h" #include "nccl.h" -#ifdef USE_AMDSMI +#if defined(USE_AMDSMI) && !defined(SMI_DISABLED) ncclResult_t amd_smi_init(); ncclResult_t amd_smi_shutdown(); ncclResult_t amd_smi_getNumDevice(uint32_t* num_devs); diff --git a/projects/rccl/src/include/rocm_smi_wrap.h b/projects/rccl/src/include/rocm_smi_wrap.h index 6787ed1307..d4ed40ad3c 100644 --- a/projects/rccl/src/include/rocm_smi_wrap.h +++ b/projects/rccl/src/include/rocm_smi_wrap.h @@ -29,7 +29,7 @@ THE SOFTWARE. #endif #include "nccl.h" -#ifdef USE_ROCMSMI +#if defined(USE_ROCMSMI) && !defined(SMI_DISABLED) ncclResult_t rocm_smi_init(); ncclResult_t rocm_smi_getNumDevice(uint32_t* num_devs); ncclResult_t rocm_smi_getDevicePciBusIdString(uint32_t deviceIndex, char* pciBusId, size_t len);