1fi_direct(7) Libfabric v1.12.0rc1 fi_direct(7)
2
3
4
6 fi_direct - Direct fabric provider access
7
9 -DFABRIC_DIRECT
10
11 #define FABRIC_DIRECT
12
13 Fabric direct provides a mechanism for applications to compile against
14 a specific fabric providers without going through the libfabric frame‐
15 work or function vector tables. This allows for extreme optimization
16 via function inlining at the cost of supporting multiple providers or
17 different versions of the same provider.
18
20 The use of fabric direct is intended only for applications that require
21 the absolute minimum software latency, and are willing to re-compile
22 for specific fabric hardware. Providers that support fabric direct im‐
23 plement their own versions of the static inline calls which are define
24 in the libfabric header files, define selected enum values, and provide
25 defines for compile-time optimizations. Applications can then code
26 against the standard libfabric calls, but link directly against the
27 provider calls by defining FABRIC_DIRECT as part of their build.
28
29 In general, the use of fabric direct does not require application
30 source code changes, and, instead, is limited to the build process.
31
32 Providers supporting fabric direct must install 'direct' versions of
33 all libfabric header files. For convenience, the libfabric sources
34 contain sample header files that may be modified by a provider. The
35 'direct' header file names have 'fi_direct' as their prefix: fi_di‐
36 rect.h, fi_direct_endpoint.h, etc.
37
38 Direct providers are prohibited from overriding or modifying existing
39 data structures. However, provider specific extensions are still
40 available. In addition to provider direct function calls to provider
41 code, a fabric direct provider may define zero of more of the following
42 capability definitions. Applications can check for these capabilities
43 in order to optimize code paths at compile time, versus relying on
44 run-time checks.
45
47 In order that application code may be optimized during compile time,
48 direct providers must provide definitions for various capabilities and
49 modes, if those capabilities are supported. The following #define val‐
50 ues may be used by an application to test for provider support of sup‐
51 ported features.
52
53 FI_DIRECT_CONTEXT
54 The provider sets FI_CONTEXT or FI_CONTEXT2 for fi_info:mode.
55 See fi_getinfo for additional details. When FI_DIRECT_CONTEXT
56 is defined, applications should use struct fi_context in their
57 definitions, even if FI_CONTEXT2 is set.
58
59 FI_DIRECT_LOCAL_MR
60 The provider sets FI_LOCAL_MR for fi_info:mode. See fi_getinfo
61 for additional details.
62
64 fi_getinfo(3), fi_endpoint(3), fi_domain(3)
65
67 OpenFabrics.
68
69
70
71Libfabric Programmer's Manual 2018-10-05 fi_direct(7)