mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 14:55:24 +08:00
Defer Sysman Standby Module Initialization
With this change, init for sysman Standby API would not be done during zeInit. Rather init and thereby Standby API handle creation would be done only when user explicitly requests to enumerate handles using zesDeviceEnumStandbyDomains. 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
e1748ad436
commit
aadf424476
@@ -51,7 +51,6 @@ class ZesStandbyFixture : public SysmanDeviceFixture {
|
||||
deviceHandles.resize(subDeviceCount, nullptr);
|
||||
Device::fromHandle(device->toHandle())->getSubDevices(&subDeviceCount, deviceHandles.data());
|
||||
}
|
||||
pSysmanDeviceImp->pStandbyHandleContext->init(deviceHandles);
|
||||
}
|
||||
void TearDown() override {
|
||||
if (!sysmanUltsEnable) {
|
||||
@@ -68,6 +67,13 @@ class ZesStandbyFixture : public SysmanDeviceFixture {
|
||||
}
|
||||
};
|
||||
|
||||
TEST_F(ZesStandbyFixture, GivenStandbyModeFilesNotAvailableWhenCallingEnumerateThenSuccessResultAndZeroCountIsReturned) {
|
||||
uint32_t count = 0;
|
||||
ptestSysfsAccess->isStandbyModeFileAvailable = false;
|
||||
ze_result_t result = zesDeviceEnumStandbyDomains(device, &count, nullptr);
|
||||
EXPECT_EQ(ZE_RESULT_SUCCESS, result);
|
||||
EXPECT_EQ(count, 0u);
|
||||
}
|
||||
TEST_F(ZesStandbyFixture, GivenComponentCountZeroWhenCallingzesStandbyGetThenNonZeroCountIsReturnedAndVerifyzesStandbyGetCallSucceeds) {
|
||||
std::vector<zes_standby_handle_t> standbyHandle = {};
|
||||
uint32_t count = 0;
|
||||
@@ -326,7 +332,6 @@ class ZesStandbyMultiDeviceFixture : public SysmanMultiDeviceFixture {
|
||||
deviceHandles.resize(subDeviceCount, nullptr);
|
||||
Device::fromHandle(device->toHandle())->getSubDevices(&subDeviceCount, deviceHandles.data());
|
||||
}
|
||||
pSysmanDeviceImp->pStandbyHandleContext->init(deviceHandles);
|
||||
}
|
||||
void TearDown() override {
|
||||
if (!sysmanUltsEnable) {
|
||||
|
||||
Reference in New Issue
Block a user