mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-08 14:02:58 +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
@@ -23,7 +23,7 @@
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
extern const HardwareInfo **platformDevices;
|
||||
extern const HardwareInfo *defaultHwInfo;
|
||||
|
||||
struct TestParam {
|
||||
cl_uint globalWorkSizeX;
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace NEO {
|
||||
class AUBFixture : public CommandQueueHwFixture {
|
||||
public:
|
||||
void SetUp(const HardwareInfo *hardwareInfo) {
|
||||
const HardwareInfo &hwInfo = hardwareInfo ? *hardwareInfo : *platformDevices[0];
|
||||
const HardwareInfo &hwInfo = hardwareInfo ? *hardwareInfo : *defaultHwInfo;
|
||||
uint32_t deviceIndex = 0;
|
||||
|
||||
auto &hwHelper = HwHelper::get(hwInfo.platform.eRenderCoreFamily);
|
||||
|
||||
@@ -212,7 +212,7 @@ TEST(CommandQueue, givenDeviceWhenCreatingCommandQueueThenPickCsrFromDefaultEngi
|
||||
}
|
||||
|
||||
TEST(CommandQueue, givenDeviceNotSupportingBlitOperationsWhenQueueIsCreatedThenDontRegisterBcsCsr) {
|
||||
HardwareInfo hwInfo = *platformDevices[0];
|
||||
HardwareInfo hwInfo = *defaultHwInfo;
|
||||
hwInfo.capabilityTable.blitterOperationsSupported = false;
|
||||
auto mockDevice = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(&hwInfo));
|
||||
MockCommandQueue cmdQ(nullptr, mockDevice.get(), 0);
|
||||
@@ -226,7 +226,7 @@ HWTEST_F(CommandQueueWithSubDevicesTest, givenDeviceWithSubDevicesSupportingBlit
|
||||
VariableBackup<bool> mockDeviceFlagBackup{&MockDevice::createSingleDevice, false};
|
||||
DebugManager.flags.CreateMultipleSubDevices.set(2);
|
||||
DebugManager.flags.EnableBlitterOperationsForReadWriteBuffers.set(1);
|
||||
HardwareInfo hwInfo = *platformDevices[0];
|
||||
HardwareInfo hwInfo = *defaultHwInfo;
|
||||
bool createBcsEngine = !hwInfo.capabilityTable.blitterOperationsSupported;
|
||||
hwInfo.capabilityTable.blitterOperationsSupported = true;
|
||||
auto device = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(&hwInfo));
|
||||
|
||||
@@ -583,7 +583,7 @@ HWTEST_F(EnqueueKernelTest, givenCommandStreamReceiverInBatchingModeWhenEnqueueK
|
||||
HWTEST_F(EnqueueKernelTest, givenReducedAddressSpaceGraphicsAllocationForHostPtrWithL3FlushRequiredWhenEnqueueKernelIsCalledThenFlushIsCalledForReducedAddressSpacePlatforms) {
|
||||
std::unique_ptr<MockClDevice> device;
|
||||
std::unique_ptr<CommandQueue> cmdQ;
|
||||
auto hwInfoToModify = *platformDevices[0];
|
||||
auto hwInfoToModify = *defaultHwInfo;
|
||||
hwInfoToModify.capabilityTable.gpuAddressSpace = MemoryConstants::max36BitAddress;
|
||||
device.reset(new MockClDevice{MockDevice::createWithNewExecutionEnvironment<MockDevice>(&hwInfoToModify)});
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*device->executionEnvironment, device->getRootDeviceIndex());
|
||||
@@ -607,7 +607,7 @@ HWTEST_F(EnqueueKernelTest, givenReducedAddressSpaceGraphicsAllocationForHostPtr
|
||||
HWTEST_F(EnqueueKernelTest, givenReducedAddressSpaceGraphicsAllocationForHostPtrWithL3FlushUnrequiredWhenEnqueueKernelIsCalledThenFlushIsNotForcedByGraphicsAllocation) {
|
||||
std::unique_ptr<MockClDevice> device;
|
||||
std::unique_ptr<CommandQueue> cmdQ;
|
||||
auto hwInfoToModify = *platformDevices[0];
|
||||
auto hwInfoToModify = *defaultHwInfo;
|
||||
hwInfoToModify.capabilityTable.gpuAddressSpace = MemoryConstants::max36BitAddress;
|
||||
device.reset(new MockClDevice{MockDevice::createWithNewExecutionEnvironment<MockDevice>(&hwInfoToModify)});
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*device->executionEnvironment, device->getRootDeviceIndex());
|
||||
@@ -632,7 +632,7 @@ HWTEST_F(EnqueueKernelTest, givenFullAddressSpaceGraphicsAllocationWhenEnqueueKe
|
||||
HardwareInfo hwInfoToModify;
|
||||
std::unique_ptr<MockClDevice> device;
|
||||
std::unique_ptr<CommandQueue> cmdQ;
|
||||
hwInfoToModify = *platformDevices[0];
|
||||
hwInfoToModify = *defaultHwInfo;
|
||||
hwInfoToModify.capabilityTable.gpuAddressSpace = MemoryConstants::max48BitAddress;
|
||||
device.reset(new MockClDevice{MockDevice::createWithNewExecutionEnvironment<MockDevice>(&hwInfoToModify)});
|
||||
auto mockCsr = new MockCsrHw2<FamilyType>(*device->executionEnvironment, device->getRootDeviceIndex());
|
||||
|
||||
@@ -331,7 +331,7 @@ HWCMDTEST_P(IGFX_GEN8_CORE, EnqueueScratchSpaceTests, GivenKernelRequiringScratc
|
||||
auto *cmd = (MEDIA_VFE_STATE *)*itorCmd;
|
||||
auto *sba = (STATE_BASE_ADDRESS *)*itorCmdForStateBase;
|
||||
|
||||
const HardwareInfo &hwInfo = **platformDevices;
|
||||
const HardwareInfo &hwInfo = *defaultHwInfo;
|
||||
uint32_t threadPerEU = (hwInfo.gtSystemInfo.ThreadCount / hwInfo.gtSystemInfo.EUCount) + hwInfo.capabilityTable.extraQuantityThreadsPerEU;
|
||||
uint32_t maxNumberOfThreads = hwInfo.gtSystemInfo.EUCount * threadPerEU;
|
||||
|
||||
|
||||
@@ -495,7 +495,7 @@ HWTEST_F(AubCommandStreamReceiverNoHostPtrTests, givenAubCommandStreamReceiverWh
|
||||
executionEnvironment->memoryManager.reset(memoryManager);
|
||||
|
||||
std::unique_ptr<AUBCommandStreamReceiverHw<FamilyType>> aubCsr(new AUBCommandStreamReceiverHw<FamilyType>("", true, *executionEnvironment, 0));
|
||||
auto osContext = memoryManager->createAndRegisterOsContext(aubCsr.get(), getChosenEngineType(**platformDevices), 0,
|
||||
auto osContext = memoryManager->createAndRegisterOsContext(aubCsr.get(), getChosenEngineType(*defaultHwInfo), 0,
|
||||
PreemptionMode::Disabled,
|
||||
false, false, false);
|
||||
aubCsr->setupContext(*osContext);
|
||||
|
||||
@@ -991,10 +991,10 @@ HWTEST_F(AubFileStreamTests, givenAubCommandStreamReceiverWhenCreateFullFilePath
|
||||
DebugManagerStateRestore stateRestore;
|
||||
|
||||
DebugManager.flags.CreateMultipleSubDevices.set(1);
|
||||
auto fullName = AUBCommandStreamReceiver::createFullFilePath(*platformDevices[0], "aubfile");
|
||||
auto fullName = AUBCommandStreamReceiver::createFullFilePath(*defaultHwInfo, "aubfile");
|
||||
EXPECT_EQ(std::string::npos, fullName.find("tx"));
|
||||
|
||||
DebugManager.flags.CreateMultipleSubDevices.set(2);
|
||||
fullName = AUBCommandStreamReceiver::createFullFilePath(*platformDevices[0], "aubfile");
|
||||
fullName = AUBCommandStreamReceiver::createFullFilePath(*defaultHwInfo, "aubfile");
|
||||
EXPECT_NE(std::string::npos, fullName.find("2tx"));
|
||||
}
|
||||
|
||||
@@ -374,7 +374,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, GivenKernelWithSlmWhenPreviousSLML
|
||||
|
||||
auto &commandStreamCSR = commandStreamReceiver->getCS();
|
||||
|
||||
uint32_t L3Config = PreambleHelper<FamilyType>::getL3Config(*platformDevices[0], true);
|
||||
uint32_t L3Config = PreambleHelper<FamilyType>::getL3Config(*defaultHwInfo, true);
|
||||
|
||||
// Mark Pramble as sent, override L3Config to SLM config
|
||||
commandStreamReceiver->isPreambleSent = true;
|
||||
|
||||
@@ -63,7 +63,7 @@ void CommandStreamReceiverHwTest<GfxFamily>::givenKernelWithSlmWhenPreviousNOSLM
|
||||
auto cmdPC = genCmdCast<PIPE_CONTROL *>(*itorCmd);
|
||||
ASSERT_NE(nullptr, cmdPC);
|
||||
|
||||
uint32_t L3Config = PreambleHelper<GfxFamily>::getL3Config(*platformDevices[0], true);
|
||||
uint32_t L3Config = PreambleHelper<GfxFamily>::getL3Config(*defaultHwInfo, true);
|
||||
EXPECT_EQ(L3Config, static_cast<uint32_t>(cmdMILoad->getDataDword()));
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@ void CommandStreamReceiverHwTest<GfxFamily>::givenBlockedKernelWithSlmWhenPrevio
|
||||
|
||||
auto &commandStreamCSR = commandStreamReceiver->getCS();
|
||||
|
||||
uint32_t L3Config = PreambleHelper<GfxFamily>::getL3Config(*platformDevices[0], false);
|
||||
uint32_t L3Config = PreambleHelper<GfxFamily>::getL3Config(*defaultHwInfo, false);
|
||||
|
||||
// Mark Pramble as sent, override L3Config to SLM config
|
||||
commandStreamReceiver->isPreambleSent = true;
|
||||
@@ -110,6 +110,6 @@ void CommandStreamReceiverHwTest<GfxFamily>::givenBlockedKernelWithSlmWhenPrevio
|
||||
auto cmdMILoad = genCmdCast<MI_LOAD_REGISTER_IMM *>(*itorCmd);
|
||||
ASSERT_NE(nullptr, cmdMILoad);
|
||||
|
||||
L3Config = PreambleHelper<GfxFamily>::getL3Config(*platformDevices[0], true);
|
||||
L3Config = PreambleHelper<GfxFamily>::getL3Config(*defaultHwInfo, true);
|
||||
EXPECT_EQ(L3Config, static_cast<uint32_t>(cmdMILoad->getDataDword()));
|
||||
}
|
||||
|
||||
@@ -489,7 +489,7 @@ struct CreateAllocationForHostSurfaceTest : public ::testing::Test {
|
||||
device.reset(MockDevice::create<MockDevice>(executionEnvironment, 0u));
|
||||
commandStreamReceiver = &device->getGpgpuCommandStreamReceiver();
|
||||
}
|
||||
HardwareInfo hwInfo = *platformDevices[0];
|
||||
HardwareInfo hwInfo = *defaultHwInfo;
|
||||
ExecutionEnvironment *executionEnvironment = nullptr;
|
||||
GMockMemoryManager *gmockMemoryManager = nullptr;
|
||||
std::unique_ptr<MockDevice> device;
|
||||
|
||||
@@ -361,7 +361,7 @@ HWTEST_F(TbxCommandStreamTests, givenTbxCommandStreamReceiverWhenFlushIsCalledTh
|
||||
}
|
||||
|
||||
HWTEST_F(TbxCommandStreamTests, givenNoDbgDeviceIdFlagWhenTbxCsrIsCreatedThenUseDefaultDeviceId) {
|
||||
const HardwareInfo &hwInfo = *platformDevices[0];
|
||||
const HardwareInfo &hwInfo = *defaultHwInfo;
|
||||
TbxCommandStreamReceiverHw<FamilyType> *tbxCsr = reinterpret_cast<TbxCommandStreamReceiverHw<FamilyType> *>(pCommandStreamReceiver);
|
||||
EXPECT_EQ(hwInfo.capabilityTable.aubDeviceId, tbxCsr->aubDeviceId);
|
||||
}
|
||||
@@ -590,7 +590,7 @@ HWTEST_F(TbxCommandStreamTests, givenTbxCsrWhenCreatedWithAubDumpThenFileNameIsE
|
||||
auto rootDeviceEnvironment = static_cast<MockRootDeviceEnvironment *>(executionEnvironment.rootDeviceEnvironments[0].get());
|
||||
setMockAubCenter(*rootDeviceEnvironment, CommandStreamReceiverType::CSR_TBX);
|
||||
|
||||
auto fullName = AUBCommandStreamReceiver::createFullFilePath(*platformDevices[0], "aubfile");
|
||||
auto fullName = AUBCommandStreamReceiver::createFullFilePath(*defaultHwInfo, "aubfile");
|
||||
|
||||
std::unique_ptr<TbxCommandStreamReceiverHw<FamilyType>> tbxCsr(reinterpret_cast<TbxCommandStreamReceiverHw<FamilyType> *>(TbxCommandStreamReceiver::create("aubfile", true, executionEnvironment, 0)));
|
||||
EXPECT_STREQ(fullName.c_str(), rootDeviceEnvironment->aubFileNameReceived.c_str());
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
namespace NEO {
|
||||
void DeviceFixture::SetUp() {
|
||||
hardwareInfo = *platformDevices[0];
|
||||
hardwareInfo = *defaultHwInfo;
|
||||
SetUpImpl(&hardwareInfo);
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ void DeviceFixture::TearDown() {
|
||||
}
|
||||
|
||||
MockDevice *DeviceFixture::createWithUsDeviceId(unsigned short usDeviceId) {
|
||||
hardwareInfo = *platformDevices[0];
|
||||
hardwareInfo = *defaultHwInfo;
|
||||
hardwareInfo.platform.usDeviceID = usDeviceId;
|
||||
return MockDevice::createWithNewExecutionEnvironment<MockDevice>(&hardwareInfo);
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ class MemoryAllocatorFixture : public MemoryManagementFixture {
|
||||
auto &hwInfo = device->getHardwareInfo();
|
||||
auto engineType = HwHelper::get(hwInfo.platform.eRenderCoreFamily).getGpgpuEngineInstances(hwInfo)[0];
|
||||
auto osContext = memoryManager->createAndRegisterOsContext(csr, engineType, 1,
|
||||
PreemptionHelper::getDefaultPreemptionMode(*platformDevices[0]),
|
||||
PreemptionHelper::getDefaultPreemptionMode(*defaultHwInfo),
|
||||
false, false, false);
|
||||
csr->setupContext(*osContext);
|
||||
}
|
||||
|
||||
@@ -78,7 +78,7 @@ HWTEST_TEMPLATED_F(DerivedTemplatedFixtureTests, whenExecutingTemplatedTestThenC
|
||||
struct TemplatedFixtureBaseTests : public ::testing::Test {
|
||||
template <typename T>
|
||||
void SetUpT() {
|
||||
capturedPipeControlWaRequiredInSetUp = HardwareCommandsHelper<T>::isPipeControlWArequired(**platformDevices);
|
||||
capturedPipeControlWaRequiredInSetUp = HardwareCommandsHelper<T>::isPipeControlWArequired(*defaultHwInfo);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
@@ -88,7 +88,7 @@ struct TemplatedFixtureBaseTests : public ::testing::Test {
|
||||
};
|
||||
|
||||
HWTEST_TEMPLATED_F(TemplatedFixtureBaseTests, whenExecutingTemplatedSetupThenTemplateTargetsCorrectPlatform) {
|
||||
bool capturedPipeControlWaRequiredInTestBody = HardwareCommandsHelper<FamilyType>::isPipeControlWArequired(**platformDevices);
|
||||
bool capturedPipeControlWaRequiredInTestBody = HardwareCommandsHelper<FamilyType>::isPipeControlWArequired(*defaultHwInfo);
|
||||
|
||||
EXPECT_EQ(capturedPipeControlWaRequiredInTestBody, capturedPipeControlWaRequiredInSetUp);
|
||||
}
|
||||
|
||||
@@ -114,7 +114,7 @@ struct UltCommandStreamReceiverTest
|
||||
slmUsed = true;
|
||||
}
|
||||
|
||||
uint32_t L3Config = PreambleHelper<GfxFamily>::getL3Config(*platformDevices[0], slmUsed);
|
||||
uint32_t L3Config = PreambleHelper<GfxFamily>::getL3Config(*defaultHwInfo, slmUsed);
|
||||
|
||||
auto &commandStreamReceiver = pDevice->getUltCommandStreamReceiver<GfxFamily>();
|
||||
commandStreamReceiver.isPreambleSent = true;
|
||||
|
||||
@@ -108,7 +108,7 @@ GEN12LPTEST_F(HwHelperTestGen12Lp, givenDifferentSizesOfAllocationWhenCheckingCo
|
||||
}
|
||||
|
||||
GEN12LPTEST_F(HwHelperTestGen12Lp, givenFtrCcsNodeNotSetWhenGetGpgpuEnginesThenReturnThreeRcsEngines) {
|
||||
HardwareInfo hwInfo = *platformDevices[0];
|
||||
HardwareInfo hwInfo = *defaultHwInfo;
|
||||
hwInfo.featureTable.ftrCCSNode = false;
|
||||
hwInfo.capabilityTable.defaultEngineType = aub_stream::ENGINE_RCS;
|
||||
|
||||
@@ -122,7 +122,7 @@ GEN12LPTEST_F(HwHelperTestGen12Lp, givenFtrCcsNodeNotSetWhenGetGpgpuEnginesThenR
|
||||
}
|
||||
|
||||
GEN12LPTEST_F(HwHelperTestGen12Lp, givenFtrCcsNodeSetWhenGetGpgpuEnginesThenReturnTwoRcsAndCcsEngines) {
|
||||
HardwareInfo hwInfo = *platformDevices[0];
|
||||
HardwareInfo hwInfo = *defaultHwInfo;
|
||||
hwInfo.featureTable.ftrCCSNode = true;
|
||||
hwInfo.capabilityTable.defaultEngineType = aub_stream::ENGINE_CCS;
|
||||
|
||||
@@ -137,7 +137,7 @@ GEN12LPTEST_F(HwHelperTestGen12Lp, givenFtrCcsNodeSetWhenGetGpgpuEnginesThenRetu
|
||||
}
|
||||
|
||||
GEN12LPTEST_F(HwHelperTestGen12Lp, givenFtrCcsNodeSetAndDefaultRcsWhenGetGpgpuEnginesThenReturnThreeRcsAndCcsEngines) {
|
||||
HardwareInfo hwInfo = *platformDevices[0];
|
||||
HardwareInfo hwInfo = *defaultHwInfo;
|
||||
hwInfo.featureTable.ftrCCSNode = true;
|
||||
hwInfo.capabilityTable.defaultEngineType = aub_stream::ENGINE_RCS;
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ TGLLPTEST_F(KernelTgllpTests, GivenUseOffsetToSkipSetFFIDGPWorkaroundActiveWhenS
|
||||
const uint64_t additionalOffsetDueToFfid = 0x1234;
|
||||
SPatchThreadPayload threadPayload{};
|
||||
threadPayload.OffsetToSkipSetFFIDGP = additionalOffsetDueToFfid;
|
||||
auto hwInfo = *platformDevices[0];
|
||||
auto hwInfo = *defaultHwInfo;
|
||||
|
||||
unsigned short steppings[] = {REVISION_A0, REVISION_A0 + 1};
|
||||
for (auto stepping : steppings) {
|
||||
|
||||
@@ -77,7 +77,7 @@ GEN12LPTEST_F(Gen12LpGmmCallbacksTests, givenWddmCsrWhenWriteL3CalledThenWriteTw
|
||||
|
||||
GEN12LPTEST_F(Gen12LpGmmCallbacksTests, givenCcsEnabledhenWriteL3CalledThenSetRemapBit) {
|
||||
typedef typename FamilyType::MI_LOAD_REGISTER_IMM MI_LOAD_REGISTER_IMM;
|
||||
HardwareInfo localHwInfo = **platformDevices;
|
||||
HardwareInfo localHwInfo = *defaultHwInfo;
|
||||
localHwInfo.featureTable.ftrCCSNode = true;
|
||||
ExecutionEnvironment executionEnvironment;
|
||||
executionEnvironment.prepareRootDeviceEnvironments(1u);
|
||||
@@ -105,7 +105,7 @@ GEN12LPTEST_F(Gen12LpGmmCallbacksTests, givenCcsEnabledhenWriteL3CalledThenSetRe
|
||||
|
||||
GEN12LPTEST_F(Gen12LpGmmCallbacksTests, givenCcsDisabledhenWriteL3CalledThenSetRemapBitToTrue) {
|
||||
typedef typename FamilyType::MI_LOAD_REGISTER_IMM MI_LOAD_REGISTER_IMM;
|
||||
HardwareInfo localHwInfo = **platformDevices;
|
||||
HardwareInfo localHwInfo = *defaultHwInfo;
|
||||
localHwInfo.featureTable.ftrCCSNode = false;
|
||||
ExecutionEnvironment executionEnvironment;
|
||||
executionEnvironment.prepareRootDeviceEnvironments(1u);
|
||||
|
||||
@@ -346,7 +346,7 @@ TEST_F(GmmTests, givenNonZeroRowPitchWhenQueryImgFromBufferParamsThenUseUserValu
|
||||
}
|
||||
|
||||
TEST_F(GmmTests, WhenCanonizingThenCorrectAddressIsReturned) {
|
||||
auto hwInfo = *platformDevices[0];
|
||||
auto hwInfo = *defaultHwInfo;
|
||||
|
||||
// 48 bit - canonize to 48 bit
|
||||
hwInfo.capabilityTable.gpuAddressSpace = maxNBitValue(48); // 0x0000FFFFFFFFFFFF;
|
||||
@@ -369,7 +369,7 @@ TEST_F(GmmTests, WhenCanonizingThenCorrectAddressIsReturned) {
|
||||
}
|
||||
|
||||
TEST_F(GmmTests, WhenDecanonizingThenCorrectAddressIsReturned) {
|
||||
auto hwInfo = *platformDevices[0];
|
||||
auto hwInfo = *defaultHwInfo;
|
||||
|
||||
// 48 bit - decanonize to 48 bit
|
||||
hwInfo.capabilityTable.gpuAddressSpace = maxNBitValue(48); //0x0000FFFFFFFFFFFF;
|
||||
|
||||
@@ -34,7 +34,7 @@ using namespace NEO;
|
||||
|
||||
TEST(HwHelperSimpleTest, givenDebugVariableWhenAskingForRenderCompressionThenReturnCorrectValue) {
|
||||
DebugManagerStateRestore restore;
|
||||
HardwareInfo localHwInfo = **platformDevices;
|
||||
HardwareInfo localHwInfo = *defaultHwInfo;
|
||||
|
||||
// debug variable not set
|
||||
localHwInfo.capabilityTable.ftrRenderCompressedBuffers = false;
|
||||
@@ -201,7 +201,7 @@ HWTEST_F(PipeControlHelperTests, givenPostSyncWriteTimestampModeWhenHelperIsUsed
|
||||
expectedPipeControl.setPostSyncOperation(PIPE_CONTROL::POST_SYNC_OPERATION_WRITE_TIMESTAMP);
|
||||
expectedPipeControl.setAddress(static_cast<uint32_t>(address & 0x0000FFFFFFFFULL));
|
||||
expectedPipeControl.setAddressHigh(static_cast<uint32_t>(address >> 32));
|
||||
HardwareInfo hardwareInfo = *platformDevices[0];
|
||||
HardwareInfo hardwareInfo = *defaultHwInfo;
|
||||
|
||||
auto pipeControl = MemorySynchronizationCommands<FamilyType>::obtainPipeControlAndProgramPostSyncOperation(
|
||||
stream, PIPE_CONTROL::POST_SYNC_OPERATION_WRITE_TIMESTAMP, address, immediateData, false, hardwareInfo);
|
||||
@@ -227,7 +227,7 @@ HWTEST_F(PipeControlHelperTests, givenPostSyncWriteImmediateDataModeWhenHelperIs
|
||||
expectedPipeControl.setAddress(static_cast<uint32_t>(address & 0x0000FFFFFFFFULL));
|
||||
expectedPipeControl.setAddressHigh(static_cast<uint32_t>(address >> 32));
|
||||
expectedPipeControl.setImmediateData(immediateData);
|
||||
HardwareInfo hardwareInfo = *platformDevices[0];
|
||||
HardwareInfo hardwareInfo = *defaultHwInfo;
|
||||
|
||||
auto pipeControl = MemorySynchronizationCommands<FamilyType>::obtainPipeControlAndProgramPostSyncOperation(
|
||||
stream, PIPE_CONTROL::POST_SYNC_OPERATION_WRITE_IMMEDIATE_DATA, address, immediateData, false, hardwareInfo);
|
||||
@@ -584,10 +584,10 @@ HWTEST_F(HwHelperTest, DISABLED_profilingCreationOfRenderSurfaceStateVsMemcpyOfC
|
||||
HWTEST_F(HwHelperTest, testIfL3ConfigProgrammable) {
|
||||
bool PreambleHelperL3Config;
|
||||
bool isL3Programmable;
|
||||
const HardwareInfo &hwInfo = **platformDevices;
|
||||
const HardwareInfo &hwInfo = *defaultHwInfo;
|
||||
|
||||
PreambleHelperL3Config =
|
||||
PreambleHelper<FamilyType>::isL3Configurable(**platformDevices);
|
||||
PreambleHelper<FamilyType>::isL3Configurable(*defaultHwInfo);
|
||||
isL3Programmable =
|
||||
HwHelperHw<FamilyType>::get().isL3Configurable(hwInfo);
|
||||
|
||||
@@ -598,7 +598,7 @@ TEST(HwHelperCacheFlushTest, givenEnableCacheFlushFlagIsEnableWhenPlatformDoesNo
|
||||
DebugManagerStateRestore restore;
|
||||
DebugManager.flags.EnableCacheFlushAfterWalker.set(1);
|
||||
|
||||
HardwareInfo localHwInfo = *platformDevices[0];
|
||||
HardwareInfo localHwInfo = *defaultHwInfo;
|
||||
localHwInfo.capabilityTable.supportCacheFlushAfterWalker = false;
|
||||
|
||||
auto device = std::unique_ptr<MockDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(&localHwInfo));
|
||||
@@ -609,7 +609,7 @@ TEST(HwHelperCacheFlushTest, givenEnableCacheFlushFlagIsDisableWhenPlatformSuppo
|
||||
DebugManagerStateRestore restore;
|
||||
DebugManager.flags.EnableCacheFlushAfterWalker.set(0);
|
||||
|
||||
HardwareInfo localHwInfo = *platformDevices[0];
|
||||
HardwareInfo localHwInfo = *defaultHwInfo;
|
||||
localHwInfo.capabilityTable.supportCacheFlushAfterWalker = true;
|
||||
|
||||
auto device = std::unique_ptr<MockDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(&localHwInfo));
|
||||
@@ -620,7 +620,7 @@ TEST(HwHelperCacheFlushTest, givenEnableCacheFlushFlagIsReadPlatformSettingWhenP
|
||||
DebugManagerStateRestore restore;
|
||||
DebugManager.flags.EnableCacheFlushAfterWalker.set(-1);
|
||||
|
||||
HardwareInfo localHwInfo = *platformDevices[0];
|
||||
HardwareInfo localHwInfo = *defaultHwInfo;
|
||||
localHwInfo.capabilityTable.supportCacheFlushAfterWalker = false;
|
||||
|
||||
auto device = std::unique_ptr<MockDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(&localHwInfo));
|
||||
@@ -631,7 +631,7 @@ TEST(HwHelperCacheFlushTest, givenEnableCacheFlushFlagIsReadPlatformSettingWhenP
|
||||
DebugManagerStateRestore restore;
|
||||
DebugManager.flags.EnableCacheFlushAfterWalker.set(-1);
|
||||
|
||||
HardwareInfo localHwInfo = *platformDevices[0];
|
||||
HardwareInfo localHwInfo = *defaultHwInfo;
|
||||
localHwInfo.capabilityTable.supportCacheFlushAfterWalker = true;
|
||||
|
||||
auto device = std::unique_ptr<MockDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(&localHwInfo));
|
||||
@@ -693,7 +693,7 @@ HWTEST_F(HwHelperTest, givenMultiDispatchInfoWhenAskingForAuxTranslationThenChec
|
||||
MockBuffer buffer;
|
||||
MemObjsForAuxTranslation memObjects;
|
||||
MultiDispatchInfo multiDispatchInfo;
|
||||
HardwareInfo hwInfo = **platformDevices;
|
||||
HardwareInfo hwInfo = *defaultHwInfo;
|
||||
hwInfo.capabilityTable.blitterOperationsSupported = true;
|
||||
|
||||
DebugManager.flags.ForceAuxTranslationMode.set(static_cast<int32_t>(AuxTranslationMode::Blit));
|
||||
|
||||
@@ -2639,7 +2639,7 @@ TEST(KernelTest, givenKernelWhenDebugFlagToUseMaxSimdForCalculationsIsUsedThenMa
|
||||
DebugManagerStateRestore dbgStateRestore;
|
||||
DebugManager.flags.UseMaxSimdSizeToDeduceMaxWorkgroupSize.set(true);
|
||||
|
||||
HardwareInfo myHwInfo = *platformDevices[0];
|
||||
HardwareInfo myHwInfo = *defaultHwInfo;
|
||||
GT_SYSTEM_INFO &mySysInfo = myHwInfo.gtSystemInfo;
|
||||
|
||||
mySysInfo.EUCount = 24;
|
||||
@@ -2726,7 +2726,7 @@ TEST(KernelTest, givenDebugVariableSetWhenKernelHasStatefulBufferAccessThenMarkK
|
||||
DebugManagerStateRestore restore;
|
||||
DebugManager.flags.RenderCompressedBuffersEnabled.set(1);
|
||||
|
||||
HardwareInfo localHwInfo = *platformDevices[0];
|
||||
HardwareInfo localHwInfo = *defaultHwInfo;
|
||||
|
||||
auto device = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(&localHwInfo));
|
||||
auto context = clUniquePtr(new MockContext(device.get()));
|
||||
@@ -2749,7 +2749,7 @@ TEST(KernelTest, givenDebugVariableSetWhenKernelHasStatefulBufferAccessThenMarkK
|
||||
}
|
||||
|
||||
TEST(KernelTest, givenKernelWithPairArgumentWhenItIsInitializedThenPatchImmediateIsUsedAsArgHandler) {
|
||||
HardwareInfo localHwInfo = *platformDevices[0];
|
||||
HardwareInfo localHwInfo = *defaultHwInfo;
|
||||
|
||||
auto device = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(&localHwInfo));
|
||||
auto context = clUniquePtr(new MockContext(device.get()));
|
||||
|
||||
@@ -49,7 +49,7 @@ TEST(MemoryManagerTest, givenAllowed32BitAndFroce32BitWhenGraphicsAllocationInDe
|
||||
}
|
||||
|
||||
TEST(AllocationFlagsTest, givenAllocateMemoryFlagWhenGetAllocationFlagsIsCalledThenAllocateFlagIsCorrectlySet) {
|
||||
HardwareInfo hwInfo(*platformDevices[0]);
|
||||
HardwareInfo hwInfo(*defaultHwInfo);
|
||||
auto allocationProperties = MemoryPropertiesParser::getAllocationProperties(0, {}, true, 0, GraphicsAllocation::AllocationType::BUFFER, false, hwInfo);
|
||||
EXPECT_TRUE(allocationProperties.flags.allocateMemory);
|
||||
|
||||
@@ -59,7 +59,7 @@ TEST(AllocationFlagsTest, givenAllocateMemoryFlagWhenGetAllocationFlagsIsCalledT
|
||||
|
||||
TEST(UncacheableFlagsTest, givenUncachedResourceFlagWhenGetAllocationFlagsIsCalledThenUncacheableFlagIsCorrectlySet) {
|
||||
cl_mem_flags_intel flagsIntel = CL_MEM_LOCALLY_UNCACHED_RESOURCE;
|
||||
HardwareInfo hwInfo(*platformDevices[0]);
|
||||
HardwareInfo hwInfo(*defaultHwInfo);
|
||||
MemoryPropertiesFlags memoryProperties = MemoryPropertiesFlagsParser::createMemoryPropertiesFlags(0, flagsIntel, 0);
|
||||
auto allocationFlags = MemoryPropertiesParser::getAllocationProperties(0, memoryProperties, false, 0, GraphicsAllocation::AllocationType::BUFFER, false, hwInfo);
|
||||
EXPECT_TRUE(allocationFlags.flags.uncacheable);
|
||||
@@ -73,7 +73,7 @@ TEST(UncacheableFlagsTest, givenUncachedResourceFlagWhenGetAllocationFlagsIsCall
|
||||
TEST(AllocationFlagsTest, givenReadOnlyResourceFlagWhenGetAllocationFlagsIsCalledThenFlushL3FlagsAreCorrectlySet) {
|
||||
cl_mem_flags flags = CL_MEM_READ_ONLY;
|
||||
MemoryPropertiesFlags memoryProperties = MemoryPropertiesFlagsParser::createMemoryPropertiesFlags(flags, 0, 0);
|
||||
HardwareInfo hwInfo(*platformDevices[0]);
|
||||
HardwareInfo hwInfo(*defaultHwInfo);
|
||||
|
||||
auto allocationFlags =
|
||||
MemoryPropertiesParser::getAllocationProperties(0, memoryProperties, true, 0, GraphicsAllocation::AllocationType::BUFFER, false, hwInfo);
|
||||
|
||||
@@ -201,8 +201,8 @@ TEST_F(MemoryAllocatorTest, allocateGraphics) {
|
||||
unsigned int alignment = 4096;
|
||||
|
||||
memoryManager->createAndRegisterOsContext(csr,
|
||||
HwHelper::get(platformDevices[0]->platform.eRenderCoreFamily).getGpgpuEngineInstances(*platformDevices[0])[0],
|
||||
1, PreemptionHelper::getDefaultPreemptionMode(*platformDevices[0]),
|
||||
HwHelper::get(platformDevices[0]->platform.eRenderCoreFamily).getGpgpuEngineInstances(*defaultHwInfo)[0],
|
||||
1, PreemptionHelper::getDefaultPreemptionMode(*defaultHwInfo),
|
||||
false, false, false);
|
||||
auto allocation = memoryManager->allocateGraphicsMemoryWithProperties(MockAllocationProperties{MemoryConstants::pageSize});
|
||||
|
||||
@@ -1412,8 +1412,8 @@ TEST_F(MemoryManagerWithCsrTest, givenAllocationThatWasUsedAndIsCompletedWhenche
|
||||
|
||||
TEST_F(MemoryManagerWithCsrTest, givenAllocationThatWasUsedAndIsNotCompletedWhencheckGpuUsageAndDestroyGraphicsAllocationsIsCalledThenItIsAddedToTemporaryAllocationList) {
|
||||
memoryManager->createAndRegisterOsContext(csr.get(),
|
||||
HwHelper::get(platformDevices[0]->platform.eRenderCoreFamily).getGpgpuEngineInstances(*platformDevices[0])[0],
|
||||
1, PreemptionHelper::getDefaultPreemptionMode(*platformDevices[0]),
|
||||
HwHelper::get(platformDevices[0]->platform.eRenderCoreFamily).getGpgpuEngineInstances(*defaultHwInfo)[0],
|
||||
1, PreemptionHelper::getDefaultPreemptionMode(*defaultHwInfo),
|
||||
false, false, false);
|
||||
auto usedAllocationAndNotGpuCompleted = memoryManager->allocateGraphicsMemoryWithProperties(MockAllocationProperties{MemoryConstants::pageSize});
|
||||
|
||||
@@ -1664,8 +1664,8 @@ TEST(ResidencyDataTest, givenOsContextWhenItIsRegisteredToMemoryManagerThenRefCo
|
||||
executionEnvironment.memoryManager.reset(memoryManager);
|
||||
std::unique_ptr<CommandStreamReceiver> csr(createCommandStream(executionEnvironment, 0u));
|
||||
memoryManager->createAndRegisterOsContext(csr.get(),
|
||||
HwHelper::get(platformDevices[0]->platform.eRenderCoreFamily).getGpgpuEngineInstances(*platformDevices[0])[0],
|
||||
1, PreemptionHelper::getDefaultPreemptionMode(*platformDevices[0]),
|
||||
HwHelper::get(platformDevices[0]->platform.eRenderCoreFamily).getGpgpuEngineInstances(*defaultHwInfo)[0],
|
||||
1, PreemptionHelper::getDefaultPreemptionMode(*defaultHwInfo),
|
||||
false, false, false);
|
||||
EXPECT_EQ(1u, memoryManager->getRegisteredEnginesCount());
|
||||
EXPECT_EQ(1, memoryManager->registeredEngines[0].osContext->getRefInternalCount());
|
||||
@@ -1693,7 +1693,7 @@ TEST(ResidencyDataTest, givenDeviceBitfieldWhenCreatingOsContextThenSetValidValu
|
||||
DeviceBitfield deviceBitfield = 0b11;
|
||||
PreemptionMode preemptionMode = PreemptionMode::MidThread;
|
||||
memoryManager->createAndRegisterOsContext(csr.get(),
|
||||
HwHelper::get(platformDevices[0]->platform.eRenderCoreFamily).getGpgpuEngineInstances(*platformDevices[0])[0],
|
||||
HwHelper::get(platformDevices[0]->platform.eRenderCoreFamily).getGpgpuEngineInstances(*defaultHwInfo)[0],
|
||||
deviceBitfield, preemptionMode,
|
||||
false, false, false);
|
||||
EXPECT_EQ(2u, memoryManager->registeredEngines[0].osContext->getNumSupportedDevices());
|
||||
@@ -1708,12 +1708,12 @@ TEST(ResidencyDataTest, givenTwoOsContextsWhenTheyAreRegisteredFromHigherToLower
|
||||
std::unique_ptr<CommandStreamReceiver> csr(createCommandStream(executionEnvironment, 0u));
|
||||
std::unique_ptr<CommandStreamReceiver> csr1(createCommandStream(executionEnvironment, 1u));
|
||||
memoryManager->createAndRegisterOsContext(csr.get(),
|
||||
HwHelper::get(platformDevices[0]->platform.eRenderCoreFamily).getGpgpuEngineInstances(*platformDevices[0])[0],
|
||||
1, PreemptionHelper::getDefaultPreemptionMode(*platformDevices[0]),
|
||||
HwHelper::get(platformDevices[0]->platform.eRenderCoreFamily).getGpgpuEngineInstances(*defaultHwInfo)[0],
|
||||
1, PreemptionHelper::getDefaultPreemptionMode(*defaultHwInfo),
|
||||
false, false, false);
|
||||
memoryManager->createAndRegisterOsContext(csr1.get(),
|
||||
HwHelper::get(platformDevices[0]->platform.eRenderCoreFamily).getGpgpuEngineInstances(*platformDevices[0])[1],
|
||||
1, PreemptionHelper::getDefaultPreemptionMode(*platformDevices[0]),
|
||||
HwHelper::get(platformDevices[0]->platform.eRenderCoreFamily).getGpgpuEngineInstances(*defaultHwInfo)[1],
|
||||
1, PreemptionHelper::getDefaultPreemptionMode(*defaultHwInfo),
|
||||
false, false, false);
|
||||
EXPECT_EQ(2u, memoryManager->getRegisteredEnginesCount());
|
||||
EXPECT_EQ(1, memoryManager->registeredEngines[0].osContext->getRefInternalCount());
|
||||
@@ -1721,7 +1721,7 @@ TEST(ResidencyDataTest, givenTwoOsContextsWhenTheyAreRegisteredFromHigherToLower
|
||||
}
|
||||
|
||||
TEST(ResidencyDataTest, givenGpgpuEnginesWhenAskedForMaxOsContextCountThenValueIsGreaterOrEqual) {
|
||||
auto &engines = HwHelper::get(platformDevices[0]->platform.eRenderCoreFamily).getGpgpuEngineInstances(*platformDevices[0]);
|
||||
auto &engines = HwHelper::get(platformDevices[0]->platform.eRenderCoreFamily).getGpgpuEngineInstances(*defaultHwInfo);
|
||||
EXPECT_TRUE(MemoryManager::maxOsContextCount >= engines.size());
|
||||
}
|
||||
|
||||
@@ -1733,11 +1733,11 @@ TEST(ResidencyDataTest, givenResidencyDataWhenUpdateCompletionDataIsCalledThenIt
|
||||
MockResidencyData residency;
|
||||
|
||||
MockOsContext osContext(0u, 1,
|
||||
HwHelper::get(platformDevices[0]->platform.eRenderCoreFamily).getGpgpuEngineInstances(*platformDevices[0])[0],
|
||||
PreemptionHelper::getDefaultPreemptionMode(*platformDevices[0]), false, false, false);
|
||||
HwHelper::get(platformDevices[0]->platform.eRenderCoreFamily).getGpgpuEngineInstances(*defaultHwInfo)[0],
|
||||
PreemptionHelper::getDefaultPreemptionMode(*defaultHwInfo), false, false, false);
|
||||
MockOsContext osContext2(1u, 1,
|
||||
HwHelper::get(platformDevices[0]->platform.eRenderCoreFamily).getGpgpuEngineInstances(*platformDevices[0])[1],
|
||||
PreemptionHelper::getDefaultPreemptionMode(*platformDevices[0]), false, false, false);
|
||||
HwHelper::get(platformDevices[0]->platform.eRenderCoreFamily).getGpgpuEngineInstances(*defaultHwInfo)[1],
|
||||
PreemptionHelper::getDefaultPreemptionMode(*defaultHwInfo), false, false, false);
|
||||
|
||||
auto lastFenceValue = 45llu;
|
||||
auto lastFenceValue2 = 23llu;
|
||||
|
||||
@@ -65,7 +65,7 @@ HWTEST_TYPED_TEST(SurfaceTest, GivenSurfaceWhenInterfaceIsUsedThenSurfaceBehaves
|
||||
ExecutionEnvironment *executionEnvironment = platform()->peekExecutionEnvironment();
|
||||
executionEnvironment->initializeMemoryManager();
|
||||
auto csr = std::make_unique<MockCsr<FamilyType>>(execStamp, *executionEnvironment, 0);
|
||||
auto hwInfo = *platformDevices[0];
|
||||
auto hwInfo = *defaultHwInfo;
|
||||
auto engine = HwHelper::get(hwInfo.platform.eRenderCoreFamily).getGpgpuEngineInstances(hwInfo)[0];
|
||||
auto osContext = executionEnvironment->memoryManager->createAndRegisterOsContext(csr.get(), engine, 1,
|
||||
PreemptionHelper::getDefaultPreemptionMode(hwInfo),
|
||||
|
||||
@@ -192,8 +192,8 @@ std::unique_ptr<AubExecutionEnvironment> getEnvironment(bool createTagAllocation
|
||||
}
|
||||
|
||||
auto osContext = executionEnvironment->memoryManager->createAndRegisterOsContext(commandStreamReceiver.get(),
|
||||
getChosenEngineType(*platformDevices[0]), 1,
|
||||
PreemptionHelper::getDefaultPreemptionMode(*platformDevices[0]),
|
||||
getChosenEngineType(*defaultHwInfo), 1,
|
||||
PreemptionHelper::getDefaultPreemptionMode(*defaultHwInfo),
|
||||
false, false, false);
|
||||
commandStreamReceiver->setupContext(*osContext);
|
||||
|
||||
|
||||
@@ -213,8 +213,8 @@ HWTEST_TEMPLATED_F(DrmCommandStreamTest, givenDrmContextIdWhenFlushingThenSetIdT
|
||||
.RetiresOnSaturation();
|
||||
|
||||
osContext = std::make_unique<OsContextLinux>(*mock, 1, 1,
|
||||
HwHelper::get(platformDevices[0]->platform.eRenderCoreFamily).getGpgpuEngineInstances(*platformDevices[0])[0],
|
||||
PreemptionHelper::getDefaultPreemptionMode(*platformDevices[0]),
|
||||
HwHelper::get(platformDevices[0]->platform.eRenderCoreFamily).getGpgpuEngineInstances(*defaultHwInfo)[0],
|
||||
PreemptionHelper::getDefaultPreemptionMode(*defaultHwInfo),
|
||||
false, false, false);
|
||||
csr->setupContext(*osContext);
|
||||
|
||||
@@ -644,7 +644,7 @@ class DrmCommandStreamBatchingTests : public DrmCommandStreamEnhancedTest {
|
||||
template <typename GfxFamily>
|
||||
void SetUpT() {
|
||||
DrmCommandStreamEnhancedTest::SetUpT<GfxFamily>();
|
||||
if (PreemptionHelper::getDefaultPreemptionMode(*platformDevices[0]) == PreemptionMode::MidThread) {
|
||||
if (PreemptionHelper::getDefaultPreemptionMode(*defaultHwInfo) == PreemptionMode::MidThread) {
|
||||
tmpAllocation = GlobalMockSipProgram::sipProgram->getAllocation();
|
||||
GlobalMockSipProgram::sipProgram->resetAllocation(device->getMemoryManager()->allocateGraphicsMemoryWithProperties(MockAllocationProperties{MemoryConstants::pageSize}));
|
||||
}
|
||||
@@ -654,7 +654,7 @@ class DrmCommandStreamBatchingTests : public DrmCommandStreamEnhancedTest {
|
||||
|
||||
template <typename GfxFamily>
|
||||
void TearDownT() {
|
||||
if (PreemptionHelper::getDefaultPreemptionMode(*platformDevices[0]) == PreemptionMode::MidThread) {
|
||||
if (PreemptionHelper::getDefaultPreemptionMode(*defaultHwInfo) == PreemptionMode::MidThread) {
|
||||
device->getMemoryManager()->freeGraphicsMemory((GlobalMockSipProgram::sipProgram)->getAllocation());
|
||||
GlobalMockSipProgram::sipProgram->resetAllocation(tmpAllocation);
|
||||
}
|
||||
|
||||
@@ -191,7 +191,7 @@ TEST_F(DrmTimeTest, givenGpuTimestampResolutionQueryWhenIoctlFailsThenDefaultRes
|
||||
drm->getParamRetValue = 0;
|
||||
drm->ioctl_res = -1;
|
||||
|
||||
auto result = osTime->getDynamicDeviceTimerResolution(*platformDevices[0]);
|
||||
auto result = osTime->getDynamicDeviceTimerResolution(*defaultHwInfo);
|
||||
EXPECT_DOUBLE_EQ(result, defaultResolution);
|
||||
}
|
||||
|
||||
@@ -200,7 +200,7 @@ TEST_F(DrmTimeTest, givenGpuTimestampResolutionQueryWhenNoDrmThenDefaultResoluti
|
||||
|
||||
auto defaultResolution = platformDevices[0]->capabilityTable.defaultProfilingTimerResolution;
|
||||
|
||||
auto result = osTime->getDynamicDeviceTimerResolution(*platformDevices[0]);
|
||||
auto result = osTime->getDynamicDeviceTimerResolution(*defaultHwInfo);
|
||||
EXPECT_DOUBLE_EQ(result, defaultResolution);
|
||||
}
|
||||
|
||||
@@ -212,7 +212,7 @@ TEST_F(DrmTimeTest, givenGpuTimestampResolutionQueryWhenIoctlSuccedsThenCorrectR
|
||||
drm->getParamRetValue = 19200000;
|
||||
drm->ioctl_res = 0;
|
||||
|
||||
auto result = osTime->getDynamicDeviceTimerResolution(*platformDevices[0]);
|
||||
auto result = osTime->getDynamicDeviceTimerResolution(*defaultHwInfo);
|
||||
EXPECT_DOUBLE_EQ(result, 52.08333333333333);
|
||||
}
|
||||
|
||||
|
||||
@@ -334,10 +334,10 @@ TEST_F(GlArbSyncEventOsTest, GivenCallToSignalArbSyncObjectWhenSignalSynchroniza
|
||||
}
|
||||
};
|
||||
FailSignalSyncObjectMock::reset();
|
||||
auto preemptionMode = PreemptionHelper::getDefaultPreemptionMode(*platformDevices[0]);
|
||||
auto preemptionMode = PreemptionHelper::getDefaultPreemptionMode(*defaultHwInfo);
|
||||
wddm->init();
|
||||
OsContextWin osContext(*osInterface.get()->getWddm(), 0u, 1,
|
||||
HwHelper::get(platformDevices[0]->platform.eRenderCoreFamily).getGpgpuEngineInstances(*platformDevices[0])[0],
|
||||
HwHelper::get(platformDevices[0]->platform.eRenderCoreFamily).getGpgpuEngineInstances(*defaultHwInfo)[0],
|
||||
preemptionMode, false, false, false);
|
||||
|
||||
CL_GL_SYNC_INFO syncInfo = {};
|
||||
@@ -395,10 +395,10 @@ TEST_F(GlArbSyncEventOsTest, GivenCallToSignalArbSyncObjectWhenSignalSynchroniza
|
||||
}
|
||||
};
|
||||
FailSignalSyncObjectMock::reset();
|
||||
auto preemptionMode = PreemptionHelper::getDefaultPreemptionMode(*platformDevices[0]);
|
||||
auto preemptionMode = PreemptionHelper::getDefaultPreemptionMode(*defaultHwInfo);
|
||||
wddm->init();
|
||||
OsContextWin osContext(*osInterface.get()->getWddm(), 0u, 1,
|
||||
HwHelper::get(platformDevices[0]->platform.eRenderCoreFamily).getGpgpuEngineInstances(*platformDevices[0])[0],
|
||||
HwHelper::get(platformDevices[0]->platform.eRenderCoreFamily).getGpgpuEngineInstances(*defaultHwInfo)[0],
|
||||
preemptionMode, false, false, false);
|
||||
|
||||
CL_GL_SYNC_INFO syncInfo = {};
|
||||
|
||||
@@ -105,7 +105,7 @@ TEST_F(HwInfoConfigTestWindows, givenInstrumentationForHardwareIsEnabledOrDisabl
|
||||
}
|
||||
|
||||
HWTEST_F(HwInfoConfigTestWindows, givenFtrIaCoherencyFlagWhenConfiguringHwInfoThenSetCoherencySupportCorrectly) {
|
||||
HardwareInfo initialHwInfo = **platformDevices;
|
||||
HardwareInfo initialHwInfo = *defaultHwInfo;
|
||||
auto &hwHelper = HwHelper::get(initialHwInfo.platform.eRenderCoreFamily);
|
||||
auto hwInfoConfig = HwInfoConfig::get(initialHwInfo.platform.eProductFamily);
|
||||
|
||||
|
||||
@@ -15,8 +15,8 @@ using namespace NEO;
|
||||
struct OsContextWinTest : public WddmTestWithMockGdiDll {
|
||||
void SetUp() override {
|
||||
WddmTestWithMockGdiDll::SetUp();
|
||||
preemptionMode = PreemptionHelper::getDefaultPreemptionMode(*platformDevices[0]);
|
||||
engineType = HwHelper::get(platformDevices[0]->platform.eRenderCoreFamily).getGpgpuEngineInstances(*platformDevices[0])[0];
|
||||
preemptionMode = PreemptionHelper::getDefaultPreemptionMode(*defaultHwInfo);
|
||||
engineType = HwHelper::get(platformDevices[0]->platform.eRenderCoreFamily).getGpgpuEngineInstances(*defaultHwInfo)[0];
|
||||
|
||||
init();
|
||||
}
|
||||
|
||||
@@ -30,11 +30,11 @@ TEST(OsContextTest, givenWddmWhenCreateOsContextAfterInitWddmThenOsContextIsInit
|
||||
auto wddm = new WddmMock(rootDeviceEnvironment);
|
||||
OSInterface osInterface;
|
||||
osInterface.get()->setWddm(wddm);
|
||||
auto preemptionMode = PreemptionHelper::getDefaultPreemptionMode(*platformDevices[0]);
|
||||
auto preemptionMode = PreemptionHelper::getDefaultPreemptionMode(*defaultHwInfo);
|
||||
wddm->init();
|
||||
EXPECT_EQ(0u, wddm->registerTrimCallbackResult.called);
|
||||
auto osContext = std::make_unique<OsContextWin>(*wddm, 0u, 1,
|
||||
HwHelper::get(platformDevices[0]->platform.eRenderCoreFamily).getGpgpuEngineInstances(*platformDevices[0])[0],
|
||||
HwHelper::get(platformDevices[0]->platform.eRenderCoreFamily).getGpgpuEngineInstances(*defaultHwInfo)[0],
|
||||
preemptionMode, false, false, false);
|
||||
EXPECT_TRUE(osContext->isInitialized());
|
||||
EXPECT_EQ(osContext->getWddm(), wddm);
|
||||
|
||||
@@ -168,7 +168,7 @@ TEST(Wddm20EnumAdaptersTest, givenEmptyHardwareInfoWhenEnumAdapterIsCalledThenCa
|
||||
}
|
||||
|
||||
TEST(Wddm20EnumAdaptersTest, givenUnknownPlatformWhenEnumAdapterIsCalledThenFalseIsReturnedAndOutputIsEmpty) {
|
||||
HardwareInfo hwInfo = *platformDevices[0];
|
||||
HardwareInfo hwInfo = *defaultHwInfo;
|
||||
hwInfo.platform.eProductFamily = IGFX_UNKNOWN;
|
||||
std::unique_ptr<OsLibrary> mockGdiDll(setAdapterInfo(&hwInfo.platform,
|
||||
&hwInfo.gtSystemInfo,
|
||||
@@ -181,7 +181,7 @@ TEST(Wddm20EnumAdaptersTest, givenUnknownPlatformWhenEnumAdapterIsCalledThenFals
|
||||
EXPECT_FALSE(ret);
|
||||
|
||||
// reset mock gdi
|
||||
hwInfo = *platformDevices[0];
|
||||
hwInfo = *defaultHwInfo;
|
||||
mockGdiDll.reset(setAdapterInfo(&hwInfo.platform,
|
||||
&hwInfo.gtSystemInfo,
|
||||
hwInfo.capabilityTable.gpuAddressSpace));
|
||||
@@ -516,7 +516,7 @@ HWTEST_F(Wddm20InstrumentationTest, configureDeviceAddressSpaceOnInit) {
|
||||
|
||||
D3DKMT_HANDLE adapterHandle = ADAPTER_HANDLE;
|
||||
D3DKMT_HANDLE deviceHandle = DEVICE_HANDLE;
|
||||
const HardwareInfo hwInfo = *platformDevices[0];
|
||||
const HardwareInfo hwInfo = *defaultHwInfo;
|
||||
BOOLEAN FtrL3IACoherency = hwInfo.featureTable.ftrL3IACoherency ? 1 : 0;
|
||||
uintptr_t maxAddr = hwInfo.capabilityTable.gpuAddressSpace >= MemoryConstants::max64BitAppAddress
|
||||
? reinterpret_cast<uintptr_t>(sysInfo.lpMaximumApplicationAddress) + 1
|
||||
@@ -598,7 +598,7 @@ TEST_F(Wddm20WithMockGdiDllTestsWithoutWddmInit, givenUseNoRingFlushesKmdModeDeb
|
||||
TEST_F(Wddm20WithMockGdiDllTestsWithoutWddmInit, givenEngineTypeWhenCreatingContextThenPassCorrectNodeOrdinal) {
|
||||
init();
|
||||
auto createContextParams = this->getCreateContextDataFcn();
|
||||
UINT expected = WddmEngineMapper::engineNodeMap(HwHelper::get(platformDevices[0]->platform.eRenderCoreFamily).getGpgpuEngineInstances(*platformDevices[0])[0]);
|
||||
UINT expected = WddmEngineMapper::engineNodeMap(HwHelper::get(platformDevices[0]->platform.eRenderCoreFamily).getGpgpuEngineInstances(*defaultHwInfo)[0]);
|
||||
EXPECT_EQ(expected, createContextParams->NodeOrdinal);
|
||||
}
|
||||
|
||||
|
||||
@@ -39,12 +39,12 @@ struct Wddm23TestsWithoutWddmInit : public ::testing::Test, GdiDllFixture {
|
||||
}
|
||||
|
||||
void init() {
|
||||
auto preemptionMode = PreemptionHelper::getDefaultPreemptionMode(*platformDevices[0]);
|
||||
auto preemptionMode = PreemptionHelper::getDefaultPreemptionMode(*defaultHwInfo);
|
||||
wddmMockInterface = static_cast<WddmMockInterface23 *>(wddm->wddmInterface.release());
|
||||
wddm->init();
|
||||
wddm->wddmInterface.reset(wddmMockInterface);
|
||||
osContext = std::make_unique<OsContextWin>(*wddm, 0u, 1,
|
||||
HwHelper::get(platformDevices[0]->platform.eRenderCoreFamily).getGpgpuEngineInstances(*platformDevices[0])[0],
|
||||
HwHelper::get(platformDevices[0]->platform.eRenderCoreFamily).getGpgpuEngineInstances(*defaultHwInfo)[0],
|
||||
preemptionMode, false, false, false);
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ TEST_F(Wddm23Tests, whenCreateContextIsCalledThenEnableHwQueues) {
|
||||
}
|
||||
|
||||
TEST_F(Wddm23Tests, givenPreemptionModeWhenCreateHwQueueCalledThenSetGpuTimeoutIfEnabled) {
|
||||
auto defaultEngine = HwHelper::get(platformDevices[0]->platform.eRenderCoreFamily).getGpgpuEngineInstances(*platformDevices[0])[0];
|
||||
auto defaultEngine = HwHelper::get(platformDevices[0]->platform.eRenderCoreFamily).getGpgpuEngineInstances(*defaultHwInfo)[0];
|
||||
OsContextWin osContextWithoutPreemption(*osInterface->get()->getWddm(), 0u, 1, defaultEngine, PreemptionMode::Disabled,
|
||||
false, false, false);
|
||||
OsContextWin osContextWithPreemption(*osInterface->get()->getWddm(), 0u, 1, defaultEngine, PreemptionMode::MidBatch,
|
||||
|
||||
@@ -43,7 +43,7 @@ struct WddmFixture : ::testing::Test {
|
||||
rootDeviceEnvironemnt->osInterface->get()->setWddm(wddm);
|
||||
rootDeviceEnvironemnt->memoryOperationsInterface = std::make_unique<WddmMemoryOperationsHandler>(wddm);
|
||||
osInterface = rootDeviceEnvironemnt->osInterface.get();
|
||||
auto preemptionMode = PreemptionHelper::getDefaultPreemptionMode(*platformDevices[0]);
|
||||
auto preemptionMode = PreemptionHelper::getDefaultPreemptionMode(*defaultHwInfo);
|
||||
wddm->init();
|
||||
auto hwInfo = rootDeviceEnvironemnt->getHardwareInfo();
|
||||
auto engine = HwHelper::get(platformDevices[0]->platform.eRenderCoreFamily).getGpgpuEngineInstances(*hwInfo)[0];
|
||||
@@ -77,7 +77,7 @@ struct WddmFixtureWithMockGdiDll : public GdiDllFixture {
|
||||
}
|
||||
|
||||
void init() {
|
||||
auto preemptionMode = PreemptionHelper::getDefaultPreemptionMode(*platformDevices[0]);
|
||||
auto preemptionMode = PreemptionHelper::getDefaultPreemptionMode(*defaultHwInfo);
|
||||
wddmMockInterface = static_cast<WddmMockInterface20 *>(wddm->wddmInterface.release());
|
||||
wddm->init();
|
||||
wddm->wddmInterface.reset(wddmMockInterface);
|
||||
|
||||
@@ -79,7 +79,7 @@ TEST(WddmMemoryManager, NonAssignable) {
|
||||
TEST(WddmAllocationTest, givenAllocationIsTrimCandidateInOneOsContextWhenGettingTrimCandidatePositionThenReturnItsPositionAndUnusedPositionInOtherContexts) {
|
||||
MockWddmAllocation allocation;
|
||||
MockOsContext osContext(1u, 1, aub_stream::ENGINE_RCS,
|
||||
PreemptionHelper::getDefaultPreemptionMode(*platformDevices[0]),
|
||||
PreemptionHelper::getDefaultPreemptionMode(*defaultHwInfo),
|
||||
false, false, false);
|
||||
allocation.setTrimCandidateListPosition(osContext.getContextId(), 700u);
|
||||
EXPECT_EQ(trimListUnusedPosition, allocation.getTrimCandidateListPosition(0u));
|
||||
@@ -1464,11 +1464,11 @@ TEST_F(WddmMemoryManagerTest, givenWddmMemoryManagerWithRegisteredOsContextWhenC
|
||||
std::unique_ptr<CommandStreamReceiver> csr1(createCommandStream(*executionEnvironment, 1u));
|
||||
std::unique_ptr<CommandStreamReceiver> csr2(createCommandStream(*executionEnvironment, 2u));
|
||||
memoryManager->createAndRegisterOsContext(csr.get(), aub_stream::ENGINE_RCS, 1,
|
||||
PreemptionHelper::getDefaultPreemptionMode(*platformDevices[0]), false, false, false);
|
||||
PreemptionHelper::getDefaultPreemptionMode(*defaultHwInfo), false, false, false);
|
||||
memoryManager->createAndRegisterOsContext(csr1.get(), aub_stream::ENGINE_RCS, 2,
|
||||
PreemptionHelper::getDefaultPreemptionMode(*platformDevices[0]), false, false, false);
|
||||
PreemptionHelper::getDefaultPreemptionMode(*defaultHwInfo), false, false, false);
|
||||
memoryManager->createAndRegisterOsContext(csr2.get(), aub_stream::ENGINE_RCS, 3,
|
||||
PreemptionHelper::getDefaultPreemptionMode(*platformDevices[0]), false, false, false);
|
||||
PreemptionHelper::getDefaultPreemptionMode(*defaultHwInfo), false, false, false);
|
||||
EXPECT_FALSE(memoryManager->isMemoryBudgetExhausted());
|
||||
}
|
||||
|
||||
@@ -1489,11 +1489,11 @@ TEST_F(WddmMemoryManagerTest, givenWddmMemoryManagerWithRegisteredOsContextWithE
|
||||
std::unique_ptr<CommandStreamReceiver> csr1(createCommandStream(*executionEnvironment, 1u));
|
||||
std::unique_ptr<CommandStreamReceiver> csr2(createCommandStream(*executionEnvironment, 2u));
|
||||
memoryManager->createAndRegisterOsContext(csr.get(), aub_stream::ENGINE_RCS, 1,
|
||||
PreemptionHelper::getDefaultPreemptionMode(*platformDevices[0]), false, false, false);
|
||||
PreemptionHelper::getDefaultPreemptionMode(*defaultHwInfo), false, false, false);
|
||||
memoryManager->createAndRegisterOsContext(csr1.get(), aub_stream::ENGINE_RCS, 2,
|
||||
PreemptionHelper::getDefaultPreemptionMode(*platformDevices[0]), false, false, false);
|
||||
PreemptionHelper::getDefaultPreemptionMode(*defaultHwInfo), false, false, false);
|
||||
memoryManager->createAndRegisterOsContext(csr2.get(), aub_stream::ENGINE_RCS, 3,
|
||||
PreemptionHelper::getDefaultPreemptionMode(*platformDevices[0]), false, false, false);
|
||||
PreemptionHelper::getDefaultPreemptionMode(*defaultHwInfo), false, false, false);
|
||||
auto osContext = static_cast<OsContextWin *>(memoryManager->getRegisteredEngines()[1].osContext);
|
||||
osContext->getResidencyController().setMemoryBudgetExhausted();
|
||||
EXPECT_TRUE(memoryManager->isMemoryBudgetExhausted());
|
||||
@@ -1734,7 +1734,7 @@ TEST(WddmMemoryManagerCleanupTest, givenUsedTagAllocationInWddmMemoryManagerWhen
|
||||
ExecutionEnvironment &executionEnvironment = *platform()->peekExecutionEnvironment();
|
||||
auto csr = std::unique_ptr<CommandStreamReceiver>(createCommandStream(executionEnvironment, 0));
|
||||
auto wddm = new WddmMock(*executionEnvironment.rootDeviceEnvironments[0].get());
|
||||
auto preemptionMode = PreemptionHelper::getDefaultPreemptionMode(*platformDevices[0]);
|
||||
auto preemptionMode = PreemptionHelper::getDefaultPreemptionMode(*defaultHwInfo);
|
||||
wddm->init();
|
||||
|
||||
executionEnvironment.rootDeviceEnvironments[0]->osInterface = std::make_unique<OSInterface>();
|
||||
|
||||
@@ -111,7 +111,7 @@ class WddmMemoryManagerFixtureWithGmockWddm : public ExecutionEnvironmentFixture
|
||||
wddm = new NiceMock<GmockWddm>(*executionEnvironment->rootDeviceEnvironments[0].get());
|
||||
executionEnvironment->rootDeviceEnvironments[0]->osInterface = std::make_unique<OSInterface>();
|
||||
ASSERT_NE(nullptr, wddm);
|
||||
auto preemptionMode = PreemptionHelper::getDefaultPreemptionMode(*platformDevices[0]);
|
||||
auto preemptionMode = PreemptionHelper::getDefaultPreemptionMode(*defaultHwInfo);
|
||||
wddm->init();
|
||||
executionEnvironment->rootDeviceEnvironments[0]->osInterface->get()->setWddm(wddm);
|
||||
executionEnvironment->rootDeviceEnvironments[0]->memoryOperationsInterface = std::make_unique<WddmMemoryOperationsHandler>(wddm);
|
||||
|
||||
@@ -121,7 +121,7 @@ struct WddmResidencyControllerWithMockWddmTest : public WddmResidencyControllerT
|
||||
|
||||
wddm = new ::testing::NiceMock<GmockWddm>(*executionEnvironment->rootDeviceEnvironments[0].get());
|
||||
wddm->resetGdi(new MockGdi());
|
||||
auto preemptionMode = PreemptionHelper::getDefaultPreemptionMode(*platformDevices[0]);
|
||||
auto preemptionMode = PreemptionHelper::getDefaultPreemptionMode(*defaultHwInfo);
|
||||
wddm->init();
|
||||
|
||||
executionEnvironment->rootDeviceEnvironments[0]->osInterface = std::make_unique<OSInterface>();
|
||||
|
||||
@@ -287,7 +287,7 @@ TEST_F(PlatformTest, givenSupportingCl21WhenPlatformSupportsFp64ThenFillMatching
|
||||
}
|
||||
|
||||
TEST_F(PlatformTest, givenNotSupportingCl21WhenPlatformNotSupportFp64ThenNotFillMatchingSubstringAndFillMandatoryTrailingSpace) {
|
||||
HardwareInfo TesthwInfo = *platformDevices[0];
|
||||
HardwareInfo TesthwInfo = *defaultHwInfo;
|
||||
TesthwInfo.capabilityTable.ftrSupportsFP64 = false;
|
||||
TesthwInfo.capabilityTable.clVersionSupport = 10;
|
||||
|
||||
@@ -321,7 +321,7 @@ TEST_F(PlatformTest, givenFtrSupportAtomicsWhenCreateExtentionsListThenGetMatchi
|
||||
}
|
||||
|
||||
TEST_F(PlatformTest, givenSupporteImagesAndClVersion21WhenCreateExtentionsListThenDeviceReportsSpritvMediaBlockIoExtension) {
|
||||
HardwareInfo hwInfo = *platformDevices[0];
|
||||
HardwareInfo hwInfo = *defaultHwInfo;
|
||||
hwInfo.capabilityTable.supportsImages = true;
|
||||
hwInfo.capabilityTable.clVersionSupport = 21;
|
||||
std::string extensionsList = getExtensionsList(hwInfo);
|
||||
@@ -331,7 +331,7 @@ TEST_F(PlatformTest, givenSupporteImagesAndClVersion21WhenCreateExtentionsListTh
|
||||
}
|
||||
|
||||
TEST_F(PlatformTest, givenNotSupporteImagesAndClVersion21WhenCreateExtentionsListThenDeviceNotReportsSpritvMediaBlockIoExtension) {
|
||||
HardwareInfo hwInfo = *platformDevices[0];
|
||||
HardwareInfo hwInfo = *defaultHwInfo;
|
||||
hwInfo.capabilityTable.supportsImages = false;
|
||||
hwInfo.capabilityTable.clVersionSupport = 21;
|
||||
std::string extensionsList = getExtensionsList(hwInfo);
|
||||
|
||||
@@ -527,7 +527,7 @@ struct ProfilingWithPerfCountersTests : public PerformanceCountersFixture, ::tes
|
||||
PerformanceCountersFixture::SetUp();
|
||||
createPerfCounters();
|
||||
|
||||
HardwareInfo hwInfo = *platformDevices[0];
|
||||
HardwareInfo hwInfo = *defaultHwInfo;
|
||||
if (hwInfo.capabilityTable.defaultEngineType == aub_stream::EngineType::ENGINE_CCS) {
|
||||
hwInfo.featureTable.ftrCCSNode = true;
|
||||
}
|
||||
|
||||
@@ -301,7 +301,7 @@ TEST(SchedulerKernelTest, givenForcedSchedulerGwsByDebugVariableWhenSchedulerKer
|
||||
}
|
||||
|
||||
TEST(SchedulerKernelTest, givenSimulationModeWhenSchedulerKernelIsCreatedThenGwsIsSetToOneWorkgroup) {
|
||||
HardwareInfo hwInfo = *platformDevices[0];
|
||||
HardwareInfo hwInfo = *defaultHwInfo;
|
||||
hwInfo.featureTable.ftrSimulationMode = true;
|
||||
|
||||
auto device = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(&hwInfo));
|
||||
@@ -317,7 +317,7 @@ TEST(SchedulerKernelTest, givenForcedSchedulerGwsByDebugVariableAndSimulationMod
|
||||
DebugManagerStateRestore dbgRestorer;
|
||||
DebugManager.flags.SchedulerGWS.set(48);
|
||||
|
||||
HardwareInfo hwInfo = *platformDevices[0];
|
||||
HardwareInfo hwInfo = *defaultHwInfo;
|
||||
hwInfo.featureTable.ftrSimulationMode = true;
|
||||
|
||||
auto device = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(&hwInfo));
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
#include "opencl/test/unit_test/mocks/mock_platform.h"
|
||||
|
||||
void NEO::UltConfigListener::OnTestStart(const ::testing::TestInfo &testInfo) {
|
||||
referencedHwInfo = *platformDevices[0];
|
||||
referencedHwInfo = *defaultHwInfo;
|
||||
auto executionEnvironment = constructPlatform()->peekExecutionEnvironment();
|
||||
executionEnvironment->prepareRootDeviceEnvironments(1);
|
||||
executionEnvironment->rootDeviceEnvironments[0]->setHwInfo(*platformDevices);
|
||||
|
||||
@@ -18,7 +18,7 @@ typedef PreambleFixture IclSlm;
|
||||
GEN11TEST_F(IclSlm, shouldBeEnabledOnGen11) {
|
||||
typedef ICLFamily::MI_LOAD_REGISTER_IMM MI_LOAD_REGISTER_IMM;
|
||||
LinearStream &cs = linearStream;
|
||||
uint32_t l3Config = PreambleHelper<FamilyType>::getL3Config(**platformDevices, true);
|
||||
uint32_t l3Config = PreambleHelper<FamilyType>::getL3Config(*defaultHwInfo, true);
|
||||
PreambleHelper<FamilyType>::programL3(&cs, l3Config);
|
||||
|
||||
parseCommands<ICLFamily>(cs);
|
||||
@@ -33,7 +33,7 @@ GEN11TEST_F(IclSlm, shouldBeEnabledOnGen11) {
|
||||
}
|
||||
|
||||
GEN11TEST_F(IclSlm, givenGen11WhenProgramingL3ThenErrorDetectionBehaviorControlBitSet) {
|
||||
uint32_t l3Config = PreambleHelper<FamilyType>::getL3Config(**platformDevices, true);
|
||||
uint32_t l3Config = PreambleHelper<FamilyType>::getL3Config(*defaultHwInfo, true);
|
||||
|
||||
uint32_t errorDetectionBehaviorControlBit = 1 << 9;
|
||||
|
||||
@@ -42,7 +42,7 @@ GEN11TEST_F(IclSlm, givenGen11WhenProgramingL3ThenErrorDetectionBehaviorControlB
|
||||
|
||||
GEN11TEST_F(IclSlm, givenGen11IsL3Programing) {
|
||||
bool isL3Programmable =
|
||||
PreambleHelper<FamilyType>::isL3Configurable(**platformDevices);
|
||||
PreambleHelper<FamilyType>::isL3Configurable(*defaultHwInfo);
|
||||
|
||||
EXPECT_FALSE(isL3Programmable);
|
||||
}
|
||||
@@ -92,7 +92,7 @@ GEN11TEST_F(Gen11PreambleVfeState, WaOn) {
|
||||
|
||||
typedef PreambleFixture PreemptionWatermarkGen11;
|
||||
GEN11TEST_F(PreemptionWatermarkGen11, givenPreambleThenPreambleWorkAroundsIsNotProgrammed) {
|
||||
PreambleHelper<FamilyType>::programGenSpecificPreambleWorkArounds(&linearStream, **platformDevices);
|
||||
PreambleHelper<FamilyType>::programGenSpecificPreambleWorkArounds(&linearStream, *defaultHwInfo);
|
||||
|
||||
parseCommands<FamilyType>(linearStream);
|
||||
|
||||
@@ -116,7 +116,7 @@ GEN11TEST_F(ThreadArbitrationGen11, givenPreambleWhenItIsProgrammedThenThreadArb
|
||||
typedef ICLFamily::MI_LOAD_REGISTER_IMM MI_LOAD_REGISTER_IMM;
|
||||
typedef ICLFamily::PIPE_CONTROL PIPE_CONTROL;
|
||||
LinearStream &cs = linearStream;
|
||||
uint32_t l3Config = PreambleHelper<FamilyType>::getL3Config(**platformDevices, true);
|
||||
uint32_t l3Config = PreambleHelper<FamilyType>::getL3Config(*defaultHwInfo, true);
|
||||
MockDevice mockDevice;
|
||||
PreambleHelper<FamilyType>::programPreamble(&linearStream, mockDevice, l3Config,
|
||||
ThreadArbitrationPolicy::RoundRobin,
|
||||
|
||||
@@ -32,7 +32,7 @@ TGLLPTEST_F(TglLpSlm, givenTglLpWhenPreambleIsBeingProgrammedThenThreadArbitrati
|
||||
|
||||
TGLLPTEST_F(TglLpSlm, givenTglLpIsL3Programing) {
|
||||
bool isL3Programmable =
|
||||
PreambleHelper<TGLLPFamily>::isL3Configurable(**platformDevices);
|
||||
PreambleHelper<TGLLPFamily>::isL3Configurable(*defaultHwInfo);
|
||||
|
||||
EXPECT_FALSE(isL3Programmable);
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ typedef PreambleFixture BdwSlm;
|
||||
BDWTEST_F(BdwSlm, shouldBeEnabledOnGen8) {
|
||||
typedef BDWFamily::MI_LOAD_REGISTER_IMM MI_LOAD_REGISTER_IMM;
|
||||
LinearStream &cs = linearStream;
|
||||
uint32_t l3Config = PreambleHelper<BDWFamily>::getL3Config(**platformDevices, true);
|
||||
uint32_t l3Config = PreambleHelper<BDWFamily>::getL3Config(*defaultHwInfo, true);
|
||||
PreambleHelper<BDWFamily>::programL3(&cs, l3Config);
|
||||
|
||||
parseCommands<BDWFamily>(cs);
|
||||
@@ -62,10 +62,10 @@ BDWTEST_F(Gen8L3Config, givenGen8IsL3Programing) {
|
||||
bool isL3Programmable;
|
||||
|
||||
l3ConfigDifference =
|
||||
PreambleHelper<BDWFamily>::getL3Config(**platformDevices, true) !=
|
||||
PreambleHelper<BDWFamily>::getL3Config(**platformDevices, false);
|
||||
PreambleHelper<BDWFamily>::getL3Config(*defaultHwInfo, true) !=
|
||||
PreambleHelper<BDWFamily>::getL3Config(*defaultHwInfo, false);
|
||||
isL3Programmable =
|
||||
PreambleHelper<BDWFamily>::isL3Configurable(**platformDevices);
|
||||
PreambleHelper<BDWFamily>::isL3Configurable(*defaultHwInfo);
|
||||
|
||||
EXPECT_EQ(l3ConfigDifference, isL3Programmable);
|
||||
}
|
||||
@@ -95,7 +95,7 @@ BDWTEST_F(PreambleVfeState, basic) {
|
||||
typedef BDWFamily::PIPE_CONTROL PIPE_CONTROL;
|
||||
|
||||
LinearStream &cs = linearStream;
|
||||
PreambleHelper<BDWFamily>::programVFEState(&linearStream, **platformDevices, 0, 0, 168u, aub_stream::EngineType::ENGINE_RCS);
|
||||
PreambleHelper<BDWFamily>::programVFEState(&linearStream, *defaultHwInfo, 0, 0, 168u, aub_stream::EngineType::ENGINE_RCS);
|
||||
|
||||
parseCommands<BDWFamily>(cs);
|
||||
|
||||
|
||||
@@ -54,10 +54,10 @@ GEN9TEST_F(PreambleTestGen9, givenGen9IsL3Programing) {
|
||||
bool isL3Programmable;
|
||||
|
||||
l3ConfigDifference =
|
||||
PreambleHelper<FamilyType>::getL3Config(**platformDevices, true) !=
|
||||
PreambleHelper<FamilyType>::getL3Config(**platformDevices, false);
|
||||
PreambleHelper<FamilyType>::getL3Config(*defaultHwInfo, true) !=
|
||||
PreambleHelper<FamilyType>::getL3Config(*defaultHwInfo, false);
|
||||
isL3Programmable =
|
||||
PreambleHelper<FamilyType>::isL3Configurable(**platformDevices);
|
||||
PreambleHelper<FamilyType>::isL3Configurable(*defaultHwInfo);
|
||||
|
||||
EXPECT_EQ(l3ConfigDifference, isL3Programmable);
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ typedef PreambleFixture SklSlm;
|
||||
SKLTEST_F(SklSlm, shouldBeEnabledOnGen9) {
|
||||
typedef SKLFamily::MI_LOAD_REGISTER_IMM MI_LOAD_REGISTER_IMM;
|
||||
LinearStream &cs = linearStream;
|
||||
uint32_t l3Config = PreambleHelper<FamilyType>::getL3Config(**platformDevices, true);
|
||||
uint32_t l3Config = PreambleHelper<FamilyType>::getL3Config(*defaultHwInfo, true);
|
||||
|
||||
PreambleHelper<SKLFamily>::programL3(&cs, l3Config);
|
||||
|
||||
@@ -77,7 +77,7 @@ SKLTEST_F(ThreadArbitration, givenPreambleWhenItIsProgrammedThenThreadArbitratio
|
||||
typedef SKLFamily::MI_LOAD_REGISTER_IMM MI_LOAD_REGISTER_IMM;
|
||||
typedef SKLFamily::PIPE_CONTROL PIPE_CONTROL;
|
||||
LinearStream &cs = linearStream;
|
||||
uint32_t l3Config = PreambleHelper<FamilyType>::getL3Config(**platformDevices, true);
|
||||
uint32_t l3Config = PreambleHelper<FamilyType>::getL3Config(*defaultHwInfo, true);
|
||||
MockDevice mockDevice;
|
||||
PreambleHelper<SKLFamily>::programPreamble(&linearStream, mockDevice, l3Config,
|
||||
ThreadArbitrationPolicy::RoundRobin,
|
||||
|
||||
@@ -19,7 +19,7 @@ class WddmPreemptionTests : public Test<WddmFixtureWithMockGdiDll> {
|
||||
public:
|
||||
void SetUp() override {
|
||||
WddmFixtureWithMockGdiDll::SetUp();
|
||||
const HardwareInfo hwInfo = *platformDevices[0];
|
||||
const HardwareInfo hwInfo = *defaultHwInfo;
|
||||
memcpy(&hwInfoTest, &hwInfo, sizeof(hwInfoTest));
|
||||
dbgRestorer = new DebugManagerStateRestore();
|
||||
wddm->featureTable->ftrGpGpuMidThreadLevelPreempt = true;
|
||||
|
||||
@@ -183,7 +183,7 @@ HWTEST_F(PreambleTest, givenKernelDebuggingActiveAndMidThreadPreemptionWhenGetAd
|
||||
}
|
||||
|
||||
HWTEST_F(PreambleTest, givenDefaultPreambleWhenGetThreadsMaxNumberIsCalledThenMaximumNumberOfThreadsIsReturned) {
|
||||
const HardwareInfo &hwInfo = **platformDevices;
|
||||
const HardwareInfo &hwInfo = *defaultHwInfo;
|
||||
uint32_t threadsPerEU = (hwInfo.gtSystemInfo.ThreadCount / hwInfo.gtSystemInfo.EUCount) + hwInfo.capabilityTable.extraQuantityThreadsPerEU;
|
||||
uint32_t value = HwHelper::getMaxThreadsForVfe(hwInfo);
|
||||
|
||||
|
||||
@@ -519,7 +519,7 @@ INSTANTIATE_TEST_CASE_P(
|
||||
::testing::Values(PreemptionMode::Disabled, PreemptionMode::MidBatch, PreemptionMode::ThreadGroup));
|
||||
|
||||
HWTEST_F(MidThreadPreemptionTests, createCsrSurfaceNoWa) {
|
||||
HardwareInfo hwInfo = *platformDevices[0];
|
||||
HardwareInfo hwInfo = *defaultHwInfo;
|
||||
hwInfo.workaroundTable.waCSRUncachable = false;
|
||||
|
||||
std::unique_ptr<MockDevice> mockDevice(MockDevice::createWithNewExecutionEnvironment<MockDevice>(&hwInfo));
|
||||
@@ -558,7 +558,7 @@ HWTEST_F(MidThreadPreemptionTests, givenMidThreadPreemptionWhenFailingOnCsrSurfa
|
||||
}
|
||||
|
||||
HWTEST_F(MidThreadPreemptionTests, createCsrSurfaceWa) {
|
||||
HardwareInfo hwInfo = *platformDevices[0];
|
||||
HardwareInfo hwInfo = *defaultHwInfo;
|
||||
hwInfo.workaroundTable.waCSRUncachable = true;
|
||||
|
||||
std::unique_ptr<MockDevice> mockDevice(MockDevice::createWithNewExecutionEnvironment<MockDevice>(&hwInfo));
|
||||
|
||||
Reference in New Issue
Block a user