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:
parent
40392b33f4
commit
fca2159430
|
@ -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) {
|
||||
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();
|
||||
|
||||
if (topologyMap.size() == subDeviceCount && !isSubdevice) {
|
||||
|
|
|
@ -29,7 +29,7 @@ ze_result_t LinuxRasSourceHbm::osRasGetState(zes_ras_state_t &state, ze_bool_t c
|
|||
return ZE_RESULT_ERROR_UNSUPPORTED_FEATURE;
|
||||
}
|
||||
uint32_t subDeviceCount = 0;
|
||||
subDeviceCount = NEO::GfxCoreHelper::getSubDevicesCount(false, &pDevice->getHardwareInfo());
|
||||
subDeviceCount = NEO::GfxCoreHelper::getSubDevicesCount(&pDevice->getHardwareInfo());
|
||||
if (clear == true) {
|
||||
uint64_t errorCount = 0;
|
||||
ze_result_t result = pFwInterface->fwGetMemoryErrorCount(osRasErrorType, subDeviceCount, subdeviceId, errorCount);
|
||||
|
|
|
@ -58,7 +58,7 @@ ze_result_t LinuxSysmanImp::init() {
|
|||
}
|
||||
DEBUG_BREAK_IF(nullptr == pSysfsAccess);
|
||||
|
||||
subDeviceCount = NEO::GfxCoreHelper::getSubDevicesCount(false, &pParentSysmanDeviceImp->getHardwareInfo());
|
||||
subDeviceCount = NEO::GfxCoreHelper::getSubDevicesCount(&pParentSysmanDeviceImp->getHardwareInfo());
|
||||
if (subDeviceCount == 1) {
|
||||
subDeviceCount = 0;
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@ ze_result_t WddmSysmanImp::init() {
|
|||
pKmdSysManager = KmdSysManager::create(pWddm);
|
||||
UNRECOVERABLE_IF(nullptr == pKmdSysManager);
|
||||
|
||||
subDeviceCount = NEO::GfxCoreHelper::getSubDevicesCount(false, &pParentSysmanDeviceImp->getHardwareInfo());
|
||||
subDeviceCount = NEO::GfxCoreHelper::getSubDevicesCount(&pParentSysmanDeviceImp->getHardwareInfo());
|
||||
if (subDeviceCount == 1) {
|
||||
subDeviceCount = 0;
|
||||
}
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
#include "level_zero/tools/source/sysman/sysman_imp.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/gfx_core_helper.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
|
||||
if (!neoDevice->isSubDevice() && neoDevice->getDeviceBitfield().count() == 1) {
|
||||
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;
|
||||
}
|
||||
} else if (neoDevice->isSubDevice()) {
|
||||
|
|
|
@ -31,7 +31,6 @@ class SysmanMultiDeviceInfoFixture : public ::testing::Test {
|
|||
hwInfo.gtSystemInfo.MultiTileArchInfo.Tile0 = 1;
|
||||
hwInfo.gtSystemInfo.MultiTileArchInfo.Tile1 = 1;
|
||||
auto executionEnvironment = MockDevice::prepareExecutionEnvironment(&hwInfo, 0u);
|
||||
executionEnvironment->setExposeSubDevicesAsDevices(false);
|
||||
neoDevice = NEO::MockDevice::createWithExecutionEnvironment<NEO::MockDevice>(&hwInfo, executionEnvironment, 0u);
|
||||
|
||||
NEO::DeviceVector devices;
|
||||
|
|
|
@ -81,7 +81,7 @@ void MulticontextAubFixture::setUp(uint32_t numberOfTiles, EnabledCommandStreame
|
|||
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);
|
||||
|
||||
|
|
|
@ -735,7 +735,7 @@ TEST(ClDeviceHelperTest, givenNonZeroNumberOfTilesWhenPrepareDeviceEnvironmentsC
|
|||
HardwareInfo hwInfo{&platform, &skuTable, &waTable, &sysInfo, capTable};
|
||||
DebugManager.flags.CreateMultipleSubDevices.set(0);
|
||||
|
||||
uint32_t devicesCount = GfxCoreHelper::getSubDevicesCount(false, &hwInfo);
|
||||
uint32_t devicesCount = GfxCoreHelper::getSubDevicesCount(&hwInfo);
|
||||
EXPECT_EQ(devicesCount, 3u);
|
||||
}
|
||||
|
||||
|
@ -751,7 +751,7 @@ TEST(ClDeviceHelperTest, givenZeroNumberOfTilesWhenPrepareDeviceEnvironmentsCoun
|
|||
HardwareInfo hwInfo{&platform, &skuTable, &waTable, &sysInfo, capTable};
|
||||
DebugManager.flags.CreateMultipleSubDevices.set(0);
|
||||
|
||||
uint32_t devicesCount = GfxCoreHelper::getSubDevicesCount(false, &hwInfo);
|
||||
uint32_t devicesCount = GfxCoreHelper::getSubDevicesCount(&hwInfo);
|
||||
EXPECT_EQ(devicesCount, 1u);
|
||||
}
|
||||
|
||||
|
|
|
@ -715,7 +715,7 @@ TEST_F(DrmTests, whenDrmIsCreatedWithMultipleSubDevicesThenCreateMultipleVirtual
|
|||
GTEST_SKIP();
|
||||
}
|
||||
|
||||
auto numSubDevices = GfxCoreHelper::getSubDevicesCount(false, rootDeviceEnvironment->getHardwareInfo());
|
||||
auto numSubDevices = GfxCoreHelper::getSubDevicesCount(rootDeviceEnvironment->getHardwareInfo());
|
||||
for (auto id = 0u; id < numSubDevices; id++) {
|
||||
EXPECT_EQ(id + 1, drm->getVirtualMemoryAddressSpace(id));
|
||||
}
|
||||
|
@ -733,7 +733,7 @@ TEST_F(DrmTests, givenDebuggingEnabledWhenDrmIsCreatedThenPerContextVMIsTrueGetV
|
|||
if (drm->isVmBindAvailable()) {
|
||||
EXPECT_TRUE(drm->isPerContextVMRequired());
|
||||
|
||||
auto numSubDevices = GfxCoreHelper::getSubDevicesCount(false, rootDeviceEnvironment->getHardwareInfo());
|
||||
auto numSubDevices = GfxCoreHelper::getSubDevicesCount(rootDeviceEnvironment->getHardwareInfo());
|
||||
for (auto id = 0u; id < numSubDevices; id++) {
|
||||
EXPECT_EQ(0u, drm->getVirtualMemoryAddressSpace(id));
|
||||
}
|
||||
|
@ -762,7 +762,7 @@ TEST_F(DrmTests, givenEnabledDebuggingAndVmBindNotAvailableWhenDrmIsCreatedThenP
|
|||
GTEST_SKIP();
|
||||
}
|
||||
|
||||
auto numSubDevices = GfxCoreHelper::getSubDevicesCount(false, rootDeviceEnvironment->getHardwareInfo());
|
||||
auto numSubDevices = GfxCoreHelper::getSubDevicesCount(rootDeviceEnvironment->getHardwareInfo());
|
||||
for (auto id = 0u; id < numSubDevices; id++) {
|
||||
EXPECT_NE(0u, drm->getVirtualMemoryAddressSpace(id));
|
||||
}
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
|
||||
#include "shared/source/aub/aub_helper.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/helpers/gfx_core_helper.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) {
|
||||
if (DebugManager.flags.UseAubStream.get()) {
|
||||
auto hwInfo = rootDeviceEnvironment.getHardwareInfo();
|
||||
bool subDevicesAsDevices = rootDeviceEnvironment.executionEnvironment.isExposingSubDevicesAsDevices();
|
||||
auto devicesCount = GfxCoreHelper::getSubDevicesCount(subDevicesAsDevices, hwInfo);
|
||||
auto memoryBankSize = AubHelper::getPerTileLocalMemorySize(subDevicesAsDevices, hwInfo);
|
||||
auto devicesCount = GfxCoreHelper::getSubDevicesCount(hwInfo);
|
||||
auto memoryBankSize = AubHelper::getPerTileLocalMemorySize(hwInfo);
|
||||
CommandStreamReceiverType type = csrType;
|
||||
if (DebugManager.flags.SetCommandStreamReceiver.get() >= CommandStreamReceiverType::CSR_HW) {
|
||||
type = static_cast<CommandStreamReceiverType>(DebugManager.flags.SetCommandStreamReceiver.get());
|
||||
|
|
|
@ -42,10 +42,10 @@ uint32_t AubHelper::getMemType(uint32_t addressSpace) {
|
|||
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) {
|
||||
return DebugManager.flags.HBMSizePerTileInGigabytes.get() * MemoryConstants::gigaByte;
|
||||
}
|
||||
return getTotalMemBankSize() / GfxCoreHelper::getSubDevicesCount(subDevicesAsDevices, pHwInfo);
|
||||
return getTotalMemBankSize() / GfxCoreHelper::getSubDevicesCount(pHwInfo);
|
||||
}
|
||||
} // namespace NEO
|
||||
|
|
|
@ -45,7 +45,7 @@ class AubHelper : public NonCopyableOrMovableClass {
|
|||
static int getMemTrace(uint64_t pdEntryBits);
|
||||
static uint64_t getPTEntryBits(uint64_t pdEntryBits);
|
||||
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 void setTbxConfiguration();
|
||||
|
||||
|
|
|
@ -25,13 +25,13 @@
|
|||
namespace NEO {
|
||||
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];
|
||||
|
||||
// Generate the full filename
|
||||
const auto >SystemInfo = hwInfo.gtSystemInfo;
|
||||
std::stringstream strfilename;
|
||||
auto subDevicesCount = GfxCoreHelper::getSubDevicesCount(subDevicesAsDevices, &hwInfo);
|
||||
auto subDevicesCount = GfxCoreHelper::getSubDevicesCount(&hwInfo);
|
||||
uint32_t subSlicesPerSlice = gtSystemInfo.SubSliceCount / gtSystemInfo.SliceCount;
|
||||
strfilename << hwPrefix << "_";
|
||||
if (subDevicesCount > 1) {
|
||||
|
@ -64,7 +64,7 @@ CommandStreamReceiver *AUBCommandStreamReceiver::create(const std::string &baseN
|
|||
uint32_t rootDeviceIndex,
|
||||
const DeviceBitfield deviceBitfield) {
|
||||
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") {
|
||||
filePath.assign(DebugManager.flags.AUBDumpCaptureFileName.get());
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@ struct AUBCommandStreamReceiver {
|
|||
ExecutionEnvironment &executionEnvironment,
|
||||
uint32_t rootDeviceIndex,
|
||||
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;
|
||||
};
|
||||
|
|
|
@ -64,7 +64,7 @@ AUBCommandStreamReceiverHw<GfxFamily>::AUBCommandStreamReceiverHw(const std::str
|
|||
aubManager = aubCenter->getAubManager();
|
||||
|
||||
if (!aubCenter->getPhysicalAddressAllocator()) {
|
||||
aubCenter->initPhysicalAddressAllocator(this->createPhysicalAddressAllocator(executionEnvironment.isExposingSubDevicesAsDevices(), &this->peekHwInfo()));
|
||||
aubCenter->initPhysicalAddressAllocator(this->createPhysicalAddressAllocator(&this->peekHwInfo()));
|
||||
}
|
||||
auto physicalAddressAllocator = aubCenter->getPhysicalAddressAllocator();
|
||||
UNRECOVERABLE_IF(nullptr == physicalAddressAllocator);
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
#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/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/memory_manager/memory_banks.h"
|
||||
#include "shared/source/memory_manager/memory_pool.h"
|
||||
|
@ -35,7 +34,7 @@ void CommandStreamReceiverSimulatedCommonHw<GfxFamily>::initGlobalMMIO() {
|
|||
{0x0000490c, 0x0001}}; // XEHP_TILE_ADDR_RANGE
|
||||
|
||||
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;
|
||||
|
||||
|
|
|
@ -85,9 +85,9 @@ class CommandStreamReceiverSimulatedHw : public CommandStreamReceiverSimulatedCo
|
|||
}
|
||||
return AubMemDump::AddressSpaceValues::TraceNonlocal;
|
||||
}
|
||||
PhysicalAddressAllocator *createPhysicalAddressAllocator(bool subDevicesAsDevices, const HardwareInfo *hwInfo) {
|
||||
const auto bankSize = AubHelper::getPerTileLocalMemorySize(subDevicesAsDevices, hwInfo);
|
||||
const auto devicesCount = GfxCoreHelper::getSubDevicesCount(subDevicesAsDevices, hwInfo);
|
||||
PhysicalAddressAllocator *createPhysicalAddressAllocator(const HardwareInfo *hwInfo) {
|
||||
const auto bankSize = AubHelper::getPerTileLocalMemorySize(hwInfo);
|
||||
const auto devicesCount = GfxCoreHelper::getSubDevicesCount(hwInfo);
|
||||
return new PhysicalAddressAllocatorHw<GfxFamily>(bankSize, devicesCount);
|
||||
}
|
||||
void writeMemoryWithAubManager(GraphicsAllocation &graphicsAllocation, bool isChunkCopy, uint64_t gpuVaChunkOffset, size_t chunkSize) override {
|
||||
|
|
|
@ -41,7 +41,7 @@ TbxCommandStreamReceiverHw<GfxFamily>::TbxCommandStreamReceiverHw(ExecutionEnvir
|
|||
|
||||
forceSkipResourceCleanupRequired = true;
|
||||
|
||||
physicalAddressAllocator.reset(this->createPhysicalAddressAllocator(executionEnvironment.isExposingSubDevicesAsDevices(), &this->peekHwInfo()));
|
||||
physicalAddressAllocator.reset(this->createPhysicalAddressAllocator(&this->peekHwInfo()));
|
||||
executionEnvironment.rootDeviceEnvironments[rootDeviceIndex]->initAubCenter(this->localMemoryEnabled, "", this->getType());
|
||||
auto aubCenter = executionEnvironment.rootDeviceEnvironments[rootDeviceIndex]->aubCenter.get();
|
||||
UNRECOVERABLE_IF(nullptr == aubCenter);
|
||||
|
@ -173,7 +173,7 @@ CommandStreamReceiver *TbxCommandStreamReceiverHw<GfxFamily>::create(const std::
|
|||
const auto &productHelper = rootDeviceEnvironment.getHelper<ProductHelper>();
|
||||
if (withAubDump) {
|
||||
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") {
|
||||
fullName.assign(DebugManager.flags.AUBDumpCaptureFileName.get());
|
||||
}
|
||||
|
|
|
@ -84,7 +84,7 @@ SubDevice *Device::createEngineInstancedSubDevice(uint32_t subDeviceIndex, aub_s
|
|||
|
||||
bool Device::genericSubDevicesAllowed() {
|
||||
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 &= deviceMask;
|
||||
numSubDevices = static_cast<uint32_t>(deviceBitfield.count());
|
||||
|
@ -99,7 +99,7 @@ bool Device::engineInstancedSubDevicesAllowed() {
|
|||
bool notAllowed = !DebugManager.flags.EngineInstancedSubDevices.get();
|
||||
notAllowed |= engineInstanced;
|
||||
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) {
|
||||
return false;
|
||||
|
@ -147,7 +147,7 @@ bool Device::createEngineInstancedSubDevices() {
|
|||
|
||||
bool Device::createGenericSubDevices() {
|
||||
UNRECOVERABLE_IF(!subdevices.empty());
|
||||
uint32_t subDeviceCount = GfxCoreHelper::getSubDevicesCount(executionEnvironment->isExposingSubDevicesAsDevices(), &getHardwareInfo());
|
||||
uint32_t subDeviceCount = GfxCoreHelper::getSubDevicesCount(&getHardwareInfo());
|
||||
|
||||
subdevices.resize(subDeviceCount, nullptr);
|
||||
|
||||
|
@ -758,7 +758,7 @@ bool Device::getUuid(std::array<uint8_t, ProductHelper::uuidSize> &uuid) {
|
|||
uuid = this->uuid.id;
|
||||
|
||||
auto hwInfo = getHardwareInfo();
|
||||
auto subDevicesCount = GfxCoreHelper::getSubDevicesCount(executionEnvironment->isExposingSubDevicesAsDevices(), &hwInfo);
|
||||
auto subDevicesCount = GfxCoreHelper::getSubDevicesCount(&hwInfo);
|
||||
|
||||
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.
|
||||
|
@ -879,7 +879,7 @@ void Device::allocateRTDispatchGlobals(uint32_t maxBvhLevels) {
|
|||
|
||||
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 rtStackSize = RayTracingHelper::getRTStackSizePerTile(*this, deviceCount, maxBvhLevels, extraBytesLocal, extraBytesGlobal);
|
||||
|
||||
|
|
|
@ -83,7 +83,7 @@ void Device::initializeCaps() {
|
|||
deviceInfo.globalMemSize = alignDown(deviceInfo.globalMemSize, MemoryConstants::pageSize);
|
||||
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();
|
||||
bool platformImplicitScaling = gfxCoreHelper.platformSupportsImplicitScaling(rootDeviceEnvironment);
|
||||
|
||||
|
|
|
@ -113,7 +113,7 @@ Drm *Drm::create(std::unique_ptr<HwDeviceIdDrm> &&hwDeviceId, RootDeviceEnvironm
|
|||
drm->isChunkingAvailable();
|
||||
|
||||
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");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -89,7 +89,7 @@ void ExecutionEnvironment::calculateMaxOsContextCount() {
|
|||
auto hwInfo = rootDeviceEnvironment->getHardwareInfo();
|
||||
auto &gfxCoreHelper = rootDeviceEnvironment->getHelper<GfxCoreHelper>();
|
||||
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;
|
||||
bool hasRootCsr = subDevicesCount > 1;
|
||||
|
||||
|
@ -186,7 +186,7 @@ void ExecutionEnvironment::parseAffinityMask() {
|
|||
if (exposeSubDevicesAsApiDevices) {
|
||||
for (uint32_t currentRootDevice = 0u; currentRootDevice < static_cast<uint32_t>(rootDeviceEnvironments.size()); currentRootDevice++) {
|
||||
auto hwInfo = rootDeviceEnvironments[currentRootDevice]->getHardwareInfo();
|
||||
hwSubDevicesCount = GfxCoreHelper::getSubDevicesCount(this->isExposingSubDevicesAsDevices(), hwInfo);
|
||||
hwSubDevicesCount = GfxCoreHelper::getSubDevicesCount(hwInfo);
|
||||
uint32_t currentSubDevice = 0;
|
||||
mapOfIndices.push_back(std::make_tuple(currentRootDevice, currentSubDevice));
|
||||
for (currentSubDevice = 1; currentSubDevice < hwSubDevicesCount; currentSubDevice++) {
|
||||
|
@ -231,7 +231,7 @@ void ExecutionEnvironment::parseAffinityMask() {
|
|||
// cards as devices
|
||||
if (rootDeviceIndex < numRootDevices) {
|
||||
auto hwInfo = rootDeviceEnvironments[rootDeviceIndex]->getHardwareInfo();
|
||||
auto subDevicesCount = GfxCoreHelper::getSubDevicesCount(this->isExposingSubDevicesAsDevices(), hwInfo);
|
||||
auto subDevicesCount = GfxCoreHelper::getSubDevicesCount(hwInfo);
|
||||
|
||||
if (subEntries.size() > 1) {
|
||||
uint32_t subDeviceIndex = StringHelpers::toUint32t(subEntries[1]);
|
||||
|
|
|
@ -45,6 +45,9 @@ struct AllocationProperties;
|
|||
struct HardwareInfo;
|
||||
|
||||
struct RootDeviceEnvironment : NonCopyableClass {
|
||||
protected:
|
||||
std::unique_ptr<HardwareInfo> hwInfo;
|
||||
|
||||
public:
|
||||
RootDeviceEnvironment(ExecutionEnvironment &executionEnvironment);
|
||||
MOCKABLE_VIRTUAL ~RootDeviceEnvironment();
|
||||
|
@ -120,7 +123,6 @@ struct RootDeviceEnvironment : NonCopyableClass {
|
|||
bool isWddmOnLinuxEnable = false;
|
||||
std::once_flag isDummyAllocationInitialized;
|
||||
std::unique_ptr<AllocationProperties> dummyBlitProperties;
|
||||
std::unique_ptr<HardwareInfo> hwInfo;
|
||||
|
||||
private:
|
||||
std::mutex mtx;
|
||||
|
|
|
@ -69,10 +69,10 @@ uint32_t GfxCoreHelper::getMaxThreadsForVfe(const HardwareInfo &hwInfo) {
|
|||
return maxHwThreadsReturned;
|
||||
}
|
||||
|
||||
uint32_t GfxCoreHelper::getSubDevicesCount(bool subDevicesAsDevices, const HardwareInfo *pHwInfo) {
|
||||
uint32_t GfxCoreHelper::getSubDevicesCount(const HardwareInfo *pHwInfo) {
|
||||
if (DebugManager.flags.CreateMultipleSubDevices.get() > 0) {
|
||||
return DebugManager.flags.CreateMultipleSubDevices.get();
|
||||
} else if (DebugManager.flags.ReturnSubDevicesAsApiDevices.get() > 0 || subDevicesAsDevices) {
|
||||
} else if (DebugManager.flags.ReturnSubDevicesAsApiDevices.get() > 0) {
|
||||
return 1u;
|
||||
} else if (pHwInfo->gtSystemInfo.MultiTileArchInfo.IsValid && pHwInfo->gtSystemInfo.MultiTileArchInfo.TileCount > 0u) {
|
||||
return pHwInfo->gtSystemInfo.MultiTileArchInfo.TileCount;
|
||||
|
|
|
@ -142,7 +142,7 @@ class GfxCoreHelper {
|
|||
virtual bool unTypedDataPortCacheFlushRequired() 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 void setSipKernelData(uint32_t *&sipKernelBinary, size_t &kernelBinarySize) const = 0;
|
||||
|
|
|
@ -28,7 +28,7 @@ StorageInfo MemoryManager::createStorageInfoFromProperties(const AllocationPrope
|
|||
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 subDevicesMask = executionEnvironment.rootDeviceEnvironments[properties.rootDeviceIndex]->deviceAffinityMask.getGenericSubDevicesMask().to_ulong();
|
||||
|
||||
|
|
|
@ -55,14 +55,13 @@ MemoryManager::MemoryManager(ExecutionEnvironment &executionEnvironment) : execu
|
|||
checkIsaPlacementOnceFlags = std::make_unique<std::once_flag[]>(rootEnvCount);
|
||||
isaInLocalMemory.resize(rootEnvCount);
|
||||
allRegisteredEngines.resize(rootEnvCount + 1);
|
||||
bool subDevicesAsDevices = executionEnvironment.isExposingSubDevicesAsDevices();
|
||||
|
||||
for (uint32_t rootDeviceIndex = 0; rootDeviceIndex < rootEnvCount; ++rootDeviceIndex) {
|
||||
auto &rootDeviceEnvironment = *executionEnvironment.rootDeviceEnvironments[rootDeviceIndex];
|
||||
auto hwInfo = rootDeviceEnvironment.getHardwareInfo();
|
||||
auto &gfxCoreHelper = rootDeviceEnvironment.getHelper<GfxCoreHelper>();
|
||||
internalLocalMemoryUsageBankSelector.emplace_back(new LocalMemoryUsageBankSelector(GfxCoreHelper::getSubDevicesCount(subDevicesAsDevices, hwInfo)));
|
||||
externalLocalMemoryUsageBankSelector.emplace_back(new LocalMemoryUsageBankSelector(GfxCoreHelper::getSubDevicesCount(subDevicesAsDevices, hwInfo)));
|
||||
internalLocalMemoryUsageBankSelector.emplace_back(new LocalMemoryUsageBankSelector(GfxCoreHelper::getSubDevicesCount(hwInfo)));
|
||||
externalLocalMemoryUsageBankSelector.emplace_back(new LocalMemoryUsageBankSelector(GfxCoreHelper::getSubDevicesCount(hwInfo)));
|
||||
this->localMemorySupported.push_back(gfxCoreHelper.getEnableLocalMemory(*hwInfo));
|
||||
this->enable64kbpages.push_back(OSInterface::osEnabled64kbPages && hwInfo->capabilityTable.ftr64KBpages && !!DebugManager.flags.Enable64kbpages.get());
|
||||
|
||||
|
|
|
@ -662,7 +662,7 @@ GraphicsAllocation *OsAgnosticMemoryManager::allocateGraphicsMemoryInDevicePool(
|
|||
|
||||
uint64_t OsAgnosticMemoryManager::getLocalMemorySize(uint32_t rootDeviceIndex, uint32_t 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) {
|
||||
|
|
|
@ -1495,7 +1495,7 @@ uint64_t DrmMemoryManager::getLocalMemorySize(uint32_t rootDeviceIndex, uint32_t
|
|||
}
|
||||
|
||||
auto hwInfo = executionEnvironment.rootDeviceEnvironments[rootDeviceIndex]->getHardwareInfo();
|
||||
uint32_t subDevicesCount = GfxCoreHelper::getSubDevicesCount(executionEnvironment.isExposingSubDevicesAsDevices(), hwInfo);
|
||||
uint32_t subDevicesCount = GfxCoreHelper::getSubDevicesCount(hwInfo);
|
||||
size_t size = 0;
|
||||
|
||||
for (uint32_t i = 0; i < subDevicesCount; i++) {
|
||||
|
|
|
@ -170,10 +170,8 @@ MemoryOperationsStatus DrmMemoryOperationsHandlerBind::evictUnusedAllocations(bo
|
|||
MemoryOperationsStatus DrmMemoryOperationsHandlerBind::evictUnusedAllocationsImpl(std::vector<GraphicsAllocation *> &allocationsForEviction, bool waitForCompletion) {
|
||||
const auto &engines = this->rootDeviceEnvironment.executionEnvironment.memoryManager->getRegisteredEngines(this->rootDeviceIndex);
|
||||
std::vector<GraphicsAllocation *> evictCandidates;
|
||||
bool subDevicesAsDevices = rootDeviceEnvironment.executionEnvironment.isExposingSubDevicesAsDevices();
|
||||
|
||||
for (auto subdeviceIndex = 0u; subdeviceIndex < GfxCoreHelper::getSubDevicesCount(subDevicesAsDevices, rootDeviceEnvironment.getHardwareInfo());
|
||||
subdeviceIndex++) {
|
||||
for (auto subdeviceIndex = 0u; subdeviceIndex < GfxCoreHelper::getSubDevicesCount(rootDeviceEnvironment.getHardwareInfo()); subdeviceIndex++) {
|
||||
for (auto &allocation : allocationsForEviction) {
|
||||
bool evict = true;
|
||||
|
||||
|
|
|
@ -1424,7 +1424,7 @@ bool WddmMemoryManager::mapGpuVirtualAddress(WddmAllocation *allocation, const v
|
|||
|
||||
uint64_t WddmMemoryManager::getLocalMemorySize(uint32_t rootDeviceIndex, uint32_t deviceBitfield) {
|
||||
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;
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ DrmMock::DrmMock(int fd, RootDeviceEnvironment &rootDeviceEnvironment) : Drm(std
|
|||
|
||||
setupIoctlHelper(rootDeviceEnvironment.getHardwareInfo()->platform.eProductFamily);
|
||||
if (!isPerContextVMRequired()) {
|
||||
createVirtualMemoryAddressSpace(GfxCoreHelper::getSubDevicesCount(rootDeviceEnvironment.executionEnvironment.isExposingSubDevicesAsDevices(), rootDeviceEnvironment.getHardwareInfo()));
|
||||
createVirtualMemoryAddressSpace(GfxCoreHelper::getSubDevicesCount(rootDeviceEnvironment.getHardwareInfo()));
|
||||
}
|
||||
storedPreemptionSupport =
|
||||
I915_SCHEDULER_CAP_ENABLED |
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
|
||||
#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/helpers/gfx_core_helper.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.contextDestroy = ioctlExpected.contextCreate.load();
|
||||
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)
|
||||
reset();
|
||||
}
|
||||
|
|
|
@ -51,7 +51,7 @@ class DrmCommandStreamTest : public ::testing::Test {
|
|||
gmmHelper = executionEnvironment.rootDeviceEnvironments[0]->getGmmHelper();
|
||||
|
||||
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,
|
||||
EngineDescriptorHelper::getDefaultDescriptor(gfxCoreHelper.getGpgpuEngineInstances(*executionEnvironment.rootDeviceEnvironments[0])[0],
|
||||
PreemptionHelper::getDefaultPreemptionMode(*hwInfo)));
|
||||
|
|
|
@ -59,7 +59,7 @@ Drm *Drm::create(std::unique_ptr<HwDeviceIdDrm> &&hwDeviceId, RootDeviceEnvironm
|
|||
}
|
||||
|
||||
if (!drm->isPerContextVMRequired()) {
|
||||
drm->createVirtualMemoryAddressSpace(GfxCoreHelper::getSubDevicesCount(rootDeviceEnvironment.executionEnvironment.isExposingSubDevicesAsDevices(), hwInfo));
|
||||
drm->createVirtualMemoryAddressSpace(GfxCoreHelper::getSubDevicesCount(hwInfo));
|
||||
}
|
||||
|
||||
return drm;
|
||||
|
|
|
@ -43,11 +43,11 @@ TEST(AubHelper, GivenMultipleSubDevicesWhenGettingDeviceCountThenCorrectValueIsR
|
|||
HardwareInfo hwInfo{&platform, &featureTable, &workaroundTable, &sysInfo, capTable};
|
||||
DebugManager.flags.CreateMultipleSubDevices.set(2);
|
||||
|
||||
uint32_t devicesCount = GfxCoreHelper::getSubDevicesCount(false, &hwInfo);
|
||||
uint32_t devicesCount = GfxCoreHelper::getSubDevicesCount(&hwInfo);
|
||||
EXPECT_EQ(devicesCount, 2u);
|
||||
|
||||
DebugManager.flags.CreateMultipleSubDevices.set(0);
|
||||
devicesCount = GfxCoreHelper::getSubDevicesCount(false, &hwInfo);
|
||||
devicesCount = GfxCoreHelper::getSubDevicesCount(&hwInfo);
|
||||
EXPECT_EQ(devicesCount, 1u);
|
||||
}
|
||||
|
||||
|
@ -63,11 +63,11 @@ TEST(AubHelper, GivenReturnSubDevicesAsApiDevicesWhenGettingDeviceCountThenCorre
|
|||
sysInfo.MultiTileArchInfo.TileCount = 2;
|
||||
HardwareInfo hwInfo{&platform, &featureTable, &workaroundTable, &sysInfo, capTable};
|
||||
|
||||
uint32_t devicesCount = GfxCoreHelper::getSubDevicesCount(false, &hwInfo);
|
||||
uint32_t devicesCount = GfxCoreHelper::getSubDevicesCount(&hwInfo);
|
||||
EXPECT_EQ(devicesCount, 2u);
|
||||
|
||||
DebugManager.flags.ReturnSubDevicesAsApiDevices.set(1);
|
||||
devicesCount = GfxCoreHelper::getSubDevicesCount(false, &hwInfo);
|
||||
devicesCount = GfxCoreHelper::getSubDevicesCount(&hwInfo);
|
||||
EXPECT_EQ(devicesCount, 1u);
|
||||
}
|
||||
|
||||
|
@ -102,13 +102,13 @@ TEST(AubHelper, WhenHBMSizePerTileInGigabytesIsSetThenGetMemBankSizeReturnsCorre
|
|||
|
||||
sysInfo.MultiTileArchInfo.IsValid = true;
|
||||
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;
|
||||
EXPECT_EQ(8 * MemoryConstants::gigaByte, AubHelper::getPerTileLocalMemorySize(false, &hwInfo));
|
||||
EXPECT_EQ(8 * MemoryConstants::gigaByte, AubHelper::getPerTileLocalMemorySize(&hwInfo));
|
||||
|
||||
sysInfo.MultiTileArchInfo.TileCount = 4;
|
||||
EXPECT_EQ(8 * MemoryConstants::gigaByte, AubHelper::getPerTileLocalMemorySize(false, &hwInfo));
|
||||
EXPECT_EQ(8 * MemoryConstants::gigaByte, AubHelper::getPerTileLocalMemorySize(&hwInfo));
|
||||
}
|
||||
|
||||
TEST(AubHelper, WhenHBMSizePerTileInGigabytesIsNotSetThenGetMemBankSizeReturnsCorrectValue) {
|
||||
|
@ -117,13 +117,13 @@ TEST(AubHelper, WhenHBMSizePerTileInGigabytesIsNotSetThenGetMemBankSizeReturnsCo
|
|||
|
||||
sysInfo.MultiTileArchInfo.IsValid = true;
|
||||
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;
|
||||
EXPECT_EQ(16 * MemoryConstants::gigaByte, AubHelper::getPerTileLocalMemorySize(false, &hwInfo));
|
||||
EXPECT_EQ(16 * MemoryConstants::gigaByte, AubHelper::getPerTileLocalMemorySize(&hwInfo));
|
||||
|
||||
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>;
|
||||
|
|
|
@ -1007,7 +1007,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenSshSize
|
|||
|
||||
HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenPhysicalAddressAllocatorIsCreatedThenItIsNotNull) {
|
||||
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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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()));
|
||||
|
||||
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());
|
||||
|
||||
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()));
|
||||
|
||||
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());
|
||||
|
||||
EXPECT_EQ(8 * MemoryConstants::gigaByte, allocator->getBankSize());
|
||||
|
|
|
@ -953,17 +953,17 @@ HWTEST_F(AubFileStreamTests, givenAubCommandStreamReceiverWhenCreateFullFilePath
|
|||
DebugManagerStateRestore stateRestore;
|
||||
|
||||
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"));
|
||||
|
||||
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"));
|
||||
}
|
||||
|
||||
HWTEST_F(AubFileStreamTests, givenAubCommandStreamReceiverWhenCreateFullFilePathIsCalledThenFileNameIsExtendedWithRootDeviceIndex) {
|
||||
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"));
|
||||
}
|
||||
|
||||
|
@ -971,7 +971,7 @@ HWTEST_F(AubFileStreamTests, givenGenerateAubFilePerProcessIdDebugFlagAndAubComm
|
|||
DebugManagerStateRestore stateRestore;
|
||||
|
||||
DebugManager.flags.GenerateAubFilePerProcessId.set(1);
|
||||
auto fullName = AUBCommandStreamReceiver::createFullFilePath(*defaultHwInfo, "aubfile", 1u, false);
|
||||
auto fullName = AUBCommandStreamReceiver::createFullFilePath(*defaultHwInfo, "aubfile", 1u);
|
||||
std::stringstream strExtendedFileName;
|
||||
strExtendedFileName << "_1_aubfile_PID_" << SysCalls::getProcessId() << ".aub";
|
||||
EXPECT_NE(std::string::npos, fullName.find(strExtendedFileName.str()));
|
||||
|
|
|
@ -446,7 +446,7 @@ HWTEST_F(TbxCommandSteamSimpleTest, whenTbxCommandStreamReceiverIsCreatedThenPPG
|
|||
|
||||
HWTEST_F(TbxCommandSteamSimpleTest, givenTbxCommandStreamReceiverWhenPhysicalAddressAllocatorIsCreatedThenItIsNotNull) {
|
||||
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);
|
||||
}
|
||||
|
||||
|
@ -615,7 +615,7 @@ HWTEST_F(TbxCommandStreamTests, givenTbxCsrWhenCreatedWithAubDumpThenFileNameIsE
|
|||
auto rootDeviceEnvironment = static_cast<MockRootDeviceEnvironment *>(executionEnvironment.rootDeviceEnvironments[0].get());
|
||||
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)));
|
||||
EXPECT_STREQ(fullName.c_str(), rootDeviceEnvironment->aubFileNameReceived.c_str());
|
||||
|
|
|
@ -455,12 +455,12 @@ TEST(ExecutionEnvironment, whenCalculateMaxOsContexCountThenGlobalVariableHasPro
|
|||
{
|
||||
DebugManager.flags.EngineInstancedSubDevices.set(false);
|
||||
MockExecutionEnvironment executionEnvironment(nullptr, true, numRootDevices);
|
||||
bool subDevicesAsDevices = executionEnvironment.isExposingSubDevicesAsDevices();
|
||||
|
||||
for (const auto &rootDeviceEnvironment : executionEnvironment.rootDeviceEnvironments) {
|
||||
auto hwInfo = rootDeviceEnvironment->getHardwareInfo();
|
||||
auto &gfxCoreHelper = rootDeviceEnvironment->getHelper<GfxCoreHelper>();
|
||||
auto osContextCount = gfxCoreHelper.getGpgpuEngineInstances(*rootDeviceEnvironment).size();
|
||||
auto subDevicesCount = GfxCoreHelper::getSubDevicesCount(subDevicesAsDevices, hwInfo);
|
||||
auto subDevicesCount = GfxCoreHelper::getSubDevicesCount(hwInfo);
|
||||
bool hasRootCsr = subDevicesCount > 1;
|
||||
auto ccsCount = hwInfo->gtSystemInfo.CCSInfo.NumberOfCCSEnabled;
|
||||
|
||||
|
|
|
@ -626,11 +626,10 @@ TEST(MemoryManagerTest, givenOsAgnosticMemoryManagerWhenGetLocalMemoryIsCalledTh
|
|||
|
||||
auto hwInfo = executionEnvironment.rootDeviceEnvironments[0]->getHardwareInfo();
|
||||
|
||||
bool subDevicesAsDevices = executionEnvironment.isExposingSubDevicesAsDevices();
|
||||
auto subDevicesCount = GfxCoreHelper::getSubDevicesCount(subDevicesAsDevices, hwInfo);
|
||||
auto subDevicesCount = GfxCoreHelper::getSubDevicesCount(hwInfo);
|
||||
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) {
|
||||
|
|
|
@ -315,7 +315,7 @@ class DrmCommandStreamForceTileTest : public ::testing::Test {
|
|||
executionEnvironment.rootDeviceEnvironments[0]->memoryOperationsInterface = DrmMemoryOperationsHandler::create(*mock, 0u);
|
||||
executionEnvironment.rootDeviceEnvironments[0]->initGmm();
|
||||
|
||||
mock->createVirtualMemoryAddressSpace(GfxCoreHelper::getSubDevicesCount(executionEnvironment.isExposingSubDevicesAsDevices(), hwInfo));
|
||||
mock->createVirtualMemoryAddressSpace(GfxCoreHelper::getSubDevicesCount(hwInfo));
|
||||
|
||||
auto &gfxCoreHelper = executionEnvironment.rootDeviceEnvironments[0]->getHelper<GfxCoreHelper>();
|
||||
osContext = std::make_unique<OsContextLinux>(*mock, rootDeviceIndex, 0,
|
||||
|
@ -421,7 +421,7 @@ struct DrmImplicitScalingCommandStreamTest : ::testing::Test {
|
|||
constexpr int mockFd = 33;
|
||||
drm = new DrmMock(mockFd, *executionEnvironment->rootDeviceEnvironments[0]);
|
||||
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]->osInterface = std::make_unique<OSInterface>();
|
||||
executionEnvironment->rootDeviceEnvironments[0]->osInterface->setDriverModel(std::unique_ptr<DriverModel>(drm));
|
||||
|
|
Loading…
Reference in New Issue