mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-25 13:33:02 +08:00
Access counters mode to not rely on KMD cross-tile migrations (by default)
Add new regkey KMDSupportForCrossTileMigrationPolicy (disabled by default, in absence of KMD suppport for cross-tile migrations) to control placement of shared allocation and memory prefetch behavior. Related-To: NEO-7885 Signed-off-by: Milczarek, Slawomir <slawomir.milczarek@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
a1066177a5
commit
8e04a7a83f
@@ -436,6 +436,7 @@ LimitEngineCountForVirtualCcs = -1
|
||||
ForceRunAloneContext = -1
|
||||
AppendMemoryPrefetchForKmdMigratedSharedAllocations = 1
|
||||
ForceMemoryPrefetchForKmdMigratedSharedAllocations = 0
|
||||
KMDSupportForCrossTileMigrationPolicy = -1
|
||||
CreateContextWithAccessCounters = -1
|
||||
AccessCountersTrigger = -1
|
||||
AccessCountersGranularity = -1
|
||||
|
||||
@@ -367,9 +367,9 @@ TEST_F(DrmMemoryManagerLocalMemoryPrelimTest, whenCreateUnifiedMemoryAllocationW
|
||||
memoryManager->freeGraphicsMemory(allocation);
|
||||
}
|
||||
|
||||
TEST_F(DrmMemoryManagerLocalMemoryPrelimTest, givenCreateContextWithAccessCountersWhenCreateUnifiedMemoryAllocationWithMultiMemoryRegionsThenGemCreateExtIsUsedWithAllRegions) {
|
||||
TEST_F(DrmMemoryManagerLocalMemoryPrelimTest, givenKMDSupportForCrossTileMigrationPolicyWhenCreateUnifiedMemoryAllocationWithMultiMemoryRegionsThenGemCreateExtIsUsedWithAllRegions) {
|
||||
DebugManagerStateRestore restorer;
|
||||
DebugManager.flags.CreateContextWithAccessCounters.set(1);
|
||||
DebugManager.flags.KMDSupportForCrossTileMigrationPolicy.set(1);
|
||||
|
||||
std::vector<MemoryRegion> regionInfo(4);
|
||||
regionInfo[0].region = {drm_i915_gem_memory_class::I915_MEMORY_CLASS_SYSTEM, 1};
|
||||
@@ -674,10 +674,10 @@ TEST_F(DrmMemoryManagerLocalMemoryPrelimTest, givenUseKmdMigrationAndUsmInitialP
|
||||
unifiedMemoryManager.freeSVMAlloc(ptr);
|
||||
}
|
||||
|
||||
TEST_F(DrmMemoryManagerLocalMemoryPrelimTest, givenUseKmdMigrationWithAccessCountersAndUsmInitialPlacementSetToGpuWhenCreateSharedUnifiedMemoryAllocationOnMultiTileArchitectureThenKmdMigratedAllocationIsCreatedWithCorrectRegionsOrder) {
|
||||
TEST_F(DrmMemoryManagerLocalMemoryPrelimTest, givenKMDSupportForCrossTileMigrationPolicyAndUsmInitialPlacementSetToGpuWhenCreateSharedUnifiedMemoryAllocationOnMultiTileArchitectureThenKmdMigratedAllocationIsCreatedWithCorrectRegionsOrder) {
|
||||
DebugManagerStateRestore restorer;
|
||||
DebugManager.flags.UseKmdMigration.set(1);
|
||||
DebugManager.flags.CreateContextWithAccessCounters.set(1);
|
||||
DebugManager.flags.KMDSupportForCrossTileMigrationPolicy.set(1);
|
||||
DebugManager.flags.UsmInitialPlacement.set(1);
|
||||
RootDeviceIndicesContainer rootDeviceIndices = {mockRootDeviceIndex};
|
||||
std::map<uint32_t, DeviceBitfield> deviceBitfields{{mockRootDeviceIndex, mockDeviceBitfield}};
|
||||
|
||||
@@ -4733,9 +4733,9 @@ TEST_F(DrmMemoryManagerTest, givenKmdMigratedSharedAllocationWithMultipleBOsWhen
|
||||
EXPECT_EQ(1u, drmAllocation.subDeviceIdsReceived[1]);
|
||||
}
|
||||
|
||||
TEST_F(DrmMemoryManagerTest, givenContextWithAccessCountersAndKmdMigratedSharedAllocationWithMultipleBOsWhenSetMemPrefetchIsCalledWithASubDeviceThenPrefetchBOsToThisSubDevice) {
|
||||
TEST_F(DrmMemoryManagerTest, givenKMDSupportForCrossTileMigrationPolicyAndKmdMigratedSharedAllocationWithMultipleBOsWhenSetMemPrefetchIsCalledWithASubDeviceThenPrefetchBOsToThisSubDevice) {
|
||||
DebugManagerStateRestore restore;
|
||||
DebugManager.flags.CreateContextWithAccessCounters.set(1);
|
||||
DebugManager.flags.KMDSupportForCrossTileMigrationPolicy.set(1);
|
||||
|
||||
TestedDrmMemoryManager memoryManager(false, false, false, *executionEnvironment);
|
||||
SubDeviceIdsVec subDeviceIds{0};
|
||||
@@ -4766,9 +4766,9 @@ TEST_F(DrmMemoryManagerTest, givenContextWithAccessCountersAndKmdMigratedSharedA
|
||||
EXPECT_EQ(0u, drmAllocation.subDeviceIdsReceived[1]);
|
||||
}
|
||||
|
||||
TEST_F(DrmMemoryManagerTest, givenContextWithAccessCountersAndKmdMigratedSharedAllocationWithMultipleBOsWhenSetMemPrefetchIsCalledWithSubDevicesThenPrefetchBOsToTheseSubDevices) {
|
||||
TEST_F(DrmMemoryManagerTest, givenKMDSupportForCrossTileMigrationPolicyAndKmdMigratedSharedAllocationWithMultipleBOsWhenSetMemPrefetchIsCalledWithSubDevicesThenPrefetchBOsToTheseSubDevices) {
|
||||
DebugManagerStateRestore restore;
|
||||
DebugManager.flags.CreateContextWithAccessCounters.set(1);
|
||||
DebugManager.flags.KMDSupportForCrossTileMigrationPolicy.set(1);
|
||||
|
||||
TestedDrmMemoryManager memoryManager(false, false, false, *executionEnvironment);
|
||||
SubDeviceIdsVec subDeviceIds{0, 1};
|
||||
|
||||
Reference in New Issue
Block a user