mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-04 15:53:45 +08:00
Defer Sysman Engine Module Initialization
With this change, init for sysman Engine API would not be done during zeInit. init and thereby Engine API handle creation would be done only when user explicitly requests to enumerate handles using zesDeviceEnumEngineGroups Related-To: LOCI-3127 Signed-off-by: Kulkarni, Ashwin Kumar <ashwin.kumar.kulkarni@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
94ff080c2a
commit
44649faa0f
@@ -41,6 +41,7 @@ ze_result_t RasHandleContext::rasGet(uint32_t *pCount,
|
||||
zes_ras_handle_t *phRas) {
|
||||
std::call_once(initRasOnce, [this]() {
|
||||
this->init(pOsSysman->getDeviceHandles());
|
||||
this->rasInitDone = true;
|
||||
});
|
||||
uint32_t handleListSize = static_cast<uint32_t>(handleList.size());
|
||||
uint32_t numToCopy = std::min(*pCount, handleListSize);
|
||||
|
||||
@@ -46,10 +46,14 @@ struct RasHandleContext {
|
||||
|
||||
OsSysman *pOsSysman = nullptr;
|
||||
std::vector<Ras *> handleList = {};
|
||||
bool isRasInitDone() {
|
||||
return rasInitDone;
|
||||
}
|
||||
|
||||
private:
|
||||
void createHandle(zes_ras_error_type_t type, ze_device_handle_t deviceHandle);
|
||||
std::once_flag initRasOnce;
|
||||
bool rasInitDone = false;
|
||||
};
|
||||
|
||||
} // namespace L0
|
||||
|
||||
Reference in New Issue
Block a user