Revert "fix: if device hierarchy is flat then getSubDevicesCount return 1u"

This reverts commit cb0bb57f49.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
This commit is contained in:
Compute-Runtime-Validation
2023-10-26 15:04:39 +02:00
committed by Compute-Runtime-Automation
parent 40392b33f4
commit fca2159430
43 changed files with 79 additions and 87 deletions

View File

@@ -1596,7 +1596,7 @@ void DeviceImp::setDebugSession(DebugSession *session) {
} }
bool DeviceImp::toPhysicalSliceId(const NEO::TopologyMap &topologyMap, uint32_t &slice, uint32_t &subslice, uint32_t &deviceIndex) { bool DeviceImp::toPhysicalSliceId(const NEO::TopologyMap &topologyMap, uint32_t &slice, uint32_t &subslice, uint32_t &deviceIndex) {
auto hwInfo = neoDevice->getRootDeviceEnvironment().getHardwareInfo(); auto hwInfo = neoDevice->getRootDeviceEnvironment().getHardwareInfo();
uint32_t subDeviceCount = NEO::GfxCoreHelper::getSubDevicesCount(neoDevice->getExecutionEnvironment()->isExposingSubDevicesAsDevices(), hwInfo); uint32_t subDeviceCount = NEO::GfxCoreHelper::getSubDevicesCount(hwInfo);
auto deviceBitfield = neoDevice->getDeviceBitfield(); auto deviceBitfield = neoDevice->getDeviceBitfield();
if (topologyMap.size() == subDeviceCount && !isSubdevice) { if (topologyMap.size() == subDeviceCount && !isSubdevice) {

View File

@@ -29,7 +29,7 @@ ze_result_t LinuxRasSourceHbm::osRasGetState(zes_ras_state_t &state, ze_bool_t c
return ZE_RESULT_ERROR_UNSUPPORTED_FEATURE; return ZE_RESULT_ERROR_UNSUPPORTED_FEATURE;
} }
uint32_t subDeviceCount = 0; uint32_t subDeviceCount = 0;
subDeviceCount = NEO::GfxCoreHelper::getSubDevicesCount(false, &pDevice->getHardwareInfo()); subDeviceCount = NEO::GfxCoreHelper::getSubDevicesCount(&pDevice->getHardwareInfo());
if (clear == true) { if (clear == true) {
uint64_t errorCount = 0; uint64_t errorCount = 0;
ze_result_t result = pFwInterface->fwGetMemoryErrorCount(osRasErrorType, subDeviceCount, subdeviceId, errorCount); ze_result_t result = pFwInterface->fwGetMemoryErrorCount(osRasErrorType, subDeviceCount, subdeviceId, errorCount);

View File

@@ -58,7 +58,7 @@ ze_result_t LinuxSysmanImp::init() {
} }
DEBUG_BREAK_IF(nullptr == pSysfsAccess); DEBUG_BREAK_IF(nullptr == pSysfsAccess);
subDeviceCount = NEO::GfxCoreHelper::getSubDevicesCount(false, &pParentSysmanDeviceImp->getHardwareInfo()); subDeviceCount = NEO::GfxCoreHelper::getSubDevicesCount(&pParentSysmanDeviceImp->getHardwareInfo());
if (subDeviceCount == 1) { if (subDeviceCount == 1) {
subDeviceCount = 0; subDeviceCount = 0;
} }

View File

@@ -30,7 +30,7 @@ ze_result_t WddmSysmanImp::init() {
pKmdSysManager = KmdSysManager::create(pWddm); pKmdSysManager = KmdSysManager::create(pWddm);
UNRECOVERABLE_IF(nullptr == pKmdSysManager); UNRECOVERABLE_IF(nullptr == pKmdSysManager);
subDeviceCount = NEO::GfxCoreHelper::getSubDevicesCount(false, &pParentSysmanDeviceImp->getHardwareInfo()); subDeviceCount = NEO::GfxCoreHelper::getSubDevicesCount(&pParentSysmanDeviceImp->getHardwareInfo());
if (subDeviceCount == 1) { if (subDeviceCount == 1) {
subDeviceCount = 0; subDeviceCount = 0;
} }

View File

@@ -8,7 +8,6 @@
#include "level_zero/tools/source/sysman/sysman_imp.h" #include "level_zero/tools/source/sysman/sysman_imp.h"
#include "shared/source/device/sub_device.h" #include "shared/source/device/sub_device.h"
#include "shared/source/execution_environment/execution_environment.h"
#include "shared/source/helpers/basic_math.h" #include "shared/source/helpers/basic_math.h"
#include "shared/source/helpers/gfx_core_helper.h" #include "shared/source/helpers/gfx_core_helper.h"
#include "shared/source/helpers/hw_info.h" #include "shared/source/helpers/hw_info.h"
@@ -89,7 +88,7 @@ void SysmanDeviceImp::getSysmanDeviceInfo(zes_device_handle_t hDevice, uint32_t
// Check for root device with 1 sub-device case // Check for root device with 1 sub-device case
if (!neoDevice->isSubDevice() && neoDevice->getDeviceBitfield().count() == 1) { if (!neoDevice->isSubDevice() && neoDevice->getDeviceBitfield().count() == 1) {
subdeviceId = Math::log2(static_cast<uint32_t>(neoDevice->getDeviceBitfield().to_ulong())); subdeviceId = Math::log2(static_cast<uint32_t>(neoDevice->getDeviceBitfield().to_ulong()));
if ((NEO::GfxCoreHelper::getSubDevicesCount(neoDevice->getExecutionEnvironment()->isExposingSubDevicesAsDevices(), &neoDevice->getHardwareInfo()) > 1) && useMultiArchEnabled) { if ((NEO::GfxCoreHelper::getSubDevicesCount(&neoDevice->getHardwareInfo()) > 1) && useMultiArchEnabled) {
onSubdevice = true; onSubdevice = true;
} }
} else if (neoDevice->isSubDevice()) { } else if (neoDevice->isSubDevice()) {

View File

@@ -31,7 +31,6 @@ class SysmanMultiDeviceInfoFixture : public ::testing::Test {
hwInfo.gtSystemInfo.MultiTileArchInfo.Tile0 = 1; hwInfo.gtSystemInfo.MultiTileArchInfo.Tile0 = 1;
hwInfo.gtSystemInfo.MultiTileArchInfo.Tile1 = 1; hwInfo.gtSystemInfo.MultiTileArchInfo.Tile1 = 1;
auto executionEnvironment = MockDevice::prepareExecutionEnvironment(&hwInfo, 0u); auto executionEnvironment = MockDevice::prepareExecutionEnvironment(&hwInfo, 0u);
executionEnvironment->setExposeSubDevicesAsDevices(false);
neoDevice = NEO::MockDevice::createWithExecutionEnvironment<NEO::MockDevice>(&hwInfo, executionEnvironment, 0u); neoDevice = NEO::MockDevice::createWithExecutionEnvironment<NEO::MockDevice>(&hwInfo, executionEnvironment, 0u);
NEO::DeviceVector devices; NEO::DeviceVector devices;

View File

@@ -81,7 +81,7 @@ void MulticontextAubFixture::setUp(uint32_t numberOfTiles, EnabledCommandStreame
strfilename << renderEngineName << "_CCS0_3"; // xehp_config_name_RCS_CCS0_3.aub strfilename << renderEngineName << "_CCS0_3"; // xehp_config_name_RCS_CCS0_3.aub
} }
auto filename = AUBCommandStreamReceiver::createFullFilePath(localHwInfo, strfilename.str(), rootDeviceIndex, platform()->peekExecutionEnvironment()->isExposingSubDevicesAsDevices()); auto filename = AUBCommandStreamReceiver::createFullFilePath(localHwInfo, strfilename.str(), rootDeviceIndex);
DebugManager.flags.AUBDumpCaptureFileName.set(filename); DebugManager.flags.AUBDumpCaptureFileName.set(filename);

View File

@@ -735,7 +735,7 @@ TEST(ClDeviceHelperTest, givenNonZeroNumberOfTilesWhenPrepareDeviceEnvironmentsC
HardwareInfo hwInfo{&platform, &skuTable, &waTable, &sysInfo, capTable}; HardwareInfo hwInfo{&platform, &skuTable, &waTable, &sysInfo, capTable};
DebugManager.flags.CreateMultipleSubDevices.set(0); DebugManager.flags.CreateMultipleSubDevices.set(0);
uint32_t devicesCount = GfxCoreHelper::getSubDevicesCount(false, &hwInfo); uint32_t devicesCount = GfxCoreHelper::getSubDevicesCount(&hwInfo);
EXPECT_EQ(devicesCount, 3u); EXPECT_EQ(devicesCount, 3u);
} }
@@ -751,7 +751,7 @@ TEST(ClDeviceHelperTest, givenZeroNumberOfTilesWhenPrepareDeviceEnvironmentsCoun
HardwareInfo hwInfo{&platform, &skuTable, &waTable, &sysInfo, capTable}; HardwareInfo hwInfo{&platform, &skuTable, &waTable, &sysInfo, capTable};
DebugManager.flags.CreateMultipleSubDevices.set(0); DebugManager.flags.CreateMultipleSubDevices.set(0);
uint32_t devicesCount = GfxCoreHelper::getSubDevicesCount(false, &hwInfo); uint32_t devicesCount = GfxCoreHelper::getSubDevicesCount(&hwInfo);
EXPECT_EQ(devicesCount, 1u); EXPECT_EQ(devicesCount, 1u);
} }

View File

@@ -715,7 +715,7 @@ TEST_F(DrmTests, whenDrmIsCreatedWithMultipleSubDevicesThenCreateMultipleVirtual
GTEST_SKIP(); GTEST_SKIP();
} }
auto numSubDevices = GfxCoreHelper::getSubDevicesCount(false, rootDeviceEnvironment->getHardwareInfo()); auto numSubDevices = GfxCoreHelper::getSubDevicesCount(rootDeviceEnvironment->getHardwareInfo());
for (auto id = 0u; id < numSubDevices; id++) { for (auto id = 0u; id < numSubDevices; id++) {
EXPECT_EQ(id + 1, drm->getVirtualMemoryAddressSpace(id)); EXPECT_EQ(id + 1, drm->getVirtualMemoryAddressSpace(id));
} }
@@ -733,7 +733,7 @@ TEST_F(DrmTests, givenDebuggingEnabledWhenDrmIsCreatedThenPerContextVMIsTrueGetV
if (drm->isVmBindAvailable()) { if (drm->isVmBindAvailable()) {
EXPECT_TRUE(drm->isPerContextVMRequired()); EXPECT_TRUE(drm->isPerContextVMRequired());
auto numSubDevices = GfxCoreHelper::getSubDevicesCount(false, rootDeviceEnvironment->getHardwareInfo()); auto numSubDevices = GfxCoreHelper::getSubDevicesCount(rootDeviceEnvironment->getHardwareInfo());
for (auto id = 0u; id < numSubDevices; id++) { for (auto id = 0u; id < numSubDevices; id++) {
EXPECT_EQ(0u, drm->getVirtualMemoryAddressSpace(id)); EXPECT_EQ(0u, drm->getVirtualMemoryAddressSpace(id));
} }
@@ -762,7 +762,7 @@ TEST_F(DrmTests, givenEnabledDebuggingAndVmBindNotAvailableWhenDrmIsCreatedThenP
GTEST_SKIP(); GTEST_SKIP();
} }
auto numSubDevices = GfxCoreHelper::getSubDevicesCount(false, rootDeviceEnvironment->getHardwareInfo()); auto numSubDevices = GfxCoreHelper::getSubDevicesCount(rootDeviceEnvironment->getHardwareInfo());
for (auto id = 0u; id < numSubDevices; id++) { for (auto id = 0u; id < numSubDevices; id++) {
EXPECT_NE(0u, drm->getVirtualMemoryAddressSpace(id)); EXPECT_NE(0u, drm->getVirtualMemoryAddressSpace(id));
} }

View File

@@ -9,7 +9,6 @@
#include "shared/source/aub/aub_helper.h" #include "shared/source/aub/aub_helper.h"
#include "shared/source/debug_settings/debug_settings_manager.h" #include "shared/source/debug_settings/debug_settings_manager.h"
#include "shared/source/execution_environment/execution_environment.h"
#include "shared/source/execution_environment/root_device_environment.h" #include "shared/source/execution_environment/root_device_environment.h"
#include "shared/source/helpers/gfx_core_helper.h" #include "shared/source/helpers/gfx_core_helper.h"
#include "shared/source/helpers/hw_info.h" #include "shared/source/helpers/hw_info.h"
@@ -25,9 +24,8 @@ extern aub_stream::AubManager *createAubManager(const aub_stream::AubManagerOpti
AubCenter::AubCenter(const RootDeviceEnvironment &rootDeviceEnvironment, bool localMemoryEnabled, const std::string &aubFileName, CommandStreamReceiverType csrType) { AubCenter::AubCenter(const RootDeviceEnvironment &rootDeviceEnvironment, bool localMemoryEnabled, const std::string &aubFileName, CommandStreamReceiverType csrType) {
if (DebugManager.flags.UseAubStream.get()) { if (DebugManager.flags.UseAubStream.get()) {
auto hwInfo = rootDeviceEnvironment.getHardwareInfo(); auto hwInfo = rootDeviceEnvironment.getHardwareInfo();
bool subDevicesAsDevices = rootDeviceEnvironment.executionEnvironment.isExposingSubDevicesAsDevices(); auto devicesCount = GfxCoreHelper::getSubDevicesCount(hwInfo);
auto devicesCount = GfxCoreHelper::getSubDevicesCount(subDevicesAsDevices, hwInfo); auto memoryBankSize = AubHelper::getPerTileLocalMemorySize(hwInfo);
auto memoryBankSize = AubHelper::getPerTileLocalMemorySize(subDevicesAsDevices, hwInfo);
CommandStreamReceiverType type = csrType; CommandStreamReceiverType type = csrType;
if (DebugManager.flags.SetCommandStreamReceiver.get() >= CommandStreamReceiverType::CSR_HW) { if (DebugManager.flags.SetCommandStreamReceiver.get() >= CommandStreamReceiverType::CSR_HW) {
type = static_cast<CommandStreamReceiverType>(DebugManager.flags.SetCommandStreamReceiver.get()); type = static_cast<CommandStreamReceiverType>(DebugManager.flags.SetCommandStreamReceiver.get());

View File

@@ -42,10 +42,10 @@ uint32_t AubHelper::getMemType(uint32_t addressSpace) {
return mem_types::MEM_TYPE_SYSTEM; return mem_types::MEM_TYPE_SYSTEM;
} }
uint64_t AubHelper::getPerTileLocalMemorySize(bool subDevicesAsDevices, const HardwareInfo *pHwInfo) { uint64_t AubHelper::getPerTileLocalMemorySize(const HardwareInfo *pHwInfo) {
if (DebugManager.flags.HBMSizePerTileInGigabytes.get() > 0) { if (DebugManager.flags.HBMSizePerTileInGigabytes.get() > 0) {
return DebugManager.flags.HBMSizePerTileInGigabytes.get() * MemoryConstants::gigaByte; return DebugManager.flags.HBMSizePerTileInGigabytes.get() * MemoryConstants::gigaByte;
} }
return getTotalMemBankSize() / GfxCoreHelper::getSubDevicesCount(subDevicesAsDevices, pHwInfo); return getTotalMemBankSize() / GfxCoreHelper::getSubDevicesCount(pHwInfo);
} }
} // namespace NEO } // namespace NEO

View File

@@ -45,7 +45,7 @@ class AubHelper : public NonCopyableOrMovableClass {
static int getMemTrace(uint64_t pdEntryBits); static int getMemTrace(uint64_t pdEntryBits);
static uint64_t getPTEntryBits(uint64_t pdEntryBits); static uint64_t getPTEntryBits(uint64_t pdEntryBits);
static uint32_t getMemType(uint32_t addressSpace); static uint32_t getMemType(uint32_t addressSpace);
static uint64_t getPerTileLocalMemorySize(bool subDevicesAsDevices, const HardwareInfo *pHwInfo); static uint64_t getPerTileLocalMemorySize(const HardwareInfo *pHwInfo);
static MMIOList getAdditionalMmioList(); static MMIOList getAdditionalMmioList();
static void setTbxConfiguration(); static void setTbxConfiguration();

View File

@@ -25,13 +25,13 @@
namespace NEO { namespace NEO {
AubCommandStreamReceiverCreateFunc aubCommandStreamReceiverFactory[IGFX_MAX_CORE] = {}; AubCommandStreamReceiverCreateFunc aubCommandStreamReceiverFactory[IGFX_MAX_CORE] = {};
std::string AUBCommandStreamReceiver::createFullFilePath(const HardwareInfo &hwInfo, const std::string &filename, uint32_t rootDeviceIndex, bool subDevicesAsDevices) { std::string AUBCommandStreamReceiver::createFullFilePath(const HardwareInfo &hwInfo, const std::string &filename, uint32_t rootDeviceIndex) {
std::string hwPrefix = hardwarePrefix[hwInfo.platform.eProductFamily]; std::string hwPrefix = hardwarePrefix[hwInfo.platform.eProductFamily];
// Generate the full filename // Generate the full filename
const auto &gtSystemInfo = hwInfo.gtSystemInfo; const auto &gtSystemInfo = hwInfo.gtSystemInfo;
std::stringstream strfilename; std::stringstream strfilename;
auto subDevicesCount = GfxCoreHelper::getSubDevicesCount(subDevicesAsDevices, &hwInfo); auto subDevicesCount = GfxCoreHelper::getSubDevicesCount(&hwInfo);
uint32_t subSlicesPerSlice = gtSystemInfo.SubSliceCount / gtSystemInfo.SliceCount; uint32_t subSlicesPerSlice = gtSystemInfo.SubSliceCount / gtSystemInfo.SliceCount;
strfilename << hwPrefix << "_"; strfilename << hwPrefix << "_";
if (subDevicesCount > 1) { if (subDevicesCount > 1) {
@@ -64,7 +64,7 @@ CommandStreamReceiver *AUBCommandStreamReceiver::create(const std::string &baseN
uint32_t rootDeviceIndex, uint32_t rootDeviceIndex,
const DeviceBitfield deviceBitfield) { const DeviceBitfield deviceBitfield) {
auto hwInfo = executionEnvironment.rootDeviceEnvironments[rootDeviceIndex]->getHardwareInfo(); auto hwInfo = executionEnvironment.rootDeviceEnvironments[rootDeviceIndex]->getHardwareInfo();
std::string filePath = AUBCommandStreamReceiver::createFullFilePath(*hwInfo, baseName, rootDeviceIndex, executionEnvironment.isExposingSubDevicesAsDevices()); std::string filePath = AUBCommandStreamReceiver::createFullFilePath(*hwInfo, baseName, rootDeviceIndex);
if (DebugManager.flags.AUBDumpCaptureFileName.get() != "unk") { if (DebugManager.flags.AUBDumpCaptureFileName.get() != "unk") {
filePath.assign(DebugManager.flags.AUBDumpCaptureFileName.get()); filePath.assign(DebugManager.flags.AUBDumpCaptureFileName.get());
} }

View File

@@ -22,7 +22,7 @@ struct AUBCommandStreamReceiver {
ExecutionEnvironment &executionEnvironment, ExecutionEnvironment &executionEnvironment,
uint32_t rootDeviceIndex, uint32_t rootDeviceIndex,
const DeviceBitfield deviceBitfield); const DeviceBitfield deviceBitfield);
static std::string createFullFilePath(const HardwareInfo &hwInfo, const std::string &filename, uint32_t rootDeviceIndex, bool subDevicesAsDevices); static std::string createFullFilePath(const HardwareInfo &hwInfo, const std::string &filename, uint32_t rootDeviceIndex);
using AubFileStream = AubMemDump::AubFileStream; using AubFileStream = AubMemDump::AubFileStream;
}; };

View File

@@ -64,7 +64,7 @@ AUBCommandStreamReceiverHw<GfxFamily>::AUBCommandStreamReceiverHw(const std::str
aubManager = aubCenter->getAubManager(); aubManager = aubCenter->getAubManager();
if (!aubCenter->getPhysicalAddressAllocator()) { if (!aubCenter->getPhysicalAddressAllocator()) {
aubCenter->initPhysicalAddressAllocator(this->createPhysicalAddressAllocator(executionEnvironment.isExposingSubDevicesAsDevices(), &this->peekHwInfo())); aubCenter->initPhysicalAddressAllocator(this->createPhysicalAddressAllocator(&this->peekHwInfo()));
} }
auto physicalAddressAllocator = aubCenter->getPhysicalAddressAllocator(); auto physicalAddressAllocator = aubCenter->getPhysicalAddressAllocator();
UNRECOVERABLE_IF(nullptr == physicalAddressAllocator); UNRECOVERABLE_IF(nullptr == physicalAddressAllocator);

View File

@@ -8,7 +8,6 @@
#include "shared/source/aub_mem_dump/page_table_entry_bits.h" #include "shared/source/aub_mem_dump/page_table_entry_bits.h"
#include "shared/source/command_stream/command_stream_receiver_simulated_common_hw_base.inl" #include "shared/source/command_stream/command_stream_receiver_simulated_common_hw_base.inl"
#include "shared/source/debug_settings/debug_settings_manager.h" #include "shared/source/debug_settings/debug_settings_manager.h"
#include "shared/source/execution_environment/execution_environment.h"
#include "shared/source/helpers/gfx_core_helper.h" #include "shared/source/helpers/gfx_core_helper.h"
#include "shared/source/memory_manager/memory_banks.h" #include "shared/source/memory_manager/memory_banks.h"
#include "shared/source/memory_manager/memory_pool.h" #include "shared/source/memory_manager/memory_pool.h"
@@ -35,7 +34,7 @@ void CommandStreamReceiverSimulatedCommonHw<GfxFamily>::initGlobalMMIO() {
{0x0000490c, 0x0001}}; // XEHP_TILE_ADDR_RANGE {0x0000490c, 0x0001}}; // XEHP_TILE_ADDR_RANGE
const uint32_t numberOfTiles = 4; const uint32_t numberOfTiles = 4;
const uint32_t localMemorySizeGB = static_cast<uint32_t>(AubHelper::getPerTileLocalMemorySize(peekExecutionEnvironment().isExposingSubDevicesAsDevices(), &this->peekHwInfo()) / MemoryConstants::gigaByte); const uint32_t localMemorySizeGB = static_cast<uint32_t>(AubHelper::getPerTileLocalMemorySize(&this->peekHwInfo()) / MemoryConstants::gigaByte);
uint32_t localMemoryBaseAddressInGB = 0x0; uint32_t localMemoryBaseAddressInGB = 0x0;

View File

@@ -85,9 +85,9 @@ class CommandStreamReceiverSimulatedHw : public CommandStreamReceiverSimulatedCo
} }
return AubMemDump::AddressSpaceValues::TraceNonlocal; return AubMemDump::AddressSpaceValues::TraceNonlocal;
} }
PhysicalAddressAllocator *createPhysicalAddressAllocator(bool subDevicesAsDevices, const HardwareInfo *hwInfo) { PhysicalAddressAllocator *createPhysicalAddressAllocator(const HardwareInfo *hwInfo) {
const auto bankSize = AubHelper::getPerTileLocalMemorySize(subDevicesAsDevices, hwInfo); const auto bankSize = AubHelper::getPerTileLocalMemorySize(hwInfo);
const auto devicesCount = GfxCoreHelper::getSubDevicesCount(subDevicesAsDevices, hwInfo); const auto devicesCount = GfxCoreHelper::getSubDevicesCount(hwInfo);
return new PhysicalAddressAllocatorHw<GfxFamily>(bankSize, devicesCount); return new PhysicalAddressAllocatorHw<GfxFamily>(bankSize, devicesCount);
} }
void writeMemoryWithAubManager(GraphicsAllocation &graphicsAllocation, bool isChunkCopy, uint64_t gpuVaChunkOffset, size_t chunkSize) override { void writeMemoryWithAubManager(GraphicsAllocation &graphicsAllocation, bool isChunkCopy, uint64_t gpuVaChunkOffset, size_t chunkSize) override {

View File

@@ -41,7 +41,7 @@ TbxCommandStreamReceiverHw<GfxFamily>::TbxCommandStreamReceiverHw(ExecutionEnvir
forceSkipResourceCleanupRequired = true; forceSkipResourceCleanupRequired = true;
physicalAddressAllocator.reset(this->createPhysicalAddressAllocator(executionEnvironment.isExposingSubDevicesAsDevices(), &this->peekHwInfo())); physicalAddressAllocator.reset(this->createPhysicalAddressAllocator(&this->peekHwInfo()));
executionEnvironment.rootDeviceEnvironments[rootDeviceIndex]->initAubCenter(this->localMemoryEnabled, "", this->getType()); executionEnvironment.rootDeviceEnvironments[rootDeviceIndex]->initAubCenter(this->localMemoryEnabled, "", this->getType());
auto aubCenter = executionEnvironment.rootDeviceEnvironments[rootDeviceIndex]->aubCenter.get(); auto aubCenter = executionEnvironment.rootDeviceEnvironments[rootDeviceIndex]->aubCenter.get();
UNRECOVERABLE_IF(nullptr == aubCenter); UNRECOVERABLE_IF(nullptr == aubCenter);
@@ -173,7 +173,7 @@ CommandStreamReceiver *TbxCommandStreamReceiverHw<GfxFamily>::create(const std::
const auto &productHelper = rootDeviceEnvironment.getHelper<ProductHelper>(); const auto &productHelper = rootDeviceEnvironment.getHelper<ProductHelper>();
if (withAubDump) { if (withAubDump) {
auto localMemoryEnabled = gfxCoreHelper.getEnableLocalMemory(hwInfo); auto localMemoryEnabled = gfxCoreHelper.getEnableLocalMemory(hwInfo);
auto fullName = AUBCommandStreamReceiver::createFullFilePath(hwInfo, baseName, rootDeviceIndex, executionEnvironment.isExposingSubDevicesAsDevices()); auto fullName = AUBCommandStreamReceiver::createFullFilePath(hwInfo, baseName, rootDeviceIndex);
if (DebugManager.flags.AUBDumpCaptureFileName.get() != "unk") { if (DebugManager.flags.AUBDumpCaptureFileName.get() != "unk") {
fullName.assign(DebugManager.flags.AUBDumpCaptureFileName.get()); fullName.assign(DebugManager.flags.AUBDumpCaptureFileName.get());
} }

View File

@@ -84,7 +84,7 @@ SubDevice *Device::createEngineInstancedSubDevice(uint32_t subDeviceIndex, aub_s
bool Device::genericSubDevicesAllowed() { bool Device::genericSubDevicesAllowed() {
auto deviceMask = executionEnvironment->rootDeviceEnvironments[getRootDeviceIndex()]->deviceAffinityMask.getGenericSubDevicesMask(); auto deviceMask = executionEnvironment->rootDeviceEnvironments[getRootDeviceIndex()]->deviceAffinityMask.getGenericSubDevicesMask();
uint32_t subDeviceCount = GfxCoreHelper::getSubDevicesCount(executionEnvironment->isExposingSubDevicesAsDevices(), &getHardwareInfo()); uint32_t subDeviceCount = GfxCoreHelper::getSubDevicesCount(&getHardwareInfo());
deviceBitfield = maxNBitValue(subDeviceCount); deviceBitfield = maxNBitValue(subDeviceCount);
deviceBitfield &= deviceMask; deviceBitfield &= deviceMask;
numSubDevices = static_cast<uint32_t>(deviceBitfield.count()); numSubDevices = static_cast<uint32_t>(deviceBitfield.count());
@@ -99,7 +99,7 @@ bool Device::engineInstancedSubDevicesAllowed() {
bool notAllowed = !DebugManager.flags.EngineInstancedSubDevices.get(); bool notAllowed = !DebugManager.flags.EngineInstancedSubDevices.get();
notAllowed |= engineInstanced; notAllowed |= engineInstanced;
notAllowed |= (getHardwareInfo().gtSystemInfo.CCSInfo.NumberOfCCSEnabled < 2); notAllowed |= (getHardwareInfo().gtSystemInfo.CCSInfo.NumberOfCCSEnabled < 2);
notAllowed |= ((GfxCoreHelper::getSubDevicesCount(executionEnvironment->isExposingSubDevicesAsDevices(), &getHardwareInfo()) < 2) && (!DebugManager.flags.AllowSingleTileEngineInstancedSubDevices.get())); notAllowed |= ((GfxCoreHelper::getSubDevicesCount(&getHardwareInfo()) < 2) && (!DebugManager.flags.AllowSingleTileEngineInstancedSubDevices.get()));
if (notAllowed) { if (notAllowed) {
return false; return false;
@@ -147,7 +147,7 @@ bool Device::createEngineInstancedSubDevices() {
bool Device::createGenericSubDevices() { bool Device::createGenericSubDevices() {
UNRECOVERABLE_IF(!subdevices.empty()); UNRECOVERABLE_IF(!subdevices.empty());
uint32_t subDeviceCount = GfxCoreHelper::getSubDevicesCount(executionEnvironment->isExposingSubDevicesAsDevices(), &getHardwareInfo()); uint32_t subDeviceCount = GfxCoreHelper::getSubDevicesCount(&getHardwareInfo());
subdevices.resize(subDeviceCount, nullptr); subdevices.resize(subDeviceCount, nullptr);
@@ -758,7 +758,7 @@ bool Device::getUuid(std::array<uint8_t, ProductHelper::uuidSize> &uuid) {
uuid = this->uuid.id; uuid = this->uuid.id;
auto hwInfo = getHardwareInfo(); auto hwInfo = getHardwareInfo();
auto subDevicesCount = GfxCoreHelper::getSubDevicesCount(executionEnvironment->isExposingSubDevicesAsDevices(), &hwInfo); auto subDevicesCount = GfxCoreHelper::getSubDevicesCount(&hwInfo);
if (subDevicesCount > 1 && deviceBitfield.count() == 1) { if (subDevicesCount > 1 && deviceBitfield.count() == 1) {
// In case of no sub devices created (bits set in affinity mask == 1), return the UUID of enabled sub-device. // In case of no sub devices created (bits set in affinity mask == 1), return the UUID of enabled sub-device.
@@ -879,7 +879,7 @@ void Device::allocateRTDispatchGlobals(uint32_t maxBvhLevels) {
bool allocFailed = false; bool allocFailed = false;
const auto deviceCount = GfxCoreHelper::getSubDevicesCount(executionEnvironment->isExposingSubDevicesAsDevices(), executionEnvironment->rootDeviceEnvironments[getRootDeviceIndex()]->getHardwareInfo()); const auto deviceCount = GfxCoreHelper::getSubDevicesCount(executionEnvironment->rootDeviceEnvironments[getRootDeviceIndex()]->getHardwareInfo());
auto dispatchGlobalsSize = deviceCount * dispatchGlobalsStride; auto dispatchGlobalsSize = deviceCount * dispatchGlobalsStride;
auto rtStackSize = RayTracingHelper::getRTStackSizePerTile(*this, deviceCount, maxBvhLevels, extraBytesLocal, extraBytesGlobal); auto rtStackSize = RayTracingHelper::getRTStackSizePerTile(*this, deviceCount, maxBvhLevels, extraBytesLocal, extraBytesGlobal);

View File

@@ -83,7 +83,7 @@ void Device::initializeCaps() {
deviceInfo.globalMemSize = alignDown(deviceInfo.globalMemSize, MemoryConstants::pageSize); deviceInfo.globalMemSize = alignDown(deviceInfo.globalMemSize, MemoryConstants::pageSize);
deviceInfo.maxMemAllocSize = std::min(deviceInfo.globalMemSize, deviceInfo.maxMemAllocSize); // if globalMemSize was reduced for 32b deviceInfo.maxMemAllocSize = std::min(deviceInfo.globalMemSize, deviceInfo.maxMemAllocSize); // if globalMemSize was reduced for 32b
uint32_t subDeviceCount = gfxCoreHelper.getSubDevicesCount(this->executionEnvironment->isExposingSubDevicesAsDevices(), &getHardwareInfo()); uint32_t subDeviceCount = gfxCoreHelper.getSubDevicesCount(&getHardwareInfo());
auto &rootDeviceEnvironment = this->getRootDeviceEnvironment(); auto &rootDeviceEnvironment = this->getRootDeviceEnvironment();
bool platformImplicitScaling = gfxCoreHelper.platformSupportsImplicitScaling(rootDeviceEnvironment); bool platformImplicitScaling = gfxCoreHelper.platformSupportsImplicitScaling(rootDeviceEnvironment);

View File

@@ -113,7 +113,7 @@ Drm *Drm::create(std::unique_ptr<HwDeviceIdDrm> &&hwDeviceId, RootDeviceEnvironm
drm->isChunkingAvailable(); drm->isChunkingAvailable();
if (!drm->isPerContextVMRequired()) { if (!drm->isPerContextVMRequired()) {
if (!drm->createVirtualMemoryAddressSpace(GfxCoreHelper::getSubDevicesCount(rootDeviceEnvironment.executionEnvironment.isExposingSubDevicesAsDevices(), rootDeviceEnvironment.getHardwareInfo()))) { if (!drm->createVirtualMemoryAddressSpace(GfxCoreHelper::getSubDevicesCount(rootDeviceEnvironment.getHardwareInfo()))) {
printDebugString(DebugManager.flags.PrintDebugMessages.get(), stderr, "%s", "INFO: Device doesn't support GEM Virtual Memory\n"); printDebugString(DebugManager.flags.PrintDebugMessages.get(), stderr, "%s", "INFO: Device doesn't support GEM Virtual Memory\n");
} }
} }

View File

@@ -89,7 +89,7 @@ void ExecutionEnvironment::calculateMaxOsContextCount() {
auto hwInfo = rootDeviceEnvironment->getHardwareInfo(); auto hwInfo = rootDeviceEnvironment->getHardwareInfo();
auto &gfxCoreHelper = rootDeviceEnvironment->getHelper<GfxCoreHelper>(); auto &gfxCoreHelper = rootDeviceEnvironment->getHelper<GfxCoreHelper>();
auto osContextCount = static_cast<uint32_t>(gfxCoreHelper.getGpgpuEngineInstances(*rootDeviceEnvironment).size()); auto osContextCount = static_cast<uint32_t>(gfxCoreHelper.getGpgpuEngineInstances(*rootDeviceEnvironment).size());
auto subDevicesCount = GfxCoreHelper::getSubDevicesCount(this->isExposingSubDevicesAsDevices(), hwInfo); auto subDevicesCount = GfxCoreHelper::getSubDevicesCount(hwInfo);
auto ccsCount = hwInfo->gtSystemInfo.CCSInfo.NumberOfCCSEnabled; auto ccsCount = hwInfo->gtSystemInfo.CCSInfo.NumberOfCCSEnabled;
bool hasRootCsr = subDevicesCount > 1; bool hasRootCsr = subDevicesCount > 1;
@@ -186,7 +186,7 @@ void ExecutionEnvironment::parseAffinityMask() {
if (exposeSubDevicesAsApiDevices) { if (exposeSubDevicesAsApiDevices) {
for (uint32_t currentRootDevice = 0u; currentRootDevice < static_cast<uint32_t>(rootDeviceEnvironments.size()); currentRootDevice++) { for (uint32_t currentRootDevice = 0u; currentRootDevice < static_cast<uint32_t>(rootDeviceEnvironments.size()); currentRootDevice++) {
auto hwInfo = rootDeviceEnvironments[currentRootDevice]->getHardwareInfo(); auto hwInfo = rootDeviceEnvironments[currentRootDevice]->getHardwareInfo();
hwSubDevicesCount = GfxCoreHelper::getSubDevicesCount(this->isExposingSubDevicesAsDevices(), hwInfo); hwSubDevicesCount = GfxCoreHelper::getSubDevicesCount(hwInfo);
uint32_t currentSubDevice = 0; uint32_t currentSubDevice = 0;
mapOfIndices.push_back(std::make_tuple(currentRootDevice, currentSubDevice)); mapOfIndices.push_back(std::make_tuple(currentRootDevice, currentSubDevice));
for (currentSubDevice = 1; currentSubDevice < hwSubDevicesCount; currentSubDevice++) { for (currentSubDevice = 1; currentSubDevice < hwSubDevicesCount; currentSubDevice++) {
@@ -231,7 +231,7 @@ void ExecutionEnvironment::parseAffinityMask() {
// cards as devices // cards as devices
if (rootDeviceIndex < numRootDevices) { if (rootDeviceIndex < numRootDevices) {
auto hwInfo = rootDeviceEnvironments[rootDeviceIndex]->getHardwareInfo(); auto hwInfo = rootDeviceEnvironments[rootDeviceIndex]->getHardwareInfo();
auto subDevicesCount = GfxCoreHelper::getSubDevicesCount(this->isExposingSubDevicesAsDevices(), hwInfo); auto subDevicesCount = GfxCoreHelper::getSubDevicesCount(hwInfo);
if (subEntries.size() > 1) { if (subEntries.size() > 1) {
uint32_t subDeviceIndex = StringHelpers::toUint32t(subEntries[1]); uint32_t subDeviceIndex = StringHelpers::toUint32t(subEntries[1]);

View File

@@ -45,6 +45,9 @@ struct AllocationProperties;
struct HardwareInfo; struct HardwareInfo;
struct RootDeviceEnvironment : NonCopyableClass { struct RootDeviceEnvironment : NonCopyableClass {
protected:
std::unique_ptr<HardwareInfo> hwInfo;
public: public:
RootDeviceEnvironment(ExecutionEnvironment &executionEnvironment); RootDeviceEnvironment(ExecutionEnvironment &executionEnvironment);
MOCKABLE_VIRTUAL ~RootDeviceEnvironment(); MOCKABLE_VIRTUAL ~RootDeviceEnvironment();
@@ -120,7 +123,6 @@ struct RootDeviceEnvironment : NonCopyableClass {
bool isWddmOnLinuxEnable = false; bool isWddmOnLinuxEnable = false;
std::once_flag isDummyAllocationInitialized; std::once_flag isDummyAllocationInitialized;
std::unique_ptr<AllocationProperties> dummyBlitProperties; std::unique_ptr<AllocationProperties> dummyBlitProperties;
std::unique_ptr<HardwareInfo> hwInfo;
private: private:
std::mutex mtx; std::mutex mtx;

View File

@@ -69,10 +69,10 @@ uint32_t GfxCoreHelper::getMaxThreadsForVfe(const HardwareInfo &hwInfo) {
return maxHwThreadsReturned; return maxHwThreadsReturned;
} }
uint32_t GfxCoreHelper::getSubDevicesCount(bool subDevicesAsDevices, const HardwareInfo *pHwInfo) { uint32_t GfxCoreHelper::getSubDevicesCount(const HardwareInfo *pHwInfo) {
if (DebugManager.flags.CreateMultipleSubDevices.get() > 0) { if (DebugManager.flags.CreateMultipleSubDevices.get() > 0) {
return DebugManager.flags.CreateMultipleSubDevices.get(); return DebugManager.flags.CreateMultipleSubDevices.get();
} else if (DebugManager.flags.ReturnSubDevicesAsApiDevices.get() > 0 || subDevicesAsDevices) { } else if (DebugManager.flags.ReturnSubDevicesAsApiDevices.get() > 0) {
return 1u; return 1u;
} else if (pHwInfo->gtSystemInfo.MultiTileArchInfo.IsValid && pHwInfo->gtSystemInfo.MultiTileArchInfo.TileCount > 0u) { } else if (pHwInfo->gtSystemInfo.MultiTileArchInfo.IsValid && pHwInfo->gtSystemInfo.MultiTileArchInfo.TileCount > 0u) {
return pHwInfo->gtSystemInfo.MultiTileArchInfo.TileCount; return pHwInfo->gtSystemInfo.MultiTileArchInfo.TileCount;

View File

@@ -142,7 +142,7 @@ class GfxCoreHelper {
virtual bool unTypedDataPortCacheFlushRequired() const = 0; virtual bool unTypedDataPortCacheFlushRequired() const = 0;
virtual bool isEngineTypeRemappingToHwSpecificRequired() const = 0; virtual bool isEngineTypeRemappingToHwSpecificRequired() const = 0;
static uint32_t getSubDevicesCount(bool subDevicesAsDevices, const HardwareInfo *pHwInfo); static uint32_t getSubDevicesCount(const HardwareInfo *pHwInfo);
virtual bool isSipKernelAsHexadecimalArrayPreferred() const = 0; virtual bool isSipKernelAsHexadecimalArrayPreferred() const = 0;
virtual void setSipKernelData(uint32_t *&sipKernelBinary, size_t &kernelBinarySize) const = 0; virtual void setSipKernelData(uint32_t *&sipKernelBinary, size_t &kernelBinarySize) const = 0;

View File

@@ -28,7 +28,7 @@ StorageInfo MemoryManager::createStorageInfoFromProperties(const AllocationPrope
return storageInfo; return storageInfo;
} }
const auto deviceCount = GfxCoreHelper::getSubDevicesCount(executionEnvironment.isExposingSubDevicesAsDevices(), executionEnvironment.rootDeviceEnvironments[properties.rootDeviceIndex]->getHardwareInfo()); const auto deviceCount = GfxCoreHelper::getSubDevicesCount(executionEnvironment.rootDeviceEnvironments[properties.rootDeviceIndex]->getHardwareInfo());
const auto leastOccupiedBank = getLocalMemoryUsageBankSelector(properties.allocationType, properties.rootDeviceIndex)->getLeastOccupiedBank(properties.subDevicesBitfield); const auto leastOccupiedBank = getLocalMemoryUsageBankSelector(properties.allocationType, properties.rootDeviceIndex)->getLeastOccupiedBank(properties.subDevicesBitfield);
const auto subDevicesMask = executionEnvironment.rootDeviceEnvironments[properties.rootDeviceIndex]->deviceAffinityMask.getGenericSubDevicesMask().to_ulong(); const auto subDevicesMask = executionEnvironment.rootDeviceEnvironments[properties.rootDeviceIndex]->deviceAffinityMask.getGenericSubDevicesMask().to_ulong();

View File

@@ -55,14 +55,13 @@ MemoryManager::MemoryManager(ExecutionEnvironment &executionEnvironment) : execu
checkIsaPlacementOnceFlags = std::make_unique<std::once_flag[]>(rootEnvCount); checkIsaPlacementOnceFlags = std::make_unique<std::once_flag[]>(rootEnvCount);
isaInLocalMemory.resize(rootEnvCount); isaInLocalMemory.resize(rootEnvCount);
allRegisteredEngines.resize(rootEnvCount + 1); allRegisteredEngines.resize(rootEnvCount + 1);
bool subDevicesAsDevices = executionEnvironment.isExposingSubDevicesAsDevices();
for (uint32_t rootDeviceIndex = 0; rootDeviceIndex < rootEnvCount; ++rootDeviceIndex) { for (uint32_t rootDeviceIndex = 0; rootDeviceIndex < rootEnvCount; ++rootDeviceIndex) {
auto &rootDeviceEnvironment = *executionEnvironment.rootDeviceEnvironments[rootDeviceIndex]; auto &rootDeviceEnvironment = *executionEnvironment.rootDeviceEnvironments[rootDeviceIndex];
auto hwInfo = rootDeviceEnvironment.getHardwareInfo(); auto hwInfo = rootDeviceEnvironment.getHardwareInfo();
auto &gfxCoreHelper = rootDeviceEnvironment.getHelper<GfxCoreHelper>(); auto &gfxCoreHelper = rootDeviceEnvironment.getHelper<GfxCoreHelper>();
internalLocalMemoryUsageBankSelector.emplace_back(new LocalMemoryUsageBankSelector(GfxCoreHelper::getSubDevicesCount(subDevicesAsDevices, hwInfo))); internalLocalMemoryUsageBankSelector.emplace_back(new LocalMemoryUsageBankSelector(GfxCoreHelper::getSubDevicesCount(hwInfo)));
externalLocalMemoryUsageBankSelector.emplace_back(new LocalMemoryUsageBankSelector(GfxCoreHelper::getSubDevicesCount(subDevicesAsDevices, hwInfo))); externalLocalMemoryUsageBankSelector.emplace_back(new LocalMemoryUsageBankSelector(GfxCoreHelper::getSubDevicesCount(hwInfo)));
this->localMemorySupported.push_back(gfxCoreHelper.getEnableLocalMemory(*hwInfo)); this->localMemorySupported.push_back(gfxCoreHelper.getEnableLocalMemory(*hwInfo));
this->enable64kbpages.push_back(OSInterface::osEnabled64kbPages && hwInfo->capabilityTable.ftr64KBpages && !!DebugManager.flags.Enable64kbpages.get()); this->enable64kbpages.push_back(OSInterface::osEnabled64kbPages && hwInfo->capabilityTable.ftr64KBpages && !!DebugManager.flags.Enable64kbpages.get());

View File

@@ -662,7 +662,7 @@ GraphicsAllocation *OsAgnosticMemoryManager::allocateGraphicsMemoryInDevicePool(
uint64_t OsAgnosticMemoryManager::getLocalMemorySize(uint32_t rootDeviceIndex, uint32_t deviceBitfield) { uint64_t OsAgnosticMemoryManager::getLocalMemorySize(uint32_t rootDeviceIndex, uint32_t deviceBitfield) {
DeviceBitfield bitfield = deviceBitfield; DeviceBitfield bitfield = deviceBitfield;
return (AubHelper::getPerTileLocalMemorySize(executionEnvironment.isExposingSubDevicesAsDevices(), executionEnvironment.rootDeviceEnvironments[rootDeviceIndex]->getHardwareInfo()) * bitfield.count()); return (AubHelper::getPerTileLocalMemorySize(executionEnvironment.rootDeviceEnvironments[rootDeviceIndex]->getHardwareInfo()) * bitfield.count());
} }
double OsAgnosticMemoryManager::getPercentOfGlobalMemoryAvailable(uint32_t rootDeviceIndex) { double OsAgnosticMemoryManager::getPercentOfGlobalMemoryAvailable(uint32_t rootDeviceIndex) {

View File

@@ -1495,7 +1495,7 @@ uint64_t DrmMemoryManager::getLocalMemorySize(uint32_t rootDeviceIndex, uint32_t
} }
auto hwInfo = executionEnvironment.rootDeviceEnvironments[rootDeviceIndex]->getHardwareInfo(); auto hwInfo = executionEnvironment.rootDeviceEnvironments[rootDeviceIndex]->getHardwareInfo();
uint32_t subDevicesCount = GfxCoreHelper::getSubDevicesCount(executionEnvironment.isExposingSubDevicesAsDevices(), hwInfo); uint32_t subDevicesCount = GfxCoreHelper::getSubDevicesCount(hwInfo);
size_t size = 0; size_t size = 0;
for (uint32_t i = 0; i < subDevicesCount; i++) { for (uint32_t i = 0; i < subDevicesCount; i++) {

View File

@@ -170,10 +170,8 @@ MemoryOperationsStatus DrmMemoryOperationsHandlerBind::evictUnusedAllocations(bo
MemoryOperationsStatus DrmMemoryOperationsHandlerBind::evictUnusedAllocationsImpl(std::vector<GraphicsAllocation *> &allocationsForEviction, bool waitForCompletion) { MemoryOperationsStatus DrmMemoryOperationsHandlerBind::evictUnusedAllocationsImpl(std::vector<GraphicsAllocation *> &allocationsForEviction, bool waitForCompletion) {
const auto &engines = this->rootDeviceEnvironment.executionEnvironment.memoryManager->getRegisteredEngines(this->rootDeviceIndex); const auto &engines = this->rootDeviceEnvironment.executionEnvironment.memoryManager->getRegisteredEngines(this->rootDeviceIndex);
std::vector<GraphicsAllocation *> evictCandidates; std::vector<GraphicsAllocation *> evictCandidates;
bool subDevicesAsDevices = rootDeviceEnvironment.executionEnvironment.isExposingSubDevicesAsDevices();
for (auto subdeviceIndex = 0u; subdeviceIndex < GfxCoreHelper::getSubDevicesCount(subDevicesAsDevices, rootDeviceEnvironment.getHardwareInfo()); for (auto subdeviceIndex = 0u; subdeviceIndex < GfxCoreHelper::getSubDevicesCount(rootDeviceEnvironment.getHardwareInfo()); subdeviceIndex++) {
subdeviceIndex++) {
for (auto &allocation : allocationsForEviction) { for (auto &allocation : allocationsForEviction) {
bool evict = true; bool evict = true;

View File

@@ -1424,7 +1424,7 @@ bool WddmMemoryManager::mapGpuVirtualAddress(WddmAllocation *allocation, const v
uint64_t WddmMemoryManager::getLocalMemorySize(uint32_t rootDeviceIndex, uint32_t deviceBitfield) { uint64_t WddmMemoryManager::getLocalMemorySize(uint32_t rootDeviceIndex, uint32_t deviceBitfield) {
auto hwInfo = executionEnvironment.rootDeviceEnvironments[rootDeviceIndex]->getHardwareInfo(); auto hwInfo = executionEnvironment.rootDeviceEnvironments[rootDeviceIndex]->getHardwareInfo();
uint64_t subDevicesCount = GfxCoreHelper::getSubDevicesCount(executionEnvironment.isExposingSubDevicesAsDevices(), hwInfo); uint64_t subDevicesCount = GfxCoreHelper::getSubDevicesCount(hwInfo);
auto singleRegionSize = getWddm(rootDeviceIndex).getDedicatedVideoMemory() / subDevicesCount; auto singleRegionSize = getWddm(rootDeviceIndex).getDedicatedVideoMemory() / subDevicesCount;

View File

@@ -33,7 +33,7 @@ DrmMock::DrmMock(int fd, RootDeviceEnvironment &rootDeviceEnvironment) : Drm(std
setupIoctlHelper(rootDeviceEnvironment.getHardwareInfo()->platform.eProductFamily); setupIoctlHelper(rootDeviceEnvironment.getHardwareInfo()->platform.eProductFamily);
if (!isPerContextVMRequired()) { if (!isPerContextVMRequired()) {
createVirtualMemoryAddressSpace(GfxCoreHelper::getSubDevicesCount(rootDeviceEnvironment.executionEnvironment.isExposingSubDevicesAsDevices(), rootDeviceEnvironment.getHardwareInfo())); createVirtualMemoryAddressSpace(GfxCoreHelper::getSubDevicesCount(rootDeviceEnvironment.getHardwareInfo()));
} }
storedPreemptionSupport = storedPreemptionSupport =
I915_SCHEDULER_CAP_ENABLED | I915_SCHEDULER_CAP_ENABLED |

View File

@@ -7,7 +7,6 @@
#include "shared/test/common/os_interface/linux/device_command_stream_fixture.h" #include "shared/test/common/os_interface/linux/device_command_stream_fixture.h"
#include "shared/source/execution_environment/execution_environment.h"
#include "shared/source/execution_environment/root_device_environment.h" #include "shared/source/execution_environment/root_device_environment.h"
#include "shared/source/helpers/gfx_core_helper.h" #include "shared/source/helpers/gfx_core_helper.h"
#include "shared/source/os_interface/linux/i915.h" #include "shared/source/os_interface/linux/i915.h"
@@ -229,7 +228,7 @@ DrmMockCustom::DrmMockCustom(RootDeviceEnvironment &rootDeviceEnvironment)
ioctlExpected.contextCreate = static_cast<int>(gfxCoreHelper.getGpgpuEngineInstances(rootDeviceEnvironment).size()); ioctlExpected.contextCreate = static_cast<int>(gfxCoreHelper.getGpgpuEngineInstances(rootDeviceEnvironment).size());
ioctlExpected.contextDestroy = ioctlExpected.contextCreate.load(); ioctlExpected.contextDestroy = ioctlExpected.contextCreate.load();
setupIoctlHelper(rootDeviceEnvironment.getHardwareInfo()->platform.eProductFamily); setupIoctlHelper(rootDeviceEnvironment.getHardwareInfo()->platform.eProductFamily);
createVirtualMemoryAddressSpace(NEO::GfxCoreHelper::getSubDevicesCount(rootDeviceEnvironment.executionEnvironment.isExposingSubDevicesAsDevices(), rootDeviceEnvironment.getHardwareInfo())); createVirtualMemoryAddressSpace(NEO::GfxCoreHelper::getSubDevicesCount(rootDeviceEnvironment.getHardwareInfo()));
isVmBindAvailable(); // NOLINT(clang-analyzer-optin.cplusplus.VirtualCall) isVmBindAvailable(); // NOLINT(clang-analyzer-optin.cplusplus.VirtualCall)
reset(); reset();
} }

View File

@@ -51,7 +51,7 @@ class DrmCommandStreamTest : public ::testing::Test {
gmmHelper = executionEnvironment.rootDeviceEnvironments[0]->getGmmHelper(); gmmHelper = executionEnvironment.rootDeviceEnvironments[0]->getGmmHelper();
auto &gfxCoreHelper = executionEnvironment.rootDeviceEnvironments[0]->getHelper<GfxCoreHelper>(); auto &gfxCoreHelper = executionEnvironment.rootDeviceEnvironments[0]->getHelper<GfxCoreHelper>();
mock->createVirtualMemoryAddressSpace(GfxCoreHelper::getSubDevicesCount(executionEnvironment.isExposingSubDevicesAsDevices(), hwInfo)); mock->createVirtualMemoryAddressSpace(GfxCoreHelper::getSubDevicesCount(hwInfo));
osContext = std::make_unique<OsContextLinux>(*mock, 0, 0u, osContext = std::make_unique<OsContextLinux>(*mock, 0, 0u,
EngineDescriptorHelper::getDefaultDescriptor(gfxCoreHelper.getGpgpuEngineInstances(*executionEnvironment.rootDeviceEnvironments[0])[0], EngineDescriptorHelper::getDefaultDescriptor(gfxCoreHelper.getGpgpuEngineInstances(*executionEnvironment.rootDeviceEnvironments[0])[0],
PreemptionHelper::getDefaultPreemptionMode(*hwInfo))); PreemptionHelper::getDefaultPreemptionMode(*hwInfo)));

View File

@@ -59,7 +59,7 @@ Drm *Drm::create(std::unique_ptr<HwDeviceIdDrm> &&hwDeviceId, RootDeviceEnvironm
} }
if (!drm->isPerContextVMRequired()) { if (!drm->isPerContextVMRequired()) {
drm->createVirtualMemoryAddressSpace(GfxCoreHelper::getSubDevicesCount(rootDeviceEnvironment.executionEnvironment.isExposingSubDevicesAsDevices(), hwInfo)); drm->createVirtualMemoryAddressSpace(GfxCoreHelper::getSubDevicesCount(hwInfo));
} }
return drm; return drm;

View File

@@ -43,11 +43,11 @@ TEST(AubHelper, GivenMultipleSubDevicesWhenGettingDeviceCountThenCorrectValueIsR
HardwareInfo hwInfo{&platform, &featureTable, &workaroundTable, &sysInfo, capTable}; HardwareInfo hwInfo{&platform, &featureTable, &workaroundTable, &sysInfo, capTable};
DebugManager.flags.CreateMultipleSubDevices.set(2); DebugManager.flags.CreateMultipleSubDevices.set(2);
uint32_t devicesCount = GfxCoreHelper::getSubDevicesCount(false, &hwInfo); uint32_t devicesCount = GfxCoreHelper::getSubDevicesCount(&hwInfo);
EXPECT_EQ(devicesCount, 2u); EXPECT_EQ(devicesCount, 2u);
DebugManager.flags.CreateMultipleSubDevices.set(0); DebugManager.flags.CreateMultipleSubDevices.set(0);
devicesCount = GfxCoreHelper::getSubDevicesCount(false, &hwInfo); devicesCount = GfxCoreHelper::getSubDevicesCount(&hwInfo);
EXPECT_EQ(devicesCount, 1u); EXPECT_EQ(devicesCount, 1u);
} }
@@ -63,11 +63,11 @@ TEST(AubHelper, GivenReturnSubDevicesAsApiDevicesWhenGettingDeviceCountThenCorre
sysInfo.MultiTileArchInfo.TileCount = 2; sysInfo.MultiTileArchInfo.TileCount = 2;
HardwareInfo hwInfo{&platform, &featureTable, &workaroundTable, &sysInfo, capTable}; HardwareInfo hwInfo{&platform, &featureTable, &workaroundTable, &sysInfo, capTable};
uint32_t devicesCount = GfxCoreHelper::getSubDevicesCount(false, &hwInfo); uint32_t devicesCount = GfxCoreHelper::getSubDevicesCount(&hwInfo);
EXPECT_EQ(devicesCount, 2u); EXPECT_EQ(devicesCount, 2u);
DebugManager.flags.ReturnSubDevicesAsApiDevices.set(1); DebugManager.flags.ReturnSubDevicesAsApiDevices.set(1);
devicesCount = GfxCoreHelper::getSubDevicesCount(false, &hwInfo); devicesCount = GfxCoreHelper::getSubDevicesCount(&hwInfo);
EXPECT_EQ(devicesCount, 1u); EXPECT_EQ(devicesCount, 1u);
} }
@@ -102,13 +102,13 @@ TEST(AubHelper, WhenHBMSizePerTileInGigabytesIsSetThenGetMemBankSizeReturnsCorre
sysInfo.MultiTileArchInfo.IsValid = true; sysInfo.MultiTileArchInfo.IsValid = true;
sysInfo.MultiTileArchInfo.TileCount = 1; sysInfo.MultiTileArchInfo.TileCount = 1;
EXPECT_EQ(8 * MemoryConstants::gigaByte, AubHelper::getPerTileLocalMemorySize(false, &hwInfo)); EXPECT_EQ(8 * MemoryConstants::gigaByte, AubHelper::getPerTileLocalMemorySize(&hwInfo));
sysInfo.MultiTileArchInfo.TileCount = 2; sysInfo.MultiTileArchInfo.TileCount = 2;
EXPECT_EQ(8 * MemoryConstants::gigaByte, AubHelper::getPerTileLocalMemorySize(false, &hwInfo)); EXPECT_EQ(8 * MemoryConstants::gigaByte, AubHelper::getPerTileLocalMemorySize(&hwInfo));
sysInfo.MultiTileArchInfo.TileCount = 4; sysInfo.MultiTileArchInfo.TileCount = 4;
EXPECT_EQ(8 * MemoryConstants::gigaByte, AubHelper::getPerTileLocalMemorySize(false, &hwInfo)); EXPECT_EQ(8 * MemoryConstants::gigaByte, AubHelper::getPerTileLocalMemorySize(&hwInfo));
} }
TEST(AubHelper, WhenHBMSizePerTileInGigabytesIsNotSetThenGetMemBankSizeReturnsCorrectValue) { TEST(AubHelper, WhenHBMSizePerTileInGigabytesIsNotSetThenGetMemBankSizeReturnsCorrectValue) {
@@ -117,13 +117,13 @@ TEST(AubHelper, WhenHBMSizePerTileInGigabytesIsNotSetThenGetMemBankSizeReturnsCo
sysInfo.MultiTileArchInfo.IsValid = true; sysInfo.MultiTileArchInfo.IsValid = true;
sysInfo.MultiTileArchInfo.TileCount = 1; sysInfo.MultiTileArchInfo.TileCount = 1;
EXPECT_EQ(32 * MemoryConstants::gigaByte, AubHelper::getPerTileLocalMemorySize(false, &hwInfo)); EXPECT_EQ(32 * MemoryConstants::gigaByte, AubHelper::getPerTileLocalMemorySize(&hwInfo));
sysInfo.MultiTileArchInfo.TileCount = 2; sysInfo.MultiTileArchInfo.TileCount = 2;
EXPECT_EQ(16 * MemoryConstants::gigaByte, AubHelper::getPerTileLocalMemorySize(false, &hwInfo)); EXPECT_EQ(16 * MemoryConstants::gigaByte, AubHelper::getPerTileLocalMemorySize(&hwInfo));
sysInfo.MultiTileArchInfo.TileCount = 4; sysInfo.MultiTileArchInfo.TileCount = 4;
EXPECT_EQ(8 * MemoryConstants::gigaByte, AubHelper::getPerTileLocalMemorySize(false, &hwInfo)); EXPECT_EQ(8 * MemoryConstants::gigaByte, AubHelper::getPerTileLocalMemorySize(&hwInfo));
} }
using AubHelperHwTest = Test<DeviceFixture>; using AubHelperHwTest = Test<DeviceFixture>;

View File

@@ -1007,7 +1007,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenSshSize
HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenPhysicalAddressAllocatorIsCreatedThenItIsNotNull) { HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenPhysicalAddressAllocatorIsCreatedThenItIsNotNull) {
MockAubCsr<FamilyType> aubCsr("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield()); MockAubCsr<FamilyType> aubCsr("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
std::unique_ptr<PhysicalAddressAllocator> allocator(aubCsr.createPhysicalAddressAllocator(pDevice->getExecutionEnvironment()->isExposingSubDevicesAsDevices(), &hardwareInfo)); std::unique_ptr<PhysicalAddressAllocator> allocator(aubCsr.createPhysicalAddressAllocator(&hardwareInfo));
ASSERT_NE(nullptr, allocator); ASSERT_NE(nullptr, allocator);
} }

View File

@@ -231,7 +231,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterAubCommandStreamReceiverTests, whenPhys
std::unique_ptr<MockAubCsrXeHPAndLater<FamilyType>> aubCsr(new MockAubCsrXeHPAndLater<FamilyType>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield())); std::unique_ptr<MockAubCsrXeHPAndLater<FamilyType>> aubCsr(new MockAubCsrXeHPAndLater<FamilyType>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield()));
auto physicalAddressAllocator = std::unique_ptr<PhysicalAddressAllocator>(aubCsr->createPhysicalAddressAllocator(pDevice->getExecutionEnvironment()->isExposingSubDevicesAsDevices(), &pDevice->getHardwareInfo())); auto physicalAddressAllocator = std::unique_ptr<PhysicalAddressAllocator>(aubCsr->createPhysicalAddressAllocator(&pDevice->getHardwareInfo()));
auto allocator = reinterpret_cast<PhysicalAddressAllocatorHw<FamilyType> *>(physicalAddressAllocator.get()); auto allocator = reinterpret_cast<PhysicalAddressAllocatorHw<FamilyType> *>(physicalAddressAllocator.get());
EXPECT_EQ(32 * MemoryConstants::gigaByte, allocator->getBankSize()); EXPECT_EQ(32 * MemoryConstants::gigaByte, allocator->getBankSize());
@@ -245,7 +245,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterAubCommandStreamReceiverTests, whenPhys
std::unique_ptr<MockAubCsrXeHPAndLater<FamilyType>> aubCsr(new MockAubCsrXeHPAndLater<FamilyType>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield())); std::unique_ptr<MockAubCsrXeHPAndLater<FamilyType>> aubCsr(new MockAubCsrXeHPAndLater<FamilyType>("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield()));
auto physicalAddressAllocator = std::unique_ptr<PhysicalAddressAllocator>(aubCsr->createPhysicalAddressAllocator(pDevice->getExecutionEnvironment()->isExposingSubDevicesAsDevices(), &pDevice->getHardwareInfo())); auto physicalAddressAllocator = std::unique_ptr<PhysicalAddressAllocator>(aubCsr->createPhysicalAddressAllocator(&pDevice->getHardwareInfo()));
auto allocator = reinterpret_cast<PhysicalAddressAllocatorHw<FamilyType> *>(physicalAddressAllocator.get()); auto allocator = reinterpret_cast<PhysicalAddressAllocatorHw<FamilyType> *>(physicalAddressAllocator.get());
EXPECT_EQ(8 * MemoryConstants::gigaByte, allocator->getBankSize()); EXPECT_EQ(8 * MemoryConstants::gigaByte, allocator->getBankSize());

View File

@@ -953,17 +953,17 @@ HWTEST_F(AubFileStreamTests, givenAubCommandStreamReceiverWhenCreateFullFilePath
DebugManagerStateRestore stateRestore; DebugManagerStateRestore stateRestore;
DebugManager.flags.CreateMultipleSubDevices.set(1); DebugManager.flags.CreateMultipleSubDevices.set(1);
auto fullName = AUBCommandStreamReceiver::createFullFilePath(*defaultHwInfo, "aubfile", mockRootDeviceIndex, false); auto fullName = AUBCommandStreamReceiver::createFullFilePath(*defaultHwInfo, "aubfile", mockRootDeviceIndex);
EXPECT_EQ(std::string::npos, fullName.find("tx")); EXPECT_EQ(std::string::npos, fullName.find("tx"));
DebugManager.flags.CreateMultipleSubDevices.set(2); DebugManager.flags.CreateMultipleSubDevices.set(2);
fullName = AUBCommandStreamReceiver::createFullFilePath(*defaultHwInfo, "aubfile", mockRootDeviceIndex, false); fullName = AUBCommandStreamReceiver::createFullFilePath(*defaultHwInfo, "aubfile", mockRootDeviceIndex);
EXPECT_NE(std::string::npos, fullName.find("2tx")); EXPECT_NE(std::string::npos, fullName.find("2tx"));
} }
HWTEST_F(AubFileStreamTests, givenAubCommandStreamReceiverWhenCreateFullFilePathIsCalledThenFileNameIsExtendedWithRootDeviceIndex) { HWTEST_F(AubFileStreamTests, givenAubCommandStreamReceiverWhenCreateFullFilePathIsCalledThenFileNameIsExtendedWithRootDeviceIndex) {
uint32_t rootDeviceIndex = 123u; uint32_t rootDeviceIndex = 123u;
auto fullName = AUBCommandStreamReceiver::createFullFilePath(*defaultHwInfo, "aubfile", rootDeviceIndex, false); auto fullName = AUBCommandStreamReceiver::createFullFilePath(*defaultHwInfo, "aubfile", rootDeviceIndex);
EXPECT_NE(std::string::npos, fullName.find("_123_aubfile.aub")); EXPECT_NE(std::string::npos, fullName.find("_123_aubfile.aub"));
} }
@@ -971,7 +971,7 @@ HWTEST_F(AubFileStreamTests, givenGenerateAubFilePerProcessIdDebugFlagAndAubComm
DebugManagerStateRestore stateRestore; DebugManagerStateRestore stateRestore;
DebugManager.flags.GenerateAubFilePerProcessId.set(1); DebugManager.flags.GenerateAubFilePerProcessId.set(1);
auto fullName = AUBCommandStreamReceiver::createFullFilePath(*defaultHwInfo, "aubfile", 1u, false); auto fullName = AUBCommandStreamReceiver::createFullFilePath(*defaultHwInfo, "aubfile", 1u);
std::stringstream strExtendedFileName; std::stringstream strExtendedFileName;
strExtendedFileName << "_1_aubfile_PID_" << SysCalls::getProcessId() << ".aub"; strExtendedFileName << "_1_aubfile_PID_" << SysCalls::getProcessId() << ".aub";
EXPECT_NE(std::string::npos, fullName.find(strExtendedFileName.str())); EXPECT_NE(std::string::npos, fullName.find(strExtendedFileName.str()));

View File

@@ -446,7 +446,7 @@ HWTEST_F(TbxCommandSteamSimpleTest, whenTbxCommandStreamReceiverIsCreatedThenPPG
HWTEST_F(TbxCommandSteamSimpleTest, givenTbxCommandStreamReceiverWhenPhysicalAddressAllocatorIsCreatedThenItIsNotNull) { HWTEST_F(TbxCommandSteamSimpleTest, givenTbxCommandStreamReceiverWhenPhysicalAddressAllocatorIsCreatedThenItIsNotNull) {
MockTbxCsr<FamilyType> tbxCsr(*pDevice->executionEnvironment, pDevice->getDeviceBitfield()); MockTbxCsr<FamilyType> tbxCsr(*pDevice->executionEnvironment, pDevice->getDeviceBitfield());
std::unique_ptr<PhysicalAddressAllocator> allocator(tbxCsr.createPhysicalAddressAllocator(pDevice->getExecutionEnvironment()->isExposingSubDevicesAsDevices(), &hardwareInfo)); std::unique_ptr<PhysicalAddressAllocator> allocator(tbxCsr.createPhysicalAddressAllocator(&hardwareInfo));
ASSERT_NE(nullptr, allocator); ASSERT_NE(nullptr, allocator);
} }
@@ -615,7 +615,7 @@ HWTEST_F(TbxCommandStreamTests, givenTbxCsrWhenCreatedWithAubDumpThenFileNameIsE
auto rootDeviceEnvironment = static_cast<MockRootDeviceEnvironment *>(executionEnvironment.rootDeviceEnvironments[0].get()); auto rootDeviceEnvironment = static_cast<MockRootDeviceEnvironment *>(executionEnvironment.rootDeviceEnvironments[0].get());
setMockAubCenter(*rootDeviceEnvironment, CommandStreamReceiverType::CSR_TBX); setMockAubCenter(*rootDeviceEnvironment, CommandStreamReceiverType::CSR_TBX);
auto fullName = AUBCommandStreamReceiver::createFullFilePath(*defaultHwInfo, "aubfile", mockRootDeviceIndex, executionEnvironment.isExposingSubDevicesAsDevices()); auto fullName = AUBCommandStreamReceiver::createFullFilePath(*defaultHwInfo, "aubfile", mockRootDeviceIndex);
std::unique_ptr<TbxCommandStreamReceiverHw<FamilyType>> tbxCsr(reinterpret_cast<TbxCommandStreamReceiverHw<FamilyType> *>(TbxCommandStreamReceiver::create("aubfile", true, executionEnvironment, 0, 1))); std::unique_ptr<TbxCommandStreamReceiverHw<FamilyType>> tbxCsr(reinterpret_cast<TbxCommandStreamReceiverHw<FamilyType> *>(TbxCommandStreamReceiver::create("aubfile", true, executionEnvironment, 0, 1)));
EXPECT_STREQ(fullName.c_str(), rootDeviceEnvironment->aubFileNameReceived.c_str()); EXPECT_STREQ(fullName.c_str(), rootDeviceEnvironment->aubFileNameReceived.c_str());

View File

@@ -455,12 +455,12 @@ TEST(ExecutionEnvironment, whenCalculateMaxOsContexCountThenGlobalVariableHasPro
{ {
DebugManager.flags.EngineInstancedSubDevices.set(false); DebugManager.flags.EngineInstancedSubDevices.set(false);
MockExecutionEnvironment executionEnvironment(nullptr, true, numRootDevices); MockExecutionEnvironment executionEnvironment(nullptr, true, numRootDevices);
bool subDevicesAsDevices = executionEnvironment.isExposingSubDevicesAsDevices();
for (const auto &rootDeviceEnvironment : executionEnvironment.rootDeviceEnvironments) { for (const auto &rootDeviceEnvironment : executionEnvironment.rootDeviceEnvironments) {
auto hwInfo = rootDeviceEnvironment->getHardwareInfo(); auto hwInfo = rootDeviceEnvironment->getHardwareInfo();
auto &gfxCoreHelper = rootDeviceEnvironment->getHelper<GfxCoreHelper>(); auto &gfxCoreHelper = rootDeviceEnvironment->getHelper<GfxCoreHelper>();
auto osContextCount = gfxCoreHelper.getGpgpuEngineInstances(*rootDeviceEnvironment).size(); auto osContextCount = gfxCoreHelper.getGpgpuEngineInstances(*rootDeviceEnvironment).size();
auto subDevicesCount = GfxCoreHelper::getSubDevicesCount(subDevicesAsDevices, hwInfo); auto subDevicesCount = GfxCoreHelper::getSubDevicesCount(hwInfo);
bool hasRootCsr = subDevicesCount > 1; bool hasRootCsr = subDevicesCount > 1;
auto ccsCount = hwInfo->gtSystemInfo.CCSInfo.NumberOfCCSEnabled; auto ccsCount = hwInfo->gtSystemInfo.CCSInfo.NumberOfCCSEnabled;

View File

@@ -626,11 +626,10 @@ TEST(MemoryManagerTest, givenOsAgnosticMemoryManagerWhenGetLocalMemoryIsCalledTh
auto hwInfo = executionEnvironment.rootDeviceEnvironments[0]->getHardwareInfo(); auto hwInfo = executionEnvironment.rootDeviceEnvironments[0]->getHardwareInfo();
bool subDevicesAsDevices = executionEnvironment.isExposingSubDevicesAsDevices(); auto subDevicesCount = GfxCoreHelper::getSubDevicesCount(hwInfo);
auto subDevicesCount = GfxCoreHelper::getSubDevicesCount(subDevicesAsDevices, hwInfo);
uint32_t deviceMask = static_cast<uint32_t>(maxNBitValue(subDevicesCount)); uint32_t deviceMask = static_cast<uint32_t>(maxNBitValue(subDevicesCount));
EXPECT_EQ(AubHelper::getPerTileLocalMemorySize(subDevicesAsDevices, hwInfo) * subDevicesCount, memoryManager.getLocalMemorySize(0u, deviceMask)); EXPECT_EQ(AubHelper::getPerTileLocalMemorySize(hwInfo) * subDevicesCount, memoryManager.getLocalMemorySize(0u, deviceMask));
} }
HWTEST_F(MemoryManagerTests, givenEnabledLocalMemoryWhenAllocatingKernelIsaThenLocalMemoryPoolIsUsed) { HWTEST_F(MemoryManagerTests, givenEnabledLocalMemoryWhenAllocatingKernelIsaThenLocalMemoryPoolIsUsed) {

View File

@@ -315,7 +315,7 @@ class DrmCommandStreamForceTileTest : public ::testing::Test {
executionEnvironment.rootDeviceEnvironments[0]->memoryOperationsInterface = DrmMemoryOperationsHandler::create(*mock, 0u); executionEnvironment.rootDeviceEnvironments[0]->memoryOperationsInterface = DrmMemoryOperationsHandler::create(*mock, 0u);
executionEnvironment.rootDeviceEnvironments[0]->initGmm(); executionEnvironment.rootDeviceEnvironments[0]->initGmm();
mock->createVirtualMemoryAddressSpace(GfxCoreHelper::getSubDevicesCount(executionEnvironment.isExposingSubDevicesAsDevices(), hwInfo)); mock->createVirtualMemoryAddressSpace(GfxCoreHelper::getSubDevicesCount(hwInfo));
auto &gfxCoreHelper = executionEnvironment.rootDeviceEnvironments[0]->getHelper<GfxCoreHelper>(); auto &gfxCoreHelper = executionEnvironment.rootDeviceEnvironments[0]->getHelper<GfxCoreHelper>();
osContext = std::make_unique<OsContextLinux>(*mock, rootDeviceIndex, 0, osContext = std::make_unique<OsContextLinux>(*mock, rootDeviceIndex, 0,
@@ -421,7 +421,7 @@ struct DrmImplicitScalingCommandStreamTest : ::testing::Test {
constexpr int mockFd = 33; constexpr int mockFd = 33;
drm = new DrmMock(mockFd, *executionEnvironment->rootDeviceEnvironments[0]); drm = new DrmMock(mockFd, *executionEnvironment->rootDeviceEnvironments[0]);
drm->setupIoctlHelper(hwInfo->platform.eProductFamily); drm->setupIoctlHelper(hwInfo->platform.eProductFamily);
drm->createVirtualMemoryAddressSpace(GfxCoreHelper::getSubDevicesCount(executionEnvironment->isExposingSubDevicesAsDevices(), hwInfo.get())); drm->createVirtualMemoryAddressSpace(GfxCoreHelper::getSubDevicesCount(hwInfo.get()));
executionEnvironment->rootDeviceEnvironments[0]->setHwInfoAndInitHelpers(hwInfo.get()); executionEnvironment->rootDeviceEnvironments[0]->setHwInfoAndInitHelpers(hwInfo.get());
executionEnvironment->rootDeviceEnvironments[0]->osInterface = std::make_unique<OSInterface>(); executionEnvironment->rootDeviceEnvironments[0]->osInterface = std::make_unique<OSInterface>();
executionEnvironment->rootDeviceEnvironments[0]->osInterface->setDriverModel(std::unique_ptr<DriverModel>(drm)); executionEnvironment->rootDeviceEnvironments[0]->osInterface->setDriverModel(std::unique_ptr<DriverModel>(drm));