mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-20 08:38:13 +08:00
fix: ReturnSubDevicesAsApiDevices flag being ignored
Proper subdevice count being returned now in GfxCoreHelper path, as previous method ignored the usage of the ReturnSubDevicesAsApiDevices flag. Related-To: LOCI-4859 Signed-off-by: Latif, Raiyan <raiyan.latif@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
c7287f9feb
commit
dee5ecfdf3
@@ -72,6 +72,8 @@ uint32_t GfxCoreHelper::getMaxThreadsForVfe(const HardwareInfo &hwInfo) {
|
||||
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) {
|
||||
return 1u;
|
||||
} else if (pHwInfo->gtSystemInfo.MultiTileArchInfo.IsValid && pHwInfo->gtSystemInfo.MultiTileArchInfo.TileCount > 0u) {
|
||||
return pHwInfo->gtSystemInfo.MultiTileArchInfo.TileCount;
|
||||
} else {
|
||||
|
||||
@@ -51,6 +51,26 @@ TEST(AubHelper, GivenMultipleSubDevicesWhenGettingDeviceCountThenCorrectValueIsR
|
||||
EXPECT_EQ(devicesCount, 1u);
|
||||
}
|
||||
|
||||
TEST(AubHelper, GivenReturnSubDevicesAsApiDevicesWhenGettingDeviceCountThenCorrectValueIsReturned) {
|
||||
DebugManagerStateRestore stateRestore;
|
||||
FeatureTable featureTable = {};
|
||||
WorkaroundTable workaroundTable = {};
|
||||
RuntimeCapabilityTable capTable = {};
|
||||
GT_SYSTEM_INFO sysInfo = {};
|
||||
PLATFORM platform = {};
|
||||
|
||||
sysInfo.MultiTileArchInfo.IsValid = true;
|
||||
sysInfo.MultiTileArchInfo.TileCount = 2;
|
||||
HardwareInfo hwInfo{&platform, &featureTable, &workaroundTable, &sysInfo, capTable};
|
||||
|
||||
uint32_t devicesCount = GfxCoreHelper::getSubDevicesCount(&hwInfo);
|
||||
EXPECT_EQ(devicesCount, 2u);
|
||||
|
||||
DebugManager.flags.ReturnSubDevicesAsApiDevices.set(1);
|
||||
devicesCount = GfxCoreHelper::getSubDevicesCount(&hwInfo);
|
||||
EXPECT_EQ(devicesCount, 1u);
|
||||
}
|
||||
|
||||
TEST(AubHelper, WhenGetMemTraceIsCalledWithLocalMemoryPDEntryBitsThenTraceLocalIsReturned) {
|
||||
int hint = AubHelper::getMemTrace(BIT(PageTableEntry::localMemoryBit));
|
||||
EXPECT_EQ(AubMemDump::AddressSpaceValues::TraceLocal, hint);
|
||||
|
||||
Reference in New Issue
Block a user