mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-29 09:03:14 +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
@@ -47,6 +47,10 @@ void EngineHandleContext::releaseEngines() {
|
||||
}
|
||||
|
||||
ze_result_t EngineHandleContext::engineGet(uint32_t *pCount, zes_engine_handle_t *phEngine) {
|
||||
std::call_once(initEngineOnce, [this]() {
|
||||
this->init();
|
||||
this->engineInitDone = true;
|
||||
});
|
||||
uint32_t handleListSize = static_cast<uint32_t>(handleList.size());
|
||||
uint32_t numToCopy = std::min(*pCount, handleListSize);
|
||||
if (0 == *pCount || *pCount > handleListSize) {
|
||||
|
||||
Reference in New Issue
Block a user