feature: Add product helper for PidFdOrSocketForIPC

Related-To: NEO-15183

Signed-off-by: Raiyan Latif <raiyan.latif@intel.com>
This commit is contained in:
Raiyan Latif
2025-06-11 18:04:46 +00:00
committed by Compute-Runtime-Automation
parent abe499a913
commit b6c2c59d8f
7 changed files with 45 additions and 3 deletions

View File

@@ -24,10 +24,11 @@ bool ContextImp::isShareableMemory(const void *exportDesc, bool exportableMemory
void *ContextImp::getMemHandlePtr(ze_device_handle_t hDevice, uint64_t handle, NEO::AllocationType allocationType, ze_ipc_memory_flags_t flags) {
auto neoDevice = Device::fromHandle(hDevice)->getNEODevice();
auto &productHelper = neoDevice->getProductHelper();
bool pidfdOrSocket = false;
if (NEO::debugManager.flags.EnablePidFdOrSocketsForIpc.get() != -1) {
pidfdOrSocket = !!(NEO::debugManager.flags.EnablePidFdOrSocketsForIpc.get());
}
pidfdOrSocket = productHelper.isPidFdOrSocketForIpcSupported();
if (pidfdOrSocket) {
// With pidfd approach extract parent pid and target fd before importing handle
pid_t exporterPid = 0;