From 2db5679d80ecb4bf5feccf1cf088ccd99496cc56 Mon Sep 17 00:00:00 2001 From: Chris Freehill <13054697+cfreehill@users.noreply.github.com> Date: Thu, 9 May 2019 20:45:54 -0500 Subject: [PATCH] By default, only consider AMD GPU's in RSMI device list (#36) With newly added initialization parameters that can be passed to rsmi_init(), you can tell RSMI to consider other devices. Also: -fixed incorrect header file name that would break in C builds -modified rsmi_init() and rsmi_shut_down() to reinitialize and clear static structures [ROCm/amdsmi commit: 15ca1c26a046f477c40b5714a5fd0f8e4b794afd] --- projects/amdsmi/include/rocm_smi/rocm_smi.h | 23 +++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/projects/amdsmi/include/rocm_smi/rocm_smi.h b/projects/amdsmi/include/rocm_smi/rocm_smi.h index 0f7697dabd..e867c6258f 100755 --- a/projects/amdsmi/include/rocm_smi/rocm_smi.h +++ b/projects/amdsmi/include/rocm_smi/rocm_smi.h @@ -113,6 +113,29 @@ typedef enum { RSMI_STATUS_UNKNOWN_ERROR = 0xFFFFFFFF, //!< An unknown error occurred } rsmi_status_t; +typedef enum { + RSMI_INIT_FLAG_ALL_GPUS = 0x1, //!< Attempt to add all GPUs found + //!< (including non-AMD) to the list + //!< of devices from which SMI + //!< information can be retrieved. By + //!< default, only AMD devices are + //!< ennumerated by RSMI. +} rsmi_init_flags_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 + //!< of devices from which SMI + //!< information can be retrieved. By + //!< default, only AMD devices are + //!< ennumerated by RSMI. +} rsmi_init_flags_t; + /** * @brief Initialization flags *