Skip to content

Commit 0548d26

Browse files
committed
man: Add fi_hmem_attr to fi_info
Update man pages for fi_hmem_attr. Signed-off-by: Jessie Yang <[email protected]>
1 parent 8157908 commit 0548d26

File tree

4 files changed

+81
-0
lines changed

4 files changed

+81
-0
lines changed

man/fabric.7.md

+5
Original file line numberDiff line numberDiff line change
@@ -455,6 +455,11 @@ Added new fields to the following attributes:
455455
*fi_domain_attr*
456456
: Added max_group_id
457457

458+
*fi_info*
459+
: The fi_info structure was expanded to reference a new fabric object,
460+
fi_hmem_attr. When available, the fi_hmem_attr references a new set of
461+
attributes related to heterogeneous memory.
462+
458463
# SEE ALSO
459464

460465
[`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

+68
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,73 @@ 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_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+
252320
# CAPABILITIES
253321

254322
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_UNSPEC
222+
use_p2p: FI_HMEM_ATTR_UNSPEC
223+
use_dev_reg_copy: FI_HMEM_ATTR_UNSPEC
219224
```
220225

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

0 commit comments

Comments
 (0)