-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patharchitecture.dot
More file actions
123 lines (107 loc) · 4.68 KB
/
Copy patharchitecture.dot
File metadata and controls
123 lines (107 loc) · 4.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
digraph GLASs_Architecture {
rankdir=LR;
fontsize=38;
nodesep=1.1;
ranksep=1.0;
node [shape=box, style="rounded,filled", fontsize=32, fillcolor=white, penwidth=2];
edge [fontsize=22];
// ==========================
// Client Layer
// ==========================
subgraph cluster_client {
label="Client Application";
style=filled;
color=lightgrey;
fillcolor=lightgrey;
ClientCode [label=<<TABLE BORDER="0" CELLBORDER="0" CELLSPACING="2">
<TR><TD ALIGN="LEFT"><B>Client Code</B></TD></TR>
<TR><TD ALIGN="LEFT">- constructs <B>C++ lambda functions</B>:</TD></TR>
<TR><TD ALIGN="LEFT"><FONT COLOR="#0000FF"> auto</FONT> matvec = [=](<FONT COLOR="#008000">x_in</FONT>, <FONT COLOR="#008000">x_out</FONT>) {</TD></TR>
<TR><TD ALIGN="LEFT"> <FONT COLOR="#808080">// matrix-vector product</FONT></TD></TR>
<TR><TD ALIGN="LEFT"> Operator(user_args, x_in, x_out);</TD></TR>
<TR><TD ALIGN="LEFT"> <FONT COLOR="#808080">// Comms</FONT></TD></TR>
<TR><TD ALIGN="LEFT"> halo_comms(user_args, x_in, x_out);</TD></TR>
<TR><TD ALIGN="LEFT"> };</TD></TR>
<TR><TD ALIGN="LEFT"> </TD></TR>
<TR><TD ALIGN="LEFT"><FONT COLOR="#0000FF"> auto</FONT> precond = [=](<FONT COLOR="#008000">x_in</FONT>, <FONT COLOR="#008000">x_out</FONT>) {</TD></TR>
<TR><TD ALIGN="LEFT"> <FONT COLOR="#808080">// optional preconditioner</FONT></TD></TR>
<TR><TD ALIGN="LEFT"> Preconditioner(user_args, x_in, x_out);</TD></TR>
<TR><TD ALIGN="LEFT"> <FONT COLOR="#808080">// Comms</FONT></TD></TR>
<TR><TD ALIGN="LEFT"> halo_comms(user_args, x_in, x_out);</TD></TR>
<TR><TD ALIGN="LEFT"> };</TD></TR>
<TR><TD ALIGN="LEFT"> </TD></TR>
<TR><TD ALIGN="LEFT"> * halo_comms(user_args, x_in, x_out) — operator comms</TD></TR>
<TR><TD ALIGN="LEFT">- instantiates solver family (constructor → plan)</TD></TR>
<TR><TD ALIGN="LEFT">- calls setup() then solve()</TD></TR>
</TABLE>>, fillcolor=white];
}
// ==========================
// IterSolvers API
// ==========================
subgraph cluster_interface {
label="IterSolvers Common class";
style=filled;
color=lightblue;
fillcolor=lightblue;
IterSolvers [label=<<TABLE BORDER="0" CELLBORDER="0" CELLSPACING="4">
<TR><TD><B>IterSolvers</B></TD></TR>
<TR><TD>Common use vars. for Solver Families </TD></TR>
<TR><TD>Constructor (parent) - calls plan() </TD></TR>
<TR><TD>Destructor (parent) </TD></TR>
<TR><TD>----------------------------------------------</TD></TR>
<TR><TD><B>Public API</B></TD></TR>
<TR><TD>plan(clientcomm, size, maxIters, tol)</TD></TR>
<TR><TD>setup(x0, rhs)</TD></TR>
<TR><TD>getSolution(x_out)</TD></TR>
</TABLE>>, fillcolor=white];
}
// ==========================
// Solver Families
// ==========================
subgraph cluster_solvers {
label="Solver Families";
style=filled;
color="#E6D5F7";
fillcolor="#E6D5F7";
GMRES [label="GMRES Solver
(inherits IterSolvers)
- gmresSolve(matvec,precond)
- gmresRestartSolve(matvec,precond)", fillcolor=white];
CG [label="Conjugate Gradient Family
(CG / FPCG / BiCGStab)
(inherits IterSolvers)
- cgSolve(matvec)
- fpcgSolve(matvec,precond)
- bicgstabSolve(matvec,precond)", fillcolor=white];
}
// ==========================
// Internal Utilities
// ==========================
subgraph cluster_internal {
label="Internal Utility Libraries";
style=filled;
color="#13a9a9";
fillcolor="#13a9a9";
HostUtils [label="Host utilities:
- TensorUtils (BLAS-like lib)
- Comm_Utils (Handles MPI, NCCL/RCCL, NVSHMEM*)", fillcolor=white];
DevUtils [label="Device utilities:
- DeviceMemory (CUDA/HIP memory handling)
- DeviceUtils (Kernel lauchers, NVTX, stream/BF16 handling)
- Kernels_Lv1 (Lv1 CUDA/HIP BLAS lib)", fillcolor=white];
EntryPoint [label="EntryPoint:
- Create solver logfile
- Create internal Comm_Utils object
- Aliases for std::functional operators", fillcolor=white];
}
// ==========================
// Arrows / Flow
// ==========================
EntryPoint -> IterSolvers [label="", arrowsize=1.8, penwidth=3.0]
HostUtils -> IterSolvers [label="", arrowsize=1.8, penwidth=3.0]
DevUtils -> IterSolvers [label="", arrowsize=1.8, penwidth=3.0]
IterSolvers -> GMRES,CG [label="", arrowsize=1.8, penwidth=3.0]
CG,GMRES -> ClientCode [label="", arrowsize=1.8, penwidth=3.0]
HostUtils,DevUtils -> ClientCode [label="optional usage", fontsize=32, arrowsize=1.8, color="#e71717", penwidth=3.0]
IterSolvers -> ClientCode [label="setup / getSolution", fontsize=32, arrowsize=1.8, penwidth=3.0]
}