Refactor ESMI Initialization and Argument Parsing
Signed-off-by: Maisam Arif <maisarif@amd.com> Change-Id: Iefab3a8110e0d3c525ee0cef1bdef9101550e9de
This commit is contained in:
@@ -261,7 +261,7 @@ amdsmi_status_t AMDSmiSystem::cleanup() {
|
||||
processors_.clear();
|
||||
sockets_.clear();
|
||||
esmi_exit();
|
||||
init_flag_ = AMDSMI_INIT_ALL_PROCESSORS;
|
||||
init_flag_ &= ~AMDSMI_INIT_AMD_CPUS;
|
||||
}
|
||||
#endif
|
||||
if (init_flag_ & AMDSMI_INIT_AMD_GPUS) {
|
||||
@@ -270,7 +270,7 @@ amdsmi_status_t AMDSmiSystem::cleanup() {
|
||||
}
|
||||
processors_.clear();
|
||||
sockets_.clear();
|
||||
init_flag_ = AMDSMI_INIT_ALL_PROCESSORS;
|
||||
init_flag_ &= ~AMDSMI_INIT_AMD_GPUS;
|
||||
rsmi_status_t ret = rsmi_shut_down();
|
||||
if (ret != RSMI_STATUS_SUCCESS) {
|
||||
return amd::smi::rsmi_to_amdsmi_status(ret);
|
||||
|
||||
Reference in New Issue
Block a user