@@ -143,6 +143,7 @@ struct fi_info {
143
143
struct fi_domain_attr *domain_attr;
144
144
struct fi_fabric_attr *fabric_attr;
145
145
struct fid_nic *nic;
146
+ struct fi_hmem_attr *hmem_attr;
146
147
};
147
148
```
148
149
@@ -249,6 +250,73 @@ struct fi_info {
249
250
closely associated with a hardware NIC. See
250
251
[ ` fi_nic ` (3)] ( fi_nic.3.html ) for details.
251
252
253
+ * hmem_attr - heterogeneous memory attributes*
254
+ : Optionally supplied HMEM attributes. HMEM attributes may be
255
+ specified and returned as part of fi_getinfo. When provided as
256
+ hints, requested values of struct fi_hmem_attr should be set. On
257
+ output, the actual HMEM attributes that can be provided will be
258
+ returned.
259
+
260
+ ## HMEM ATTRIBUTES
261
+
262
+ ``` c
263
+ enum fi_hmem_attr_opt {
264
+ FI_HMEM_ATTR_UNSPEC,
265
+ FI_HMEM_ATTR_REQUIRED,
266
+ FI_HMEM_ATTR_PREFERRED,
267
+ FI_HMEM_ATTR_DISABLED
268
+ };
269
+
270
+ struct fi_hmem_attr {
271
+ enum fi_hmem_iface iface;
272
+ enum fi_hmem_attr_opt api_permitted;
273
+ enum fi_hmem_attr_opt use_p2p;
274
+ enum fi_hmem_attr_opt use_dev_reg_copy;
275
+ struct fi_hmem_attr *next;
276
+ };
277
+ ```
278
+ - * fi_hmem_attr_opt - int*
279
+ : Defines how the provider should handle HMEM attributes for an interface.
280
+ By default, the provider will chose whether to use the attributes
281
+ (FI_HMEM_ATTR_UNSPEC).
282
+ Valid values defined in fabric.h are:
283
+ * FI_HMEM_ATTR_UNSPEC: The attribute may be used by the provider
284
+ and is subject to the provider implementation.
285
+ * FI_HMEM_ATTR_REQUIRED: The attribute must be used for this interface,
286
+ operations that cannot be performed will be reported as failing.
287
+ * FI_HMEM_ATTR_PREFERRED: The attribute should be used by the
288
+ provider if available, but the provider may choose other implementation
289
+ if it is unavailable.
290
+ * FI_HMEM_ATTR_DISABLED: The attribute should not be used.
291
+
292
+ - * iface*
293
+
294
+ Indicates the software interfaces used by the application, details in
295
+ [ ` fi_mr ` (3)] ( fi_mr.3.html )
296
+
297
+ - * api_permitted*
298
+
299
+ Controls whether libfabric is allowed to make device-specific API calls.
300
+ By default, libfabric is permitted to call device-specific API(e.g. CUDA API).
301
+ If user wish to prohibit libfabric from making such calls, user can achieve
302
+ that by set this field to FI_HMEM_ATTR_DISABLED.
303
+ The setopt option FI_OPT_CUDA_API_PERMITTED for endpoint takes precedence
304
+ over this attribute when api_permitted is not disabled.
305
+
306
+ - * use_p2p*
307
+
308
+ Controls whether peer to peer FI_HMEM transfers should be used.
309
+ The FI_OPT_FI_HMEM_P2P setopt option discussed in
310
+ [ ` fi_endpoint ` (3)] ( fi_endpoint.3.html ) takes precedence over this attribute.
311
+
312
+ - * use_dev_reg_copy*
313
+
314
+ Controls whether optimized memcpy for device memory is used, e.g. GDR copy.
315
+
316
+ - * next*
317
+
318
+ Pointer to the next fi_hmem_attr if using multiple non-system iface.
319
+
252
320
# CAPABILITIES
253
321
254
322
Interface capabilities are obtained by OR-ing the following flags
0 commit comments