mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-11 16:45:25 +08:00
Add support for IPC handles with implicit scaling
When using implicit scaling, device allocations may have more than one internal allocation created internally. In that case, a separate dma-buf handle per internal allocation needs to be exported. So introduced two driver experimental extensions to export and import more than one IPC handle: - zexMemGetIpcHandles - zexMemOpenIpcHandles Related-To: LOCI-2919 Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
c0de4fd243
commit
3f26f45c10
@@ -62,3 +62,41 @@ class MemoryAllocatorMultiDeviceFixture : public MemoryManagementFixture, public
|
||||
DebugManagerStateRestore restorer;
|
||||
bool isOsAgnosticMemoryManager;
|
||||
};
|
||||
|
||||
template <uint32_t numRootDevices, uint32_t numSubDevices>
|
||||
class MemoryAllocatorMultiDeviceAndMultiTileFixture : public MemoryManagementFixture, public MemoryAllocatorMultiDeviceSystemSpecificFixture, public ::testing::TestWithParam<bool> {
|
||||
public:
|
||||
void SetUp() override {
|
||||
MemoryManagementFixture::SetUp();
|
||||
|
||||
isOsAgnosticMemoryManager = GetParam();
|
||||
DebugManager.flags.CreateMultipleRootDevices.set(numRootDevices);
|
||||
DebugManager.flags.CreateMultipleRootDevices.set(numSubDevices);
|
||||
VariableBackup<UltHwConfig> backup(&ultHwConfig);
|
||||
ultHwConfig.useMockedPrepareDeviceEnvironmentsFunc = false;
|
||||
ultHwConfig.forceOsAgnosticMemoryManager = isOsAgnosticMemoryManager;
|
||||
|
||||
executionEnvironment = new MockExecutionEnvironment(defaultHwInfo.get(), true, numRootDevices);
|
||||
devices = DeviceFactory::createDevices(*executionEnvironment);
|
||||
memoryManager = executionEnvironment->memoryManager.get();
|
||||
|
||||
if (!isOsAgnosticMemoryManager) {
|
||||
MemoryAllocatorMultiDeviceSystemSpecificFixture::SetUp(*executionEnvironment);
|
||||
}
|
||||
}
|
||||
|
||||
void TearDown() override {
|
||||
if (!isOsAgnosticMemoryManager) {
|
||||
MemoryAllocatorMultiDeviceSystemSpecificFixture::TearDown(*executionEnvironment);
|
||||
}
|
||||
}
|
||||
|
||||
uint32_t getNumRootDevices() { return numRootDevices; }
|
||||
|
||||
protected:
|
||||
std::vector<std::unique_ptr<Device>> devices;
|
||||
ExecutionEnvironment *executionEnvironment = nullptr;
|
||||
MemoryManager *memoryManager = nullptr;
|
||||
DebugManagerStateRestore restorer;
|
||||
bool isOsAgnosticMemoryManager;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user