diff --git a/projects/amdsmi/include/rocm_smi/rocm_smi.h b/projects/amdsmi/include/rocm_smi/rocm_smi.h index d36c67f9dd..4336a76d29 100755 --- a/projects/amdsmi/include/rocm_smi/rocm_smi.h +++ b/projects/amdsmi/include/rocm_smi/rocm_smi.h @@ -50,7 +50,6 @@ extern "C" { #include #endif // __cplusplus -#include #include /** \file rocm_smi.h @@ -113,6 +112,12 @@ typedef enum { RSMI_STATUS_UNKNOWN_ERROR = 0xFFFFFFFF, //!< An unknown error occurred } rsmi_status_t; +/** + * @brief Initialization flags + * + * Initialization flags may be OR'd together and passed to ::rsmi_init(). + */ + typedef enum { RSMI_INIT_FLAG_ALL_GPUS = 0x1, //!< Attempt to add all GPUs found //!< (including non-AMD) to the list diff --git a/projects/amdsmi/src/rocm_smi_main.cc b/projects/amdsmi/src/rocm_smi_main.cc index 2a2518a0a4..901d392b08 100755 --- a/projects/amdsmi/src/rocm_smi_main.cc +++ b/projects/amdsmi/src/rocm_smi_main.cc @@ -348,7 +348,7 @@ static bool isAMDGPU(std::string dev_path) { fs.open(vend_path); if (!fs.is_open()) { - return errno; + return false; } uint32_t vendor_id;