feature: Initial CB events IPC support

Related-To: NEO-11925

Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
This commit is contained in:
Bartosz Dunajski
2024-10-15 16:32:10 +00:00
committed by Compute-Runtime-Automation
parent 0a568f368d
commit 52e9a6e07f
14 changed files with 413 additions and 12 deletions

View File

@@ -63,6 +63,8 @@ class MockMemoryManager : public MemoryManagerCreate<OsAgnosticMemoryManager> {
using MemoryManager::reservedMemory;
using MemoryManager::secondaryEngines;
static constexpr osHandle invalidSharedHandle = -1;
MockMemoryManager(ExecutionEnvironment &executionEnvironment) : MockMemoryManager(false, executionEnvironment) {}
MockMemoryManager(bool enableLocalMemory, ExecutionEnvironment &executionEnvironment);
@@ -217,6 +219,10 @@ class MockMemoryManager : public MemoryManagerCreate<OsAgnosticMemoryManager> {
return OsAgnosticMemoryManager::mapPhysicalToVirtualMemory(physicalAllocation, gpuRange, bufferSize);
};
void registerIpcExportedAllocation(GraphicsAllocation *graphicsAllocation) override {
registerIpcExportedAllocationCalled++;
}
MockGraphicsAllocation *mockGa;
size_t ipcAllocationSize = 4096u;
uint32_t copyMemoryToAllocationBanksCalled = 0u;
@@ -227,6 +233,7 @@ class MockMemoryManager : public MemoryManagerCreate<OsAgnosticMemoryManager> {
uint32_t lockResourceCalled = 0u;
uint32_t createGraphicsAllocationFromExistingStorageCalled = 0u;
uint32_t allocInUseCalled = 0u;
uint32_t registerIpcExportedAllocationCalled = 0;
int32_t overrideAllocateAsPackReturn = -1;
std::vector<GraphicsAllocation *> allocationsFromExistingStorage{};
AllocationData alignAllocationData;
@@ -237,7 +244,6 @@ class MockMemoryManager : public MemoryManagerCreate<OsAgnosticMemoryManager> {
uint32_t waitForEnginesCompletionCalled = 0u;
uint32_t allocateGraphicsMemoryWithPropertiesCount = 0;
osHandle capturedSharedHandle = 0u;
osHandle invalidSharedHandle = -1;
bool allocationCreated = false;
bool allocation64kbPageCreated = false;
bool allocationInDevicePoolCreated = false;

View File

@@ -64,7 +64,7 @@ HWTEST_F(CommandEncoderTests, givenDifferentInputParamsWhenCreatingStandaloneInO
MockGraphicsAllocation alloc(nullptr, gpuAddress, 1);
auto inOrderExecInfo = InOrderExecInfo::createFromExternalAllocation(mockDevice, &alloc, gpuAddress, nullptr, hostAddress, counterValue);
auto inOrderExecInfo = InOrderExecInfo::createFromExternalAllocation(mockDevice, &alloc, gpuAddress, nullptr, hostAddress, counterValue, 2, 3);
EXPECT_EQ(counterValue, inOrderExecInfo->getCounterValue());
EXPECT_EQ(hostAddress, inOrderExecInfo->getBaseHostAddress());
@@ -72,6 +72,8 @@ HWTEST_F(CommandEncoderTests, givenDifferentInputParamsWhenCreatingStandaloneInO
EXPECT_EQ(&alloc, inOrderExecInfo->getDeviceCounterAllocation());
EXPECT_EQ(nullptr, inOrderExecInfo->getHostCounterAllocation());
EXPECT_TRUE(inOrderExecInfo->isExternalMemoryExecInfo());
EXPECT_EQ(2u, inOrderExecInfo->getNumDevicePartitionsToWait());
EXPECT_EQ(3u, inOrderExecInfo->getNumHostPartitionsToWait());
inOrderExecInfo->reset();