mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
Revert "Defer Sysman Scheduler and Memory Module Initialization"
This reverts commit e1748ad436
.
Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
This commit is contained in:

committed by
Compute-Runtime-Automation

parent
f9888db0fb
commit
56a264a33d
@ -10,7 +10,6 @@
|
||||
|
||||
#include "level_zero/core/source/device/device.h"
|
||||
#include "level_zero/tools/source/sysman/memory/memory_imp.h"
|
||||
#include "level_zero/tools/source/sysman/os_sysman.h"
|
||||
|
||||
namespace L0 {
|
||||
|
||||
@ -37,9 +36,6 @@ ze_result_t MemoryHandleContext::init(std::vector<ze_device_handle_t> &deviceHan
|
||||
}
|
||||
|
||||
ze_result_t MemoryHandleContext::memoryGet(uint32_t *pCount, zes_mem_handle_t *phMemory) {
|
||||
std::call_once(initMemoryOnce, [this]() {
|
||||
this->init(pOsSysman->getDeviceHandles());
|
||||
});
|
||||
uint32_t handleListSize = static_cast<uint32_t>(handleList.size());
|
||||
uint32_t numToCopy = std::min(*pCount, handleListSize);
|
||||
if (0 == *pCount || *pCount > handleListSize) {
|
||||
|
@ -9,7 +9,6 @@
|
||||
#include "level_zero/core/source/device/device.h"
|
||||
#include <level_zero/zes_api.h>
|
||||
|
||||
#include <mutex>
|
||||
#include <vector>
|
||||
|
||||
struct _zes_mem_handle_t {
|
||||
@ -47,7 +46,6 @@ struct MemoryHandleContext {
|
||||
|
||||
private:
|
||||
void createHandle(ze_device_handle_t deviceHandle);
|
||||
std::once_flag initMemoryOnce;
|
||||
};
|
||||
|
||||
} // namespace L0
|
||||
|
@ -8,7 +8,6 @@
|
||||
#include "shared/source/helpers/basic_math.h"
|
||||
#include "shared/source/helpers/debug_helpers.h"
|
||||
|
||||
#include "level_zero/tools/source/sysman/os_sysman.h"
|
||||
#include "level_zero/tools/source/sysman/scheduler/scheduler_imp.h"
|
||||
|
||||
class OsScheduler;
|
||||
@ -40,9 +39,6 @@ void SchedulerHandleContext::init(std::vector<ze_device_handle_t> &deviceHandles
|
||||
}
|
||||
|
||||
ze_result_t SchedulerHandleContext::schedulerGet(uint32_t *pCount, zes_sched_handle_t *phScheduler) {
|
||||
std::call_once(initSchedulerOnce, [this]() {
|
||||
this->init(pOsSysman->getDeviceHandles());
|
||||
});
|
||||
uint32_t handleListSize = static_cast<uint32_t>(handleList.size());
|
||||
uint32_t numToCopy = std::min(*pCount, handleListSize);
|
||||
if (0 == *pCount || *pCount > handleListSize) {
|
||||
|
@ -12,7 +12,6 @@
|
||||
#include <level_zero/zes_api.h>
|
||||
|
||||
#include <map>
|
||||
#include <mutex>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
@ -52,7 +51,6 @@ struct SchedulerHandleContext : NEO::NonCopyableOrMovableClass {
|
||||
|
||||
private:
|
||||
void createHandle(zes_engine_type_flag_t engineType, std::vector<std::string> &listOfEngines, ze_device_handle_t deviceHandle);
|
||||
std::once_flag initSchedulerOnce;
|
||||
};
|
||||
|
||||
} // namespace L0
|
||||
|
@ -109,6 +109,12 @@ ze_result_t SysmanDeviceImp::init() {
|
||||
if (pEngineHandleContext) {
|
||||
pEngineHandleContext->init();
|
||||
}
|
||||
if (pSchedulerHandleContext) {
|
||||
pSchedulerHandleContext->init(deviceHandles);
|
||||
}
|
||||
if (pMemoryHandleContext) {
|
||||
pMemoryHandleContext->init(deviceHandles);
|
||||
}
|
||||
if (pGlobalOperations) {
|
||||
pGlobalOperations->init();
|
||||
}
|
||||
|
@ -46,7 +46,7 @@ class SysmanDeviceMemoryFixture : public SysmanDeviceFixture {
|
||||
deviceHandles.resize(subDeviceCount, nullptr);
|
||||
Device::fromHandle(device->toHandle())->getSubDevices(&subDeviceCount, deviceHandles.data());
|
||||
}
|
||||
getMemoryHandles(0);
|
||||
pSysmanDeviceImp->pMemoryHandleContext->init(deviceHandles);
|
||||
}
|
||||
|
||||
void TearDown() override {
|
||||
|
@ -58,7 +58,7 @@ class SysmanDeviceMemoryFixture : public SysmanDeviceFixture {
|
||||
deviceHandles.resize(subDeviceCount, nullptr);
|
||||
Device::fromHandle(device->toHandle())->getSubDevices(&subDeviceCount, deviceHandles.data());
|
||||
}
|
||||
getMemoryHandles(0);
|
||||
pSysmanDeviceImp->pMemoryHandleContext->init(deviceHandles);
|
||||
}
|
||||
|
||||
void TearDown() override {
|
||||
|
@ -56,7 +56,7 @@ class SysmanDeviceMemoryFixture : public SysmanDeviceFixture {
|
||||
deviceHandles.resize(subDeviceCount, nullptr);
|
||||
Device::fromHandle(device->toHandle())->getSubDevices(&subDeviceCount, deviceHandles.data());
|
||||
}
|
||||
getMemoryHandles(0);
|
||||
pSysmanDeviceImp->pMemoryHandleContext->init(deviceHandles);
|
||||
}
|
||||
|
||||
void TearDown() override {
|
||||
|
@ -84,7 +84,7 @@ class SysmanDeviceSchedulerFixture : public SysmanDeviceFixture {
|
||||
deviceHandles.resize(subDeviceCount, nullptr);
|
||||
Device::fromHandle(device->toHandle())->getSubDevices(&subDeviceCount, deviceHandles.data());
|
||||
}
|
||||
getSchedHandles(0);
|
||||
pSysmanDeviceImp->pSchedulerHandleContext->init(deviceHandles);
|
||||
}
|
||||
|
||||
void TearDown() override {
|
||||
|
Reference in New Issue
Block a user