Skip to content

Commit d0718ad

Browse files
committed
man: Add fi_hmem_attr to fi_info
Signed-off-by: Jessie Yang <[email protected]>
1 parent 121f02c commit d0718ad

File tree

4 files changed

+83
-0
lines changed

4 files changed

+83
-0
lines changed

man/fabric.7.md

+8
Original file line numberDiff line numberDiff line change
@@ -447,6 +447,14 @@ attributes:
447447
*fi_domain_attr*
448448
: Added max_ep_auth_key
449449

450+
## ABI 1.8
451+
ABI version starting with libfabric 2.0. Expanded the following structure.
452+
453+
*fi_info*
454+
: The fi_info structure was expanded to reference a new fabric object,
455+
fi_hmem_attr. When available, the fi_hmem_attr references a new set of
456+
attributes related to heterogeneous memory.
457+
450458
# SEE ALSO
451459

452460
[`fi_info`(1)](fi_info.1.html),

man/fi_fabric.3.md

+3
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,9 @@ datatype or field value.
177177
*FI_TYPE_LOG_SUBSYS*
178178
: enum fi_log_subsys
179179
180+
*FI_TYPE_HMEM_ATTR*
181+
: struct fi_hmem_attr
182+
180183
fi_tostr() will return a pointer to an internal libfabric buffer that
181184
should not be modified, and will be overwritten the next time
182185
fi_tostr() is invoked. fi_tostr() is not thread safe.

man/fi_getinfo.3.md

+67
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ struct fi_info {
143143
struct fi_domain_attr *domain_attr;
144144
struct fi_fabric_attr *fabric_attr;
145145
struct fid_nic *nic;
146+
struct fi_hmem_attr *hmem_attr;
146147
};
147148
```
148149

@@ -249,6 +250,72 @@ struct fi_info {
249250
closely associated with a hardware NIC. See
250251
[`fi_nic`(3)](fi_nic.3.html) for details.
251252

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_ENABLED,
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_ENABLED). Valid values defined in fabric.h are:
282+
* FI_HMEM_ATTR_ENABLED: The attribute may be used by the provider
283+
and is subject to the provider implementation.
284+
* FI_HMEM_ATTR_REQUIRED: The attribute must be used for this interface,
285+
operations that cannot be performed will be reported as failing.
286+
* FI_HMEM_ATTR_PREFERRED: The attribute should be used by the
287+
provider if available, but the provider may choose other implementation
288+
if it is unavailable.
289+
* FI_HMEM_ATTR_DISABLED: The attribute should not be used.
290+
291+
- *iface*
292+
293+
Indicates the software interfaces used by the application, details in
294+
[`fi_mr`(3)](fi_mr.3.html)
295+
296+
- *api_permitted*
297+
298+
Controls whether libfabric is allowed to make device-specific API calls.
299+
By default, libfabric is permitted to call device-specific API(e.g. CUDA API).
300+
If user wish to prohibit libfabric from making such calls, user can achieve
301+
that by set this field to FI_HMEM_ATTR_DISABLED.
302+
The setopt option FI_OPT_CUDA_API_PERMITTED for endpoint takes precedence
303+
over this attribute when api_permitted is not disabled.
304+
305+
- *use_p2p*
306+
307+
Controls whether peer to peer FI_HMEM transfers should be used.
308+
The FI_OPT_FI_HMEM_P2P setopt option discussed in
309+
[`fi_endpoint`(3)](fi_endpoint.3.html) takes precedence over this attribute.
310+
311+
- *use_dev_reg_copy*
312+
313+
Controls whether optimized memcpy for device memory is used, e.g. GDR copy.
314+
315+
- *next*
316+
317+
Pointer to the next fi_hmem_attr if using multiple non-system iface.
318+
252319
# CAPABILITIES
253320

254321
Interface capabilities are obtained by OR-ing the following flags

man/fi_info.1.md

+5
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,11 @@ fi_info:
216216
speed: 0
217217
state: FI_LINK_UP
218218
network_type: InfiniBand
219+
fi_hmem_attr:
220+
iface: FI_HMEM_SYSTEM
221+
api_permitted: FI_HMEM_ATTR_ENABLED
222+
use_p2p: FI_HMEM_ATTR_ENABLED
223+
use_dev_reg_copy: FI_HMEM_ATTR_ENABLED
219224
```
220225

221226
To see libfabric related environment variables `-e` option.

0 commit comments

Comments
 (0)