mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 23:03:02 +08:00
Defer Sysman Scheduler and Memory Initialization
With this change, init for sysman Scheduler/Memory API would not be done during zeInit. init and thereby Scheduler/Memory API handle creation would be done only when user explicitly requests to enumerate handles using zesDeviceEnumSchedulers/zesDeviceEnumMemory. 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
4967e053b8
commit
1898a82317
@@ -46,7 +46,7 @@ class SysmanDeviceMemoryFixture : public SysmanDeviceFixture {
|
||||
deviceHandles.resize(subDeviceCount, nullptr);
|
||||
Device::fromHandle(device->toHandle())->getSubDevices(&subDeviceCount, deviceHandles.data());
|
||||
}
|
||||
pSysmanDeviceImp->pMemoryHandleContext->init(deviceHandles);
|
||||
getMemoryHandles(0);
|
||||
}
|
||||
|
||||
void TearDown() override {
|
||||
|
||||
@@ -58,7 +58,7 @@ class SysmanDeviceMemoryFixture : public SysmanDeviceFixture {
|
||||
deviceHandles.resize(subDeviceCount, nullptr);
|
||||
Device::fromHandle(device->toHandle())->getSubDevices(&subDeviceCount, deviceHandles.data());
|
||||
}
|
||||
pSysmanDeviceImp->pMemoryHandleContext->init(deviceHandles);
|
||||
getMemoryHandles(0);
|
||||
}
|
||||
|
||||
void TearDown() override {
|
||||
|
||||
@@ -56,7 +56,7 @@ class SysmanDeviceMemoryFixture : public SysmanDeviceFixture {
|
||||
deviceHandles.resize(subDeviceCount, nullptr);
|
||||
Device::fromHandle(device->toHandle())->getSubDevices(&subDeviceCount, deviceHandles.data());
|
||||
}
|
||||
pSysmanDeviceImp->pMemoryHandleContext->init(deviceHandles);
|
||||
getMemoryHandles(0);
|
||||
}
|
||||
|
||||
void TearDown() override {
|
||||
|
||||
@@ -43,6 +43,11 @@ TEST_F(SysmanDevicePowerFixture, GivenComponentCountZeroWhenEnumeratingPowerDoma
|
||||
EXPECT_EQ(zesDeviceEnumPowerDomains(device->toHandle(), &count, nullptr), ZE_RESULT_SUCCESS);
|
||||
EXPECT_EQ(count, powerHandleComponentCount);
|
||||
}
|
||||
TEST_F(SysmanDeviceFixture, GivenComponentCountZeroWhenEnumeratingPowerDomainsWhenhwmonInterfaceDoesNotExistThenZeroCountIsReturnedAndVerifySysmanPowerGetCallSucceeds) {
|
||||
uint32_t count = 0;
|
||||
EXPECT_EQ(zesDeviceEnumPowerDomains(device->toHandle(), &count, nullptr), ZE_RESULT_SUCCESS);
|
||||
EXPECT_EQ(count, 0u);
|
||||
}
|
||||
|
||||
TEST_F(SysmanDevicePowerFixture, GivenInvalidComponentCountWhenEnumeratingPowerDomainsWhenhwmonInterfaceExistsThenValidCountIsReturnedAndVerifySysmanPowerGetCallSucceeds) {
|
||||
uint32_t count = 0;
|
||||
|
||||
@@ -84,7 +84,7 @@ class SysmanDeviceSchedulerFixture : public SysmanDeviceFixture {
|
||||
deviceHandles.resize(subDeviceCount, nullptr);
|
||||
Device::fromHandle(device->toHandle())->getSubDevices(&subDeviceCount, deviceHandles.data());
|
||||
}
|
||||
pSysmanDeviceImp->pSchedulerHandleContext->init(deviceHandles);
|
||||
getSchedHandles(0);
|
||||
}
|
||||
|
||||
void TearDown() override {
|
||||
|
||||
Reference in New Issue
Block a user