File tree Expand file tree Collapse file tree 3 files changed +39
-1
lines changed Expand file tree Collapse file tree 3 files changed +39
-1
lines changed Original file line number Diff line number Diff line change @@ -148,6 +148,25 @@ take the extra global offset argument. Use of the global offset is not
148
148
recommended for non SYCL compiler toolchains. This parameter can be ignored if
149
149
the user does not wish to use the global offset.
150
150
151
+ Interoperability
152
+ ================
153
+
154
+ Unified Runtime offers a number of entry points in order to get native handles
155
+ for UR objects. The native handle may refer to a number of different native CUDA
156
+ types, depending on the entry point called.
157
+
158
+ - ${x}MemGetNativeHandle stores a ``CUdeviceptr `` in the ${x}_native_handle_t
159
+ argument passed. The ``CUdeviceptr `` will be resident on the
160
+ ${x}_device_handle_t provided as an argument, if the device shares a context
161
+ with the ${x}_mem_handle_t. If the ${x}_device_handle_t argument passed to
162
+ ${x}MemGetNativeHandle is ``nullptr ``,
163
+ ``UR_RESULT_ERROR_UNSUPPORTED_FEATURE `` will be returned.
164
+
165
+ ..
166
+ TODO: add more descriptions of the native types that will be stored in
167
+ ur_native_handle_t types for different calls to urTypeGetNative and
168
+ urTypeCreateWithNativeHandle.
169
+
151
170
Other Notes
152
171
===========
153
172
Original file line number Diff line number Diff line change @@ -91,6 +91,25 @@ take the extra global offset argument. Use of the global offset is not
91
91
recommended for non SYCL compiler toolchains. This parameter can be ignored if
92
92
the user does not wish to use the global offset.
93
93
94
+ Interoperability
95
+ ================
96
+
97
+ Unified Runtime offers a number of entry points in order to get native handles
98
+ for UR objects. The native handle may refer to a number of different native HIP
99
+ types, depending on the entry point called.
100
+
101
+ - ${x}MemGetNativeHandle stores a ``hipDeviceptr_t `` in the
102
+ ${x}_native_handle_t argument passed. The ``hipDeviceptr_t `` will be resident
103
+ on the ${x}_device_handle_t provided as an argument, if the device shares a
104
+ context with the ${x}_mem_handle_t. If the ${x}_device_handle_t argument
105
+ passed to ${x}MemGetNativeHandle is ``nullptr ``,
106
+ ``UR_RESULT_ERROR_UNSUPPORTED_FEATURE `` will be returned.
107
+ ..
108
+ TODO: add more descriptions of the native types that will be stored in
109
+ ur_native_handle_t types for different calls to urTypeGetNative and
110
+ urTypeCreateWithNativeHandle.
111
+
112
+
94
113
Other Notes
95
114
===========
96
115
Original file line number Diff line number Diff line change @@ -435,7 +435,7 @@ params:
435
435
- type : $x_device_handle_t
436
436
name : hDevice
437
437
desc : |
438
- [in] handle of the device that the native handle will be resident on .
438
+ [in] handle of the device on which the native handle will reside .
439
439
- type : $x_native_handle_t*
440
440
name : phNativeMem
441
441
desc : |
You can’t perform that action at this time.
0 commit comments