mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 06:49:52 +08:00
Move definition of maxOsContextCount to engine_node.h
Change-Id: I1ed252e9bbf382b449c7751061f9df42ded8b797 Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
e53a8e8709
commit
7e3b6d2d90
@@ -398,11 +398,10 @@ TEST(CommandStreamReceiverSimpleTest, givenCSRWhenWaitBeforeMakingNonResidentWhe
|
||||
TEST(CommandStreamReceiverMultiContextTests, givenMultipleCsrsWhenSameResourcesAreUsedThenResidencyIsProperlyHandled) {
|
||||
auto executionEnvironment = new ExecutionEnvironment;
|
||||
|
||||
std::unique_ptr<MockDevice> device0(Device::create<MockDevice>(nullptr, executionEnvironment, 0u));
|
||||
std::unique_ptr<MockDevice> device1(Device::create<MockDevice>(nullptr, executionEnvironment, 1u));
|
||||
std::unique_ptr<MockDevice> device(Device::create<MockDevice>(nullptr, executionEnvironment, 0u));
|
||||
|
||||
auto &commandStreamReceiver0 = device0->getCommandStreamReceiver();
|
||||
auto &commandStreamReceiver1 = device1->getCommandStreamReceiver();
|
||||
auto &commandStreamReceiver0 = *executionEnvironment->commandStreamReceivers[0][0];
|
||||
auto &commandStreamReceiver1 = *executionEnvironment->commandStreamReceivers[0][1];
|
||||
|
||||
auto csr0ContextId = commandStreamReceiver0.getOsContext().getContextId();
|
||||
auto csr1ContextId = commandStreamReceiver1.getOsContext().getContextId();
|
||||
|
||||
@@ -500,11 +500,16 @@ TEST(SubmissionsAggregator, givenMultipleOsContextsWhenAggregatingGraphicsAlloca
|
||||
|
||||
submissionsAggregator.recordCommandBuffer(cmdBuffer0);
|
||||
submissionsAggregator.recordCommandBuffer(cmdBuffer1);
|
||||
submissionsAggregator.aggregateCommandBuffers(resourcePackage, totalUsedSize, totalMemoryBudget, 3u);
|
||||
EXPECT_EQ(1u, alloc0.getInspectionId(3u));
|
||||
EXPECT_EQ(1u, alloc1.getInspectionId(3u));
|
||||
EXPECT_EQ(1u, alloc2.getInspectionId(3u));
|
||||
EXPECT_EQ(1u, alloc3.getInspectionId(3u));
|
||||
|
||||
EXPECT_EQ(0u, alloc0.getInspectionId(1u));
|
||||
EXPECT_EQ(0u, alloc1.getInspectionId(1u));
|
||||
EXPECT_EQ(0u, alloc2.getInspectionId(1u));
|
||||
EXPECT_EQ(0u, alloc3.getInspectionId(1u));
|
||||
submissionsAggregator.aggregateCommandBuffers(resourcePackage, totalUsedSize, totalMemoryBudget, 1u);
|
||||
EXPECT_EQ(1u, alloc0.getInspectionId(1u));
|
||||
EXPECT_EQ(1u, alloc1.getInspectionId(1u));
|
||||
EXPECT_EQ(1u, alloc2.getInspectionId(1u));
|
||||
EXPECT_EQ(1u, alloc3.getInspectionId(1u));
|
||||
}
|
||||
|
||||
TEST(SubmissionsAggregator, givenMultipleOsContextsWhenAggregatingGraphicsAllocationsThenDoNotUpdateInspectionIdsOfOtherContexts) {
|
||||
@@ -524,15 +529,15 @@ TEST(SubmissionsAggregator, givenMultipleOsContextsWhenAggregatingGraphicsAlloca
|
||||
|
||||
submissionsAggregator.recordCommandBuffer(cmdBuffer0);
|
||||
submissionsAggregator.recordCommandBuffer(cmdBuffer1);
|
||||
submissionsAggregator.aggregateCommandBuffers(resourcePackage, totalUsedSize, totalMemoryBudget, 3u);
|
||||
submissionsAggregator.aggregateCommandBuffers(resourcePackage, totalUsedSize, totalMemoryBudget, 1u);
|
||||
|
||||
for (auto osContextId = 0u; osContextId < alloc1.usageInfos.size(); osContextId++) {
|
||||
if (osContextId != 3u) {
|
||||
if (osContextId != 1u) {
|
||||
EXPECT_EQ(0u, alloc0.getInspectionId(osContextId));
|
||||
}
|
||||
}
|
||||
for (auto osContextId = 0u; osContextId < alloc0.usageInfos.size(); osContextId++) {
|
||||
if (osContextId != 3u) {
|
||||
if (osContextId != 1u) {
|
||||
EXPECT_EQ(0u, alloc0.getInspectionId(osContextId));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user