mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 14:55:24 +08:00
Feature OCL: allocate multi root device buffers in local memory
Related-To: NEO-5735 Resolves: NEO-7092 Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
7eb91e3b04
commit
272427bb1c
@@ -140,7 +140,7 @@ EnableGemCloseWorker = -1
|
||||
EnableHostPtrValidation = -1
|
||||
EnableComputeWorkSizeND = 1
|
||||
EnableMultiRootDeviceContexts = 1
|
||||
AllocateBuffersInLocalMemoryForMultiRootDeviceContexts = 0
|
||||
AllocateBuffersInLocalMemoryForMultiRootDeviceContexts = 1
|
||||
EnableComputeWorkSizeSquared = 0
|
||||
EnableVaLibCalls = -1
|
||||
EnableExtendedVaFormats = 0
|
||||
@@ -501,4 +501,4 @@ ExperimentalForceCopyThroughLock = -1
|
||||
NumberOfRegularContextsPerEngine = -1
|
||||
EnableMultipleRegularContextForBcs = -1
|
||||
AppendAubStreamContextFlags = -1
|
||||
DirectSubmissionRelaxedOrderingMinNumberOfClients = -1
|
||||
DirectSubmissionRelaxedOrderingMinNumberOfClients = -1
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2022 Intel Corporation
|
||||
* Copyright (C) 2022-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -14,7 +14,7 @@ using namespace NEO;
|
||||
|
||||
TEST(MemoryPropertiesHelperTests, whenQueryingUseSystemMemoryForCrossRootDeviceAccessThenReturnTrueForMultiRootDeviceContexts) {
|
||||
for (auto multiRootDevice : {false, true}) {
|
||||
EXPECT_EQ(multiRootDevice, MemoryPropertiesHelper::useSystemMemoryForCrossRootDeviceAccess(multiRootDevice));
|
||||
EXPECT_FALSE(MemoryPropertiesHelper::useSystemMemoryForCrossRootDeviceAccess(multiRootDevice));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,9 +32,9 @@ TEST(MemoryPropertiesHelperTests, givenAllocateBuffersInLocalMemoryForMultiRootD
|
||||
}
|
||||
}
|
||||
|
||||
TEST(MemoryPropertiesHelperTests, whenQueryingUseMultiStorageForCrossRootDeviceAccessThenReturnFalseForMultiRootDeviceContexts) {
|
||||
TEST(MemoryPropertiesHelperTests, whenQueryingUseMultiStorageForCrossRootDeviceAccessThenReturnTrueForMultiRootDeviceContexts) {
|
||||
for (auto multiRootDevice : {false, true}) {
|
||||
EXPECT_FALSE(MemoryPropertiesHelper::useMultiStorageForCrossRootDeviceAccess(multiRootDevice));
|
||||
EXPECT_EQ(multiRootDevice, MemoryPropertiesHelper::useMultiStorageForCrossRootDeviceAccess(multiRootDevice));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ TEST_F(MemoryManagerGetAlloctionDataTests, givenForceSystemMemoryFlagWhenAllocat
|
||||
}
|
||||
}
|
||||
|
||||
TEST_F(MemoryManagerGetAlloctionDataTests, givenMultiRootDeviceIndexAllocationPropertiesWhenAllocationDataIsQueriedThenUseSystemMemoryFlagsIsSet) {
|
||||
TEST_F(MemoryManagerGetAlloctionDataTests, givenMultiRootDeviceIndexAllocationPropertiesWhenAllocationDataIsQueriedThenUseSystemMemoryFlagsIsNotSet) {
|
||||
{
|
||||
AllocationData allocData;
|
||||
AllocationProperties properties(mockRootDeviceIndex, true, 10, AllocationType::BUFFER, false, mockDeviceBitfield);
|
||||
@@ -74,7 +74,7 @@ TEST_F(MemoryManagerGetAlloctionDataTests, givenMultiRootDeviceIndexAllocationPr
|
||||
MockMemoryManager mockMemoryManager;
|
||||
mockMemoryManager.getAllocationData(allocData, properties, nullptr, mockMemoryManager.createStorageInfoFromProperties(properties));
|
||||
|
||||
EXPECT_TRUE(allocData.flags.useSystemMemory);
|
||||
EXPECT_FALSE(allocData.flags.useSystemMemory);
|
||||
EXPECT_TRUE(allocData.flags.crossRootDeviceAccess);
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@ TEST_F(MemoryManagerGetAlloctionDataTests, givenMultiRootDeviceIndexAllocationPr
|
||||
MockMemoryManager mockMemoryManager;
|
||||
mockMemoryManager.getAllocationData(allocData, properties, nullptr, mockMemoryManager.createStorageInfoFromProperties(properties));
|
||||
|
||||
EXPECT_TRUE(allocData.flags.useSystemMemory);
|
||||
EXPECT_FALSE(allocData.flags.useSystemMemory);
|
||||
EXPECT_TRUE(allocData.flags.crossRootDeviceAccess);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user