mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
Remove platformDevices [2/n]
replace **platformDevices with *defaultHwInfo replace *platformDevices[0] with *defaultHwInfo Related-To: NEO-4499 Change-Id: If973ceb44ede2e940969f9c666f85d9a939fbff8 Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:

committed by
sys_ocldev

parent
5a1d8c0b6d
commit
7a2310163e
@ -362,7 +362,7 @@ TEST_F(DeviceGetCapsTest, givenGlobalMemSizeWhenCalculatingMaxAllocSizeThenAdjus
|
||||
|
||||
HardwareCapabilities hwCaps = {0};
|
||||
auto &hwHelper = HwHelper::get(platformDevices[0]->platform.eRenderCoreFamily);
|
||||
hwHelper.setupHardwareCapabilities(&hwCaps, *platformDevices[0]);
|
||||
hwHelper.setupHardwareCapabilities(&hwCaps, *defaultHwInfo);
|
||||
|
||||
uint64_t expectedSize = std::max((caps.globalMemSize / 2), static_cast<uint64_t>(128ULL * MemoryConstants::megaByte));
|
||||
expectedSize = std::min(expectedSize, hwCaps.maxMemAllocSize);
|
||||
@ -458,7 +458,7 @@ TEST_F(DeviceGetCapsTest, givenOpenCLVersion21WhenCapsAreCreatedThenDeviceReport
|
||||
TEST_F(DeviceGetCapsTest, givenSupportImagesWhenCapsAreCreatedThenDeviceReportsClIntelSpirvMediaBlockIoExtensions) {
|
||||
DebugManagerStateRestore dbgRestorer;
|
||||
DebugManager.flags.ForceOCLVersion.set(21);
|
||||
HardwareInfo hwInfo = *platformDevices[0];
|
||||
HardwareInfo hwInfo = *defaultHwInfo;
|
||||
hwInfo.capabilityTable.supportsImages = true;
|
||||
auto device = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(&hwInfo));
|
||||
const auto &caps = device->getDeviceInfo();
|
||||
@ -468,7 +468,7 @@ TEST_F(DeviceGetCapsTest, givenSupportImagesWhenCapsAreCreatedThenDeviceReportsC
|
||||
TEST_F(DeviceGetCapsTest, givenNotSupportImagesWhenCapsAreCreatedThenDeviceNotReportsClIntelSpirvMediaBlockIoExtensions) {
|
||||
DebugManagerStateRestore dbgRestorer;
|
||||
DebugManager.flags.ForceOCLVersion.set(21);
|
||||
HardwareInfo hwInfo = *platformDevices[0];
|
||||
HardwareInfo hwInfo = *defaultHwInfo;
|
||||
hwInfo.capabilityTable.supportsImages = false;
|
||||
auto device = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(&hwInfo));
|
||||
const auto &caps = device->getDeviceInfo();
|
||||
@ -476,7 +476,7 @@ TEST_F(DeviceGetCapsTest, givenNotSupportImagesWhenCapsAreCreatedThenDeviceNotRe
|
||||
}
|
||||
|
||||
TEST_F(DeviceGetCapsTest, givenSupportImagesWhenCapsAreCreatedThenDeviceReportsClKhr3dImageWritesExtensions) {
|
||||
HardwareInfo hwInfo = *platformDevices[0];
|
||||
HardwareInfo hwInfo = *defaultHwInfo;
|
||||
hwInfo.capabilityTable.supportsImages = true;
|
||||
auto device = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(&hwInfo));
|
||||
const auto &caps = device->getDeviceInfo();
|
||||
@ -485,7 +485,7 @@ TEST_F(DeviceGetCapsTest, givenSupportImagesWhenCapsAreCreatedThenDeviceReportsC
|
||||
}
|
||||
|
||||
TEST_F(DeviceGetCapsTest, givenNotSupportImagesWhenCapsAreCreatedThenDeviceNotReportsClKhr3dImageWritesExtensions) {
|
||||
HardwareInfo hwInfo = *platformDevices[0];
|
||||
HardwareInfo hwInfo = *defaultHwInfo;
|
||||
hwInfo.capabilityTable.supportsImages = false;
|
||||
auto device = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(&hwInfo));
|
||||
const auto &caps = device->getDeviceInfo();
|
||||
@ -533,7 +533,7 @@ TEST_F(DeviceGetCapsTest, givenSupportImagesWhenCapsAreCreatedThenDeviceReportsP
|
||||
DebugManagerStateRestore dbgRestorer;
|
||||
DebugManager.flags.EnablePackedYuv.set(true);
|
||||
DebugManager.flags.EnableNV12.set(true);
|
||||
HardwareInfo hwInfo = *platformDevices[0];
|
||||
HardwareInfo hwInfo = *defaultHwInfo;
|
||||
hwInfo.capabilityTable.supportsImages = true;
|
||||
auto device = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(&hwInfo));
|
||||
const auto &caps = device->getDeviceInfo();
|
||||
@ -545,7 +545,7 @@ TEST_F(DeviceGetCapsTest, givenNotSupportImagesWhenCapsAreCreatedThenDeviceNotRe
|
||||
DebugManagerStateRestore dbgRestorer;
|
||||
DebugManager.flags.EnablePackedYuv.set(true);
|
||||
DebugManager.flags.EnableNV12.set(true);
|
||||
HardwareInfo hwInfo = *platformDevices[0];
|
||||
HardwareInfo hwInfo = *defaultHwInfo;
|
||||
hwInfo.capabilityTable.supportsImages = false;
|
||||
auto device = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(&hwInfo));
|
||||
const auto &caps = device->getDeviceInfo();
|
||||
@ -576,7 +576,7 @@ TEST_F(DeviceGetCapsTest, givenEnablePackedYuvsetToFalseWhenCapsAreCreatedThenDe
|
||||
TEST_F(DeviceGetCapsTest, givenEnableVmeSetToTrueAndDeviceSupportsVmeWhenCapsAreCreatedThenDeviceReportsVmeExtensionAndBuiltins) {
|
||||
DebugManagerStateRestore dbgRestorer;
|
||||
DebugManager.flags.EnableIntelVme.set(1);
|
||||
auto hwInfo = *platformDevices[0];
|
||||
auto hwInfo = *defaultHwInfo;
|
||||
hwInfo.capabilityTable.supportsVme = true;
|
||||
auto device = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(&hwInfo));
|
||||
const auto &caps = device->getDeviceInfo();
|
||||
@ -591,7 +591,7 @@ TEST_F(DeviceGetCapsTest, givenEnableVmeSetToTrueAndDeviceSupportsVmeWhenCapsAre
|
||||
TEST_F(DeviceGetCapsTest, givenEnableVmeSetToTrueAndDeviceDoesNotSupportVmeWhenCapsAreCreatedThenDeviceReportsVmeExtensionAndBuiltins) {
|
||||
DebugManagerStateRestore dbgRestorer;
|
||||
DebugManager.flags.EnableIntelVme.set(1);
|
||||
auto hwInfo = *platformDevices[0];
|
||||
auto hwInfo = *defaultHwInfo;
|
||||
hwInfo.capabilityTable.supportsVme = false;
|
||||
auto device = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(&hwInfo));
|
||||
const auto &caps = device->getDeviceInfo();
|
||||
@ -606,7 +606,7 @@ TEST_F(DeviceGetCapsTest, givenEnableVmeSetToTrueAndDeviceDoesNotSupportVmeWhenC
|
||||
TEST_F(DeviceGetCapsTest, givenEnableVmeSetToFalseAndDeviceDoesNotSupportVmeWhenCapsAreCreatedThenDeviceDoesNotReportVmeExtensionAndBuiltins) {
|
||||
DebugManagerStateRestore dbgRestorer;
|
||||
DebugManager.flags.EnableIntelVme.set(0);
|
||||
auto hwInfo = *platformDevices[0];
|
||||
auto hwInfo = *defaultHwInfo;
|
||||
hwInfo.capabilityTable.supportsVme = false;
|
||||
auto device = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(&hwInfo));
|
||||
const auto &caps = device->getDeviceInfo();
|
||||
@ -621,7 +621,7 @@ TEST_F(DeviceGetCapsTest, givenEnableVmeSetToFalseAndDeviceDoesNotSupportVmeWhen
|
||||
TEST_F(DeviceGetCapsTest, givenEnableVmeSetToFalseAndDeviceSupportsVmeWhenCapsAreCreatedThenDeviceDoesNotReportVmeExtensionAndBuiltins) {
|
||||
DebugManagerStateRestore dbgRestorer;
|
||||
DebugManager.flags.EnableIntelVme.set(0);
|
||||
auto hwInfo = *platformDevices[0];
|
||||
auto hwInfo = *defaultHwInfo;
|
||||
hwInfo.capabilityTable.supportsVme = true;
|
||||
auto device = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(&hwInfo));
|
||||
const auto &caps = device->getDeviceInfo();
|
||||
@ -636,7 +636,7 @@ TEST_F(DeviceGetCapsTest, givenEnableVmeSetToFalseAndDeviceSupportsVmeWhenCapsAr
|
||||
TEST_F(DeviceGetCapsTest, givenEnableAdvancedVmeSetToTrueAndDeviceSupportsVmeWhenCapsAreCreatedThenDeviceReportsAdvancedVmeExtensionAndBuiltins) {
|
||||
DebugManagerStateRestore dbgRestorer;
|
||||
DebugManager.flags.EnableIntelAdvancedVme.set(1);
|
||||
auto hwInfo = *platformDevices[0];
|
||||
auto hwInfo = *defaultHwInfo;
|
||||
hwInfo.capabilityTable.supportsVme = true;
|
||||
auto device = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(&hwInfo));
|
||||
const auto &caps = device->getDeviceInfo();
|
||||
@ -648,7 +648,7 @@ TEST_F(DeviceGetCapsTest, givenEnableAdvancedVmeSetToTrueAndDeviceSupportsVmeWhe
|
||||
}
|
||||
|
||||
TEST_F(DeviceGetCapsTest, givenDeviceCapsSupportFor64BitAtomicsFollowsHardwareCapabilities) {
|
||||
auto hwInfo = *platformDevices[0];
|
||||
auto hwInfo = *defaultHwInfo;
|
||||
auto device = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(&hwInfo));
|
||||
const auto &caps = device->getDeviceInfo();
|
||||
|
||||
@ -664,7 +664,7 @@ TEST_F(DeviceGetCapsTest, givenDeviceCapsSupportFor64BitAtomicsFollowsHardwareCa
|
||||
TEST_F(DeviceGetCapsTest, givenEnableAdvancedVmeSetToTrueAndDeviceDoesNotSupportVmeWhenCapsAreCreatedThenDeviceReportAdvancedVmeExtensionAndBuiltins) {
|
||||
DebugManagerStateRestore dbgRestorer;
|
||||
DebugManager.flags.EnableIntelAdvancedVme.set(1);
|
||||
auto hwInfo = *platformDevices[0];
|
||||
auto hwInfo = *defaultHwInfo;
|
||||
hwInfo.capabilityTable.supportsVme = false;
|
||||
auto device = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(&hwInfo));
|
||||
const auto &caps = device->getDeviceInfo();
|
||||
@ -678,7 +678,7 @@ TEST_F(DeviceGetCapsTest, givenEnableAdvancedVmeSetToTrueAndDeviceDoesNotSupport
|
||||
TEST_F(DeviceGetCapsTest, givenEnableAdvancedVmeSetToFalseAndDeviceDoesNotSupportVmeWhenCapsAreCreatedThenDeviceDoesNotReportAdvancedVmeExtensionAndBuiltins) {
|
||||
DebugManagerStateRestore dbgRestorer;
|
||||
DebugManager.flags.EnableIntelAdvancedVme.set(0);
|
||||
auto hwInfo = *platformDevices[0];
|
||||
auto hwInfo = *defaultHwInfo;
|
||||
hwInfo.capabilityTable.supportsVme = false;
|
||||
auto device = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(&hwInfo));
|
||||
const auto &caps = device->getDeviceInfo();
|
||||
@ -692,7 +692,7 @@ TEST_F(DeviceGetCapsTest, givenEnableAdvancedVmeSetToFalseAndDeviceDoesNotSuppor
|
||||
TEST_F(DeviceGetCapsTest, givenEnableAdvancedVmeSetToFalseAndDeviceSupportsVmeWhenCapsAreCreatedThenDeviceDoesNotReportAdvancedVmeExtensionAndBuiltins) {
|
||||
DebugManagerStateRestore dbgRestorer;
|
||||
DebugManager.flags.EnableIntelAdvancedVme.set(0);
|
||||
auto hwInfo = *platformDevices[0];
|
||||
auto hwInfo = *defaultHwInfo;
|
||||
hwInfo.capabilityTable.supportsVme = true;
|
||||
auto device = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(&hwInfo));
|
||||
const auto &caps = device->getDeviceInfo();
|
||||
@ -763,7 +763,7 @@ TEST_F(DeviceGetCapsTest, givenAtleastOCL2DeviceThenExposesMipMapAndUnifiedMemor
|
||||
TEST_F(DeviceGetCapsTest, givenSupportImagesWhenCapsAreCreatedThenDeviceReportsMinMapExtensions) {
|
||||
DebugManagerStateRestore dbgRestorer;
|
||||
DebugManager.flags.ForceOCLVersion.set(20);
|
||||
HardwareInfo hwInfo = *platformDevices[0];
|
||||
HardwareInfo hwInfo = *defaultHwInfo;
|
||||
hwInfo.capabilityTable.supportsImages = true;
|
||||
auto device = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(&hwInfo));
|
||||
const auto &caps = device->getDeviceInfo();
|
||||
@ -774,7 +774,7 @@ TEST_F(DeviceGetCapsTest, givenSupportImagesWhenCapsAreCreatedThenDeviceReportsM
|
||||
TEST_F(DeviceGetCapsTest, givenNotSupportImagesWhenCapsAreCreatedThenDeviceNotReportsMinMapExtensions) {
|
||||
DebugManagerStateRestore dbgRestorer;
|
||||
DebugManager.flags.ForceOCLVersion.set(20);
|
||||
HardwareInfo hwInfo = *platformDevices[0];
|
||||
HardwareInfo hwInfo = *defaultHwInfo;
|
||||
hwInfo.capabilityTable.supportsImages = false;
|
||||
auto device = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(&hwInfo));
|
||||
const auto &caps = device->getDeviceInfo();
|
||||
@ -797,7 +797,7 @@ TEST_F(DeviceGetCapsTest, givenOCL12DeviceThenDoesNotExposesMipMapAndUnifiedMemo
|
||||
TEST_F(DeviceGetCapsTest, givenSupporteImagesWhenCreateExtentionsListThenDeviceReportsImagesExtensions) {
|
||||
DebugManagerStateRestore dbgRestorer;
|
||||
DebugManager.flags.ForceOCLVersion.set(20);
|
||||
HardwareInfo hwInfo = *platformDevices[0];
|
||||
HardwareInfo hwInfo = *defaultHwInfo;
|
||||
hwInfo.capabilityTable.supportsImages = true;
|
||||
auto device = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(&hwInfo));
|
||||
const auto extensions = device->getDeviceInfo().deviceExtensions;
|
||||
@ -810,7 +810,7 @@ TEST_F(DeviceGetCapsTest, givenSupporteImagesWhenCreateExtentionsListThenDeviceR
|
||||
TEST_F(DeviceGetCapsTest, givenNotSupporteImagesWhenCreateExtentionsListThenDeviceNotReportsImagesExtensions) {
|
||||
DebugManagerStateRestore dbgRestorer;
|
||||
DebugManager.flags.ForceOCLVersion.set(20);
|
||||
HardwareInfo hwInfo = *platformDevices[0];
|
||||
HardwareInfo hwInfo = *defaultHwInfo;
|
||||
hwInfo.capabilityTable.supportsImages = false;
|
||||
auto device = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(&hwInfo));
|
||||
const auto extensions = device->getDeviceInfo().deviceExtensions;
|
||||
@ -821,7 +821,7 @@ TEST_F(DeviceGetCapsTest, givenNotSupporteImagesWhenCreateExtentionsListThenDevi
|
||||
}
|
||||
|
||||
TEST_F(DeviceGetCapsTest, givenDeviceThatDoesntHaveFp64ThenExtensionIsNotReported) {
|
||||
HardwareInfo nonFp64Device = *platformDevices[0];
|
||||
HardwareInfo nonFp64Device = *defaultHwInfo;
|
||||
nonFp64Device.capabilityTable.ftrSupportsFP64 = false;
|
||||
auto device = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(&nonFp64Device));
|
||||
|
||||
@ -836,7 +836,7 @@ TEST_F(DeviceGetCapsTest, givenDeviceWhenGettingHostUnifiedMemoryCapThenItDepend
|
||||
const auto &caps = device->getDeviceInfo();
|
||||
|
||||
auto &hwHelper = HwHelper::get(platformDevices[0]->platform.eRenderCoreFamily);
|
||||
auto localMemoryEnabled = hwHelper.isLocalMemoryEnabled(*platformDevices[0]);
|
||||
auto localMemoryEnabled = hwHelper.isLocalMemoryEnabled(*defaultHwInfo);
|
||||
|
||||
EXPECT_EQ((localMemoryEnabled == false), caps.hostUnifiedMemory);
|
||||
}
|
||||
@ -844,7 +844,7 @@ TEST_F(DeviceGetCapsTest, givenDeviceWhenGettingHostUnifiedMemoryCapThenItDepend
|
||||
TEST(DeviceGetCaps, givenDeviceThatDoesntHaveFp64WhenDbgFlagEnablesFp64ThenReportFp64Flags) {
|
||||
DebugManagerStateRestore dbgRestorer;
|
||||
DebugManager.flags.OverrideDefaultFP64Settings.set(1);
|
||||
HardwareInfo nonFp64Device = *platformDevices[0];
|
||||
HardwareInfo nonFp64Device = *defaultHwInfo;
|
||||
nonFp64Device.capabilityTable.ftrSupportsFP64 = false;
|
||||
nonFp64Device.capabilityTable.ftrSupports64BitMath = false;
|
||||
auto device = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(&nonFp64Device));
|
||||
@ -861,7 +861,7 @@ TEST(DeviceGetCaps, givenDeviceThatDoesntHaveFp64WhenDbgFlagEnablesFp64ThenRepor
|
||||
TEST(DeviceGetCaps, givenDeviceThatDoesHaveFp64WhenDbgFlagDisablesFp64ThenDontReportFp64Flags) {
|
||||
DebugManagerStateRestore dbgRestorer;
|
||||
DebugManager.flags.OverrideDefaultFP64Settings.set(0);
|
||||
HardwareInfo fp64Device = *platformDevices[0];
|
||||
HardwareInfo fp64Device = *defaultHwInfo;
|
||||
fp64Device.capabilityTable.ftrSupportsFP64 = true;
|
||||
fp64Device.capabilityTable.ftrSupports64BitMath = true;
|
||||
auto device = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(&fp64Device));
|
||||
@ -898,7 +898,7 @@ TEST(DeviceGetCaps, givenOclVersion21WhenCapsAreCreatedThenDeviceReportsSpirvAsS
|
||||
}
|
||||
|
||||
TEST(DeviceGetCaps, givenDisabledFtrPooledEuWhenCalculatingMaxEuPerSSThenIgnoreEuCountPerPoolMin) {
|
||||
HardwareInfo myHwInfo = *platformDevices[0];
|
||||
HardwareInfo myHwInfo = *defaultHwInfo;
|
||||
GT_SYSTEM_INFO &mySysInfo = myHwInfo.gtSystemInfo;
|
||||
FeatureTable &mySkuTable = myHwInfo.featureTable;
|
||||
|
||||
@ -916,7 +916,7 @@ TEST(DeviceGetCaps, givenDisabledFtrPooledEuWhenCalculatingMaxEuPerSSThenIgnoreE
|
||||
}
|
||||
|
||||
HWTEST_F(DeviceGetCapsTest, givenEnabledFtrPooledEuWhenCalculatingMaxEuPerSSThenDontIgnoreEuCountPerPoolMin) {
|
||||
HardwareInfo myHwInfo = *platformDevices[0];
|
||||
HardwareInfo myHwInfo = *defaultHwInfo;
|
||||
GT_SYSTEM_INFO &mySysInfo = myHwInfo.gtSystemInfo;
|
||||
FeatureTable &mySkuTable = myHwInfo.featureTable;
|
||||
|
||||
@ -936,7 +936,7 @@ TEST(DeviceGetCaps, givenDebugFlagToUseMaxSimdSizeForWkgCalculationWhenDeviceCap
|
||||
DebugManagerStateRestore dbgRestorer;
|
||||
DebugManager.flags.UseMaxSimdSizeToDeduceMaxWorkgroupSize.set(true);
|
||||
|
||||
HardwareInfo myHwInfo = *platformDevices[0];
|
||||
HardwareInfo myHwInfo = *defaultHwInfo;
|
||||
GT_SYSTEM_INFO &mySysInfo = myHwInfo.gtSystemInfo;
|
||||
|
||||
mySysInfo.EUCount = 24;
|
||||
@ -952,7 +952,7 @@ TEST(DeviceGetCaps, givenDebugFlagToUseCertainWorkgroupSizeWhenDeviceIsCreatedIt
|
||||
DebugManagerStateRestore dbgRestorer;
|
||||
DebugManager.flags.OverrideMaxWorkgroupSize.set(16u);
|
||||
|
||||
HardwareInfo myHwInfo = *platformDevices[0];
|
||||
HardwareInfo myHwInfo = *defaultHwInfo;
|
||||
GT_SYSTEM_INFO &mySysInfo = myHwInfo.gtSystemInfo;
|
||||
|
||||
mySysInfo.EUCount = 24;
|
||||
@ -964,7 +964,7 @@ TEST(DeviceGetCaps, givenDebugFlagToUseCertainWorkgroupSizeWhenDeviceIsCreatedIt
|
||||
}
|
||||
|
||||
HWTEST_F(DeviceGetCapsTest, givenDeviceThatHasHighNumberOfExecutionUnitsWhenMaxWorkgroupSizeIsComputedItIsLimitedTo1024) {
|
||||
HardwareInfo myHwInfo = *platformDevices[0];
|
||||
HardwareInfo myHwInfo = *defaultHwInfo;
|
||||
GT_SYSTEM_INFO &mySysInfo = myHwInfo.gtSystemInfo;
|
||||
auto &hwHelper = HwHelper::get(myHwInfo.platform.eRenderCoreFamily);
|
||||
|
||||
@ -1091,7 +1091,7 @@ TEST_F(DeviceGetCapsTest, givenDeviceWithNullSourceLevelDebuggerWhenCapsAreIniti
|
||||
}
|
||||
|
||||
TEST(Device_UseCaps, givenCapabilityTableWhenDeviceInitializeCapsThenVmeVersionsAreSetProperly) {
|
||||
HardwareInfo hwInfo = *platformDevices[0];
|
||||
HardwareInfo hwInfo = *defaultHwInfo;
|
||||
|
||||
cl_uint expectedVmeVersion = CL_ME_VERSION_ADVANCED_VER_2_INTEL;
|
||||
cl_uint expectedVmeAvcVersion = CL_AVC_ME_VERSION_1_INTEL;
|
||||
|
@ -55,7 +55,7 @@ TEST_F(DeviceTest, givenDeviceWhenEngineIsCreatedThenSetInitialValueForTag) {
|
||||
}
|
||||
|
||||
TEST_F(DeviceTest, givenDeviceWhenAskedForSpecificEngineThenRetrunIt) {
|
||||
auto &engines = HwHelper::get(platformDevices[0]->platform.eRenderCoreFamily).getGpgpuEngineInstances(*platformDevices[0]);
|
||||
auto &engines = HwHelper::get(platformDevices[0]->platform.eRenderCoreFamily).getGpgpuEngineInstances(*defaultHwInfo);
|
||||
for (uint32_t i = 0; i < engines.size(); i++) {
|
||||
bool lowPriority = (HwHelper::lowPriorityGpgpuEngineIndex == i);
|
||||
auto &deviceEngine = pDevice->getEngine(engines[i], lowPriority);
|
||||
@ -69,7 +69,7 @@ TEST_F(DeviceTest, givenDeviceWhenAskedForSpecificEngineThenRetrunIt) {
|
||||
TEST_F(DeviceTest, givenDebugVariableToAlwaysChooseEngineZeroWhenNotExistingEngineSelectedThenIndexZeroEngineIsReturned) {
|
||||
DebugManagerStateRestore restore;
|
||||
DebugManager.flags.OverrideInvalidEngineWithDefault.set(true);
|
||||
auto &engines = HwHelper::get(platformDevices[0]->platform.eRenderCoreFamily).getGpgpuEngineInstances(*platformDevices[0]);
|
||||
auto &engines = HwHelper::get(platformDevices[0]->platform.eRenderCoreFamily).getGpgpuEngineInstances(*defaultHwInfo);
|
||||
auto &deviceEngine = pDevice->getEngine(engines[0], false);
|
||||
auto ¬ExistingEngine = pDevice->getEngine(aub_stream::ENGINE_VCS, false);
|
||||
EXPECT_EQ(¬ExistingEngine, &deviceEngine);
|
||||
@ -108,7 +108,7 @@ TEST_F(DeviceTest, WhenRetainingThenReferenceIsOneAndApiIsUsed) {
|
||||
}
|
||||
|
||||
HWTEST_F(DeviceTest, WhenDeviceIsCreatedThenActualEngineTypeIsSameAsDefault) {
|
||||
HardwareInfo hwInfo = *platformDevices[0];
|
||||
HardwareInfo hwInfo = *defaultHwInfo;
|
||||
if (hwInfo.capabilityTable.defaultEngineType == aub_stream::EngineType::ENGINE_CCS) {
|
||||
hwInfo.featureTable.ftrCCSNode = true;
|
||||
}
|
||||
@ -195,7 +195,7 @@ TEST(DeviceCreation, givenMultiRootDeviceWhenTheyAreCreatedThenEachOsContextHasU
|
||||
for (auto i = 0u; i < numDevices; i++) {
|
||||
executionEnvironment->rootDeviceEnvironments[i]->setHwInfo(*platformDevices);
|
||||
}
|
||||
auto hwInfo = *platformDevices[0];
|
||||
auto hwInfo = *defaultHwInfo;
|
||||
const auto &numGpgpuEngines = static_cast<uint32_t>(HwHelper::get(hwInfo.platform.eRenderCoreFamily).getGpgpuEngineInstances(hwInfo).size());
|
||||
|
||||
auto device1 = std::unique_ptr<MockDevice>(Device::create<MockDevice>(executionEnvironment, 0u));
|
||||
@ -239,7 +239,7 @@ TEST(DeviceCreation, givenMultiRootDeviceWhenTheyAreCreatedThenEachDeviceHasSepe
|
||||
for (auto i = 0u; i < executionEnvironment->rootDeviceEnvironments.size(); i++) {
|
||||
executionEnvironment->rootDeviceEnvironments[i]->setHwInfo(*platformDevices);
|
||||
}
|
||||
auto hwInfo = *platformDevices[0];
|
||||
auto hwInfo = *defaultHwInfo;
|
||||
const auto &numGpgpuEngines = HwHelper::get(hwInfo.platform.eRenderCoreFamily).getGpgpuEngineInstances(hwInfo).size();
|
||||
auto device1 = std::unique_ptr<MockDevice>(Device::create<MockDevice>(executionEnvironment, 0u));
|
||||
auto device2 = std::unique_ptr<MockDevice>(Device::create<MockDevice>(executionEnvironment, 1u));
|
||||
@ -266,7 +266,7 @@ HWTEST_F(DeviceTest, givenDeviceWhenAskingForDefaultEngineThenReturnValidValue)
|
||||
}
|
||||
|
||||
TEST(DeviceCreation, givenFtrSimulationModeFlagTrueWhenNoOtherSimulationFlagsArePresentThenIsSimulationReturnsTrue) {
|
||||
HardwareInfo hwInfo = *platformDevices[0];
|
||||
HardwareInfo hwInfo = *defaultHwInfo;
|
||||
hwInfo.featureTable.ftrSimulationMode = true;
|
||||
|
||||
bool simulationFromDeviceId = hwInfo.capabilityTable.isSimulation(hwInfo.platform.usDeviceID);
|
||||
@ -284,7 +284,7 @@ TEST(DeviceCreation, givenDeviceWhenCheckingEnginesCountThenNumberGreaterThanZer
|
||||
using DeviceHwTest = ::testing::Test;
|
||||
|
||||
HWTEST_F(DeviceHwTest, givenHwHelperInputWhenInitializingCsrThenCreatePageTableManagerIfNeeded) {
|
||||
HardwareInfo localHwInfo = *platformDevices[0];
|
||||
HardwareInfo localHwInfo = *defaultHwInfo;
|
||||
localHwInfo.capabilityTable.ftrRenderCompressedBuffers = false;
|
||||
localHwInfo.capabilityTable.ftrRenderCompressedImages = false;
|
||||
|
||||
|
@ -171,7 +171,7 @@ TEST(SubDevicesTest, givenSubDevicesWhenGettingDeviceByIdZeroThenGetThisSubDevic
|
||||
}
|
||||
|
||||
TEST(RootDevicesTest, givenRootDeviceWithoutSubdevicesWhenCreateEnginesThenDeviceCreatesCorrectNumberOfEngines) {
|
||||
auto hwInfo = *platformDevices[0];
|
||||
auto hwInfo = *defaultHwInfo;
|
||||
auto &gpgpuEngines = HwHelper::get(hwInfo.platform.eRenderCoreFamily).getGpgpuEngineInstances(hwInfo);
|
||||
|
||||
auto executionEnvironment = new MockExecutionEnvironment;
|
||||
|
Reference in New Issue
Block a user