You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add Support for Reporting IPC Fabric Accessible handle type creation (#450)
* Add IPC Fabric Accessible Support flag and expectations
* Refine documentation on the IPC handle types
Signed-off-by: Neil R. Spruit <neil.r.spruit@intel.com>
Copy file name to clipboardExpand all lines: scripts/core/EXT_IPC_MEM_HANDLE_TYPE.rst
+27-1Lines changed: 27 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,6 +39,24 @@ When users are requesting IPC handles for L0 memory, there may be requirements f
39
39
40
40
To facilitate this, the IPC Memory Handle Type Extension provides a mechanism to specify the type of IPC handle to be created during memory allocation or when obtaining an IPC handle for existing memory.
41
41
42
+
Checking IPC Support
43
+
~~~~~~~~~~~~~~~~~~~~~
44
+
45
+
Before requesting a specific IPC handle type, users can query the driver to determine what IPC handle types are supported by checking the IPC property flags:
46
+
47
+
.. parsed-literal::
48
+
49
+
${x}_ipc_properties_t ipcProps;
50
+
${x}DeviceGetIpcProperties(hDevice, &ipcProps);
51
+
52
+
if (ipcProps.flags & ${X}_IPC_PROPERTY_FLAG_FABRIC_ACCESSIBLE) {
53
+
// Driver supports fabric accessible IPC handles
54
+
} else {
55
+
// Fabric accessible IPC handles are not supported
56
+
}
57
+
58
+
This approach allows applications to determine available IPC capabilities before attempting to create handles or allocate memory with specific IPC requirements.
59
+
42
60
Get IPC Handle Usage Example
43
61
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
44
62
@@ -55,6 +73,10 @@ To request an IPC handle for L0 memory that is fabric accessible, the user would
55
73
ze_ipc_mem_handle_t ipcHandle;
56
74
ze_result_t result = zeMemGetIpcHandleWithProperties(hContext, ptr, &ipcHandle, &desc);
57
75
76
+
.. note::
77
+
78
+
If the driver does not support ``ZE_IPC_MEM_HANDLE_TYPE_FLAG_FABRIC_ACCESSIBLE``, the function will return ``ZE_RESULT_ERROR_UNSUPPORTED_FEATURE``. Applications can proactively check for support by querying ``${x}_ipc_properties_t`` as shown in the "Checking IPC Support" section above.
79
+
58
80
59
81
Memory Allocation Usage Example
60
82
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -94,4 +116,8 @@ To allocate L0 memory with an IPC handle that is fabric accessible, the user wou
94
116
.size = size
95
117
};
96
118
void* physical_ptr = NULL;
97
-
ze_result_t result = zePhysicalMemCreate(hContext, &physicalDesc, &physical_ptr);
119
+
ze_result_t result = zePhysicalMemCreate(hContext, &physicalDesc, &physical_ptr);
120
+
121
+
.. note::
122
+
123
+
If the driver does not support ``ZE_IPC_MEM_HANDLE_TYPE_FLAG_FABRIC_ACCESSIBLE``, the memory allocation functions (``zeMemAllocDevice``, ``zeMemAllocHost``, ``zePhysicalMemCreate``) will return ``ZE_RESULT_ERROR_UNSUPPORTED_FEATURE``. Applications can proactively check for support by querying ``${x}_ipc_properties_t`` as shown in the "Checking IPC Support" section above.
Copy file name to clipboardExpand all lines: scripts/core/driver.yml
+3Lines changed: 3 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -299,6 +299,9 @@ etors:
299
299
desc: "Supports passing memory allocations between processes. See $xMemGetIpcHandle."
300
300
- name: EVENT_POOL
301
301
desc: "Supports passing event pools between processes. See $xEventPoolGetIpcHandle."
302
+
- name: FABRIC_ACCESSIBLE
303
+
version: "1.16"
304
+
desc: "Supports creating a handle type for memory allocations and event pools between processes on different physical devices connected through a fabric interconnect. See $x_ipc_mem_handle_type_ext_desc_t."
Copy file name to clipboardExpand all lines: scripts/core/ipcMemHandleType.yml
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -33,10 +33,10 @@ version: "1.15"
33
33
etors:
34
34
- name: DEFAULT
35
35
value: "$X_BIT(0)"
36
-
desc: "Local IPC memory handle type for use within the same machine."
36
+
desc: "Local IPC memory handle type for use within the same device. This is the default if no flags are specified and does not indicate if the handle is shareable across devices or machines."
37
37
- name: FABRIC_ACCESSIBLE
38
38
value: "$X_BIT(1)"
39
-
desc: "Fabric accessible IPC memory handle type for use across machines via a supported fabric."
39
+
desc: "Fabric accessible IPC memory handle type for use across devices or machines via a supported fabric."
0 commit comments