Skip to content

Commit

Permalink
Revert "Replicate CONSTANT_SURFACE across tiles"
Browse files Browse the repository at this point in the history
This reverts commit 9a4467f.

Signed-off-by: Compute-Runtime-Validation <[email protected]>
  • Loading branch information
Compute-Runtime-Validation authored and Compute-Runtime-Automation committed Nov 5, 2022
1 parent dba5484 commit d91d22d
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 18 deletions.
2 changes: 1 addition & 1 deletion shared/source/debug_settings/debug_variables_base.inl
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ DECLARE_DEBUG_VARIABLE(int32_t, ForceStatelessL1CachingPolicy, -1, "-1: default,
DECLARE_DEBUG_VARIABLE(int32_t, ForceMemoryBankIndexOverride, -1, "-1: default, 0: disable, 1:enable, Force index=1 of memory bank for XEHP")
DECLARE_DEBUG_VARIABLE(int32_t, EnablePrivateScratchSlot1, -1, "-1: default, 0: disable, 1: enable Allows using private scratch space")
DECLARE_DEBUG_VARIABLE(int32_t, DisablePipeControlPrecedingPostSyncCommand, -1, "-1 default - disabled adding PIPE_CONTROL, 0 - disabled adding PIPE_CONTROL, 1 - enabled adding PIPE_CONTROL")
DECLARE_DEBUG_VARIABLE(int32_t, MultiTileAllocPlacement, -1, "Place ISA or CONSTANT_SURFACE allocation on multi tiles, -1 - default, 0 - disabled, 1 - enabled")
DECLARE_DEBUG_VARIABLE(int32_t, MultiTileIsaPlacement, -1, "Place ISA allocation on multi tiles, -1 - default, 0 - disabled, 1 - enabled")
DECLARE_DEBUG_VARIABLE(int32_t, FormatForStatelessCompressionWithUnifiedMemory, 0xF, "Format for stateless compression with unified memory")
DECLARE_DEBUG_VARIABLE(int32_t, ForceMultiGpuPartialWritesInComputeMode, -1, "-1: default - 0 for multiOsContext capable, 0: program value 0 in MultiGpuPartialWrites bit in STATE_COMPUTE_MODE, 1: program value 1 in MultiGpuPartialWrites bit in STATE_COMPUTE_MODE,")
DECLARE_DEBUG_VARIABLE(int32_t, ForceMultiGpuPartialWrites, -1, "-1: default - 0 for multiOsContext capable, 0: program value 0 in MultiGpuPartialWrites controls 1: program value 1 in MultiGpuPartialWrites controls")
Expand Down
9 changes: 4 additions & 5 deletions shared/source/memory_manager/definitions/storage_info.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,15 @@ StorageInfo MemoryManager::createStorageInfoFromProperties(const AllocationPrope
sizeof(storageInfo.resourceTag));

switch (properties.allocationType) {
case AllocationType::CONSTANT_SURFACE:
case AllocationType::KERNEL_ISA:
case AllocationType::KERNEL_ISA_INTERNAL:
case AllocationType::DEBUG_MODULE_AREA: {
auto placeAllocOnMultiTile = (properties.subDevicesBitfield.count() != 1);
auto placeIsaOnMultiTile = (properties.subDevicesBitfield.count() != 1);

if (DebugManager.flags.MultiTileAllocPlacement.get() != -1) {
placeAllocOnMultiTile = !!DebugManager.flags.MultiTileAllocPlacement.get();
if (DebugManager.flags.MultiTileIsaPlacement.get() != -1) {
placeIsaOnMultiTile = !!DebugManager.flags.MultiTileIsaPlacement.get();
}
if (placeAllocOnMultiTile) {
if (placeIsaOnMultiTile) {
storageInfo.cloningOfPageTables = false;
storageInfo.memoryBanks = allTilesValue;
storageInfo.tileInstanced = true;
Expand Down
2 changes: 1 addition & 1 deletion shared/test/common/test_files/igdrcl.config
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ EnablePrivateScratchSlot1 = -1
DisablePipeControlPrecedingPostSyncCommand = -1
UseClearColorAllocationForBlitter = false
OverrideMultiStoragePlacement = -1
MultiTileAllocPlacement = -1
MultiTileIsaPlacement = -1
FormatForStatelessCompressionWithUnifiedMemory = 0xF
ForceMultiGpuPartialWritesInComputeMode = -1
ForceMultiGpuPartialWrites = -1
Expand Down
22 changes: 11 additions & 11 deletions shared/test/unit_test/memory_manager/storage_info_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@ struct MultiDeviceStorageInfoTest : public ::testing::Test {
MockMemoryManager *memoryManager;
};

TEST_F(MultiDeviceStorageInfoTest, givenEnabledFlagForMultiTileAllocPlacementWhenCreatingStorageInfoForAllocationThenAllMemoryBanksAreOnAndPageTableClonningIsNotRequired) {
TEST_F(MultiDeviceStorageInfoTest, givenEnabledFlagForMultiTileIsaPlacementWhenCreatingStorageInfoForKernelIsaThenAllMemoryBanksAreOnAndPageTableClonningIsNotRequired) {
DebugManagerStateRestore restorer;
DebugManager.flags.MultiTileAllocPlacement.set(1);
DebugManager.flags.MultiTileIsaPlacement.set(1);

AllocationType allocTypes[] = {AllocationType::KERNEL_ISA, AllocationType::KERNEL_ISA_INTERNAL, AllocationType::CONSTANT_SURFACE};
AllocationType isaTypes[] = {AllocationType::KERNEL_ISA, AllocationType::KERNEL_ISA_INTERNAL};

for (uint32_t i = 0; i < 2; i++) {
AllocationProperties properties{mockRootDeviceIndex, false, 0u, allocTypes[i], false, false, singleTileMask};
AllocationProperties properties{mockRootDeviceIndex, false, 0u, isaTypes[i], false, false, singleTileMask};
auto storageInfo = memoryManager->createStorageInfoFromProperties(properties);
EXPECT_FALSE(storageInfo.cloningOfPageTables);
EXPECT_EQ(allTilesMask, storageInfo.memoryBanks);
Expand All @@ -61,12 +61,12 @@ TEST_F(MultiDeviceStorageInfoTest, givenEnabledFlagForMultiTileAllocPlacementWhe
}
}

TEST_F(MultiDeviceStorageInfoTest, givenDefaultFlagForMultiTileAllocPlacementWhenCreatingStorageInfoForAllocationThenSingleMemoryBanksIsOnAndPageTableClonningIsRequired) {
TEST_F(MultiDeviceStorageInfoTest, givenDefaultFlagForMultiTileIsaPlacementWhenCreatingStorageInfoForKernelIsaThenSingleMemoryBanksIsOnAndPageTableClonningIsRequired) {

AllocationType allocTypes[] = {AllocationType::KERNEL_ISA, AllocationType::KERNEL_ISA_INTERNAL, AllocationType::CONSTANT_SURFACE};
AllocationType isaTypes[] = {AllocationType::KERNEL_ISA, AllocationType::KERNEL_ISA_INTERNAL};

for (uint32_t i = 0; i < 2; i++) {
AllocationProperties properties{mockRootDeviceIndex, false, 0u, allocTypes[i], false, false, singleTileMask};
AllocationProperties properties{mockRootDeviceIndex, false, 0u, isaTypes[i], false, false, singleTileMask};

auto storageInfo = memoryManager->createStorageInfoFromProperties(properties);
EXPECT_TRUE(storageInfo.cloningOfPageTables);
Expand All @@ -83,14 +83,14 @@ TEST_F(MultiDeviceStorageInfoTest, givenDefaultFlagForMultiTileAllocPlacementWhe
}
}

TEST_F(MultiDeviceStorageInfoTest, givenDisabledFlagForMultiTileAllocPlacementWhenCreatingStorageInfoForAllocationThenSingleMemoryBanksIsOnAndPageTableClonningIsRequired) {
TEST_F(MultiDeviceStorageInfoTest, givenDisabledFlagForMultiTileIsaPlacementWhenCreatingStorageInfoForKernelIsaThenSingleMemoryBanksIsOnAndPageTableClonningIsRequired) {
DebugManagerStateRestore restorer;
DebugManager.flags.MultiTileAllocPlacement.set(0);
DebugManager.flags.MultiTileIsaPlacement.set(0);

AllocationType allocTypes[] = {AllocationType::KERNEL_ISA, AllocationType::KERNEL_ISA_INTERNAL, AllocationType::CONSTANT_SURFACE};
AllocationType isaTypes[] = {AllocationType::KERNEL_ISA, AllocationType::KERNEL_ISA_INTERNAL};

for (uint32_t i = 0; i < 2; i++) {
AllocationProperties properties{mockRootDeviceIndex, false, 0u, allocTypes[i], false, false, singleTileMask};
AllocationProperties properties{mockRootDeviceIndex, false, 0u, isaTypes[i], false, false, singleTileMask};
auto storageInfo = memoryManager->createStorageInfoFromProperties(properties);
EXPECT_TRUE(storageInfo.cloningOfPageTables);
EXPECT_EQ(singleTileMask, storageInfo.memoryBanks.to_ulong());
Expand Down

0 comments on commit d91d22d

Please sign in to comment.