1 // Generated by the protocol buffer compiler.  DO NOT EDIT!
2 // source: tensorflow/core/protobuf/config.proto
3 
4 module tensorflow.config;
5 
6 import google.protobuf;
7 import tensorflow.cost_graph;
8 import tensorflow.graph;
9 import tensorflow.step_stats;
10 import tensorflow.cluster;
11 import tensorflow.debug_;
12 import tensorflow.rewriter_config;
13 
14 enum protocVersion = 3012004;
15 
16 class GPUOptions
17 {
18     @Proto(1) double perProcessGpuMemoryFraction = protoDefaultValue!(double);
19     @Proto(2) string allocatorType = protoDefaultValue!(string);
20     @Proto(3) long deferredDeletionBytes = protoDefaultValue!(long);
21     @Proto(4) bool allowGrowth = protoDefaultValue!(bool);
22     @Proto(5) string visibleDeviceList = protoDefaultValue!(string);
23     @Proto(6) int pollingActiveDelayUsecs = protoDefaultValue!(int);
24     @Proto(7) int pollingInactiveDelayMsecs = protoDefaultValue!(int);
25     @Proto(8) bool forceGpuCompatible = protoDefaultValue!(bool);
26     @Proto(9) GPUOptions.Experimental experimental = protoDefaultValue!(GPUOptions.Experimental);
27 
28     static class Experimental
29     {
30         @Proto(1) GPUOptions.Experimental.VirtualDevices[] virtualDevices = protoDefaultValue!(GPUOptions.Experimental.VirtualDevices[]);
31         @Proto(2) bool useUnifiedMemory = protoDefaultValue!(bool);
32         @Proto(3) int numDevToDevCopyStreams = protoDefaultValue!(int);
33         @Proto(4) string collectiveRingOrder = protoDefaultValue!(string);
34         @Proto(5) bool timestampedAllocator = protoDefaultValue!(bool);
35         @Proto(7) int kernelTrackerMaxInterval = protoDefaultValue!(int);
36         @Proto(8) int kernelTrackerMaxBytes = protoDefaultValue!(int);
37         @Proto(9) int kernelTrackerMaxPending = protoDefaultValue!(int);
38 
39         static class VirtualDevices
40         {
41             @Proto(1, Wire.none, Yes.packed) float[] memoryLimitMb = protoDefaultValue!(float[]);
42         }
43     }
44 }
45 
46 class OptimizerOptions
47 {
48     @Proto(1) bool doCommonSubexpressionElimination = protoDefaultValue!(bool);
49     @Proto(2) bool doConstantFolding = protoDefaultValue!(bool);
50     @Proto(3) Level optLevel = protoDefaultValue!(Level);
51     @Proto(4) bool doFunctionInlining = protoDefaultValue!(bool);
52     @Proto(5) GlobalJitLevel globalJitLevel = protoDefaultValue!(GlobalJitLevel);
53     @Proto(6) long maxFoldedConstantInBytes = protoDefaultValue!(long);
54 
55     enum Level
56     {
57         L1 = 0,
58         L0 = -1,
59     }
60 
61     enum GlobalJitLevel
62     {
63         DEFAULT = 0,
64         OFF = -1,
65         ON_1 = 1,
66         ON_2 = 2,
67     }
68 }
69 
70 class GraphOptions
71 {
72     @Proto(2) bool enableRecvScheduling = protoDefaultValue!(bool);
73     @Proto(3) OptimizerOptions optimizerOptions = protoDefaultValue!(OptimizerOptions);
74     @Proto(4) long buildCostModel = protoDefaultValue!(long);
75     @Proto(5) bool inferShapes = protoDefaultValue!(bool);
76     @Proto(6) bool placePrunedGraph = protoDefaultValue!(bool);
77     @Proto(7) bool enableBfloat16Sendrecv = protoDefaultValue!(bool);
78     @Proto(8) int timelineStep = protoDefaultValue!(int);
79     @Proto(9) long buildCostModelAfter = protoDefaultValue!(long);
80     @Proto(10) RewriterConfig rewriteOptions = protoDefaultValue!(RewriterConfig);
81 }
82 
83 class ThreadPoolOptionProto
84 {
85     @Proto(1) int numThreads = protoDefaultValue!(int);
86     @Proto(2) string globalName = protoDefaultValue!(string);
87 }
88 
89 class RPCOptions
90 {
91     @Proto(1) bool useRpcForInprocessMaster = protoDefaultValue!(bool);
92     @Proto(2) string compressionAlgorithm = protoDefaultValue!(string);
93     @Proto(3) int compressionLevel = protoDefaultValue!(int);
94     @Proto(4) bool cacheRpcResponse = protoDefaultValue!(bool);
95     @Proto(5) bool disableSessionConnectionSharing = protoDefaultValue!(bool);
96 }
97 
98 class SessionMetadata
99 {
100     @Proto(1) string name = protoDefaultValue!(string);
101     @Proto(2) long version_ = protoDefaultValue!(long);
102 }
103 
104 class ConfigProto
105 {
106     @Proto(1) int[string] deviceCount = protoDefaultValue!(int[string]);
107     @Proto(2) int intraOpParallelismThreads = protoDefaultValue!(int);
108     @Proto(3) int placementPeriod = protoDefaultValue!(int);
109     @Proto(4) string[] deviceFilters = protoDefaultValue!(string[]);
110     @Proto(5) int interOpParallelismThreads = protoDefaultValue!(int);
111     @Proto(6) GPUOptions gpuOptions = protoDefaultValue!(GPUOptions);
112     @Proto(7) bool allowSoftPlacement = protoDefaultValue!(bool);
113     @Proto(8) bool logDevicePlacement = protoDefaultValue!(bool);
114     @Proto(9) bool usePerSessionThreads = protoDefaultValue!(bool);
115     @Proto(10) GraphOptions graphOptions = protoDefaultValue!(GraphOptions);
116     @Proto(11) long operationTimeoutInMs = protoDefaultValue!(long);
117     @Proto(12) ThreadPoolOptionProto[] sessionInterOpThreadPool = protoDefaultValue!(ThreadPoolOptionProto[]);
118     @Proto(13) RPCOptions rpcOptions = protoDefaultValue!(RPCOptions);
119     @Proto(14) ClusterDef clusterDef = protoDefaultValue!(ClusterDef);
120     @Proto(15) bool isolateSessionState = protoDefaultValue!(bool);
121     @Proto(16) ConfigProto.Experimental experimental = protoDefaultValue!(ConfigProto.Experimental);
122 
123     static class Experimental
124     {
125         @Proto(1) string collectiveGroupLeader = protoDefaultValue!(string);
126         @Proto(3) string executorType = protoDefaultValue!(string);
127         @Proto(4) int recvBufMaxChunk = protoDefaultValue!(int);
128         @Proto(5) bool useNumaAffinity = protoDefaultValue!(bool);
129         @Proto(6) bool collectiveDeterministicSequentialExecution = protoDefaultValue!(bool);
130         @Proto(7) bool collectiveNccl = protoDefaultValue!(bool);
131         @Proto(8) bool shareSessionStateInClusterspecPropagation = protoDefaultValue!(bool);
132         @Proto(9) bool disableThreadSpinning = protoDefaultValue!(bool);
133         @Proto(10) bool shareClusterDevicesInSession = protoDefaultValue!(bool);
134         @Proto(11) SessionMetadata sessionMetadata = protoDefaultValue!(SessionMetadata);
135         @Proto(12) bool optimizeForStaticGraph = protoDefaultValue!(bool);
136         @Proto(13) bool enableMlirBridge = protoDefaultValue!(bool);
137         @Proto(14) bool disableOutputPartitionGraphs = protoDefaultValue!(bool);
138         @Proto(15) long xlaFusionAutotunerThresh = protoDefaultValue!(long);
139     }
140 }
141 
142 class RunOptions
143 {
144     @Proto(1) TraceLevel traceLevel = protoDefaultValue!(TraceLevel);
145     @Proto(2) long timeoutInMs = protoDefaultValue!(long);
146     @Proto(3) int interOpThreadPool = protoDefaultValue!(int);
147     @Proto(5) bool outputPartitionGraphs = protoDefaultValue!(bool);
148     @Proto(6) DebugOptions debugOptions = protoDefaultValue!(DebugOptions);
149     @Proto(7) bool reportTensorAllocationsUponOom = protoDefaultValue!(bool);
150     @Proto(8) RunOptions.Experimental experimental = protoDefaultValue!(RunOptions.Experimental);
151 
152     static class Experimental
153     {
154         @Proto(1) long collectiveGraphKey = protoDefaultValue!(long);
155         @Proto(2) bool useRunHandlerPool = protoDefaultValue!(bool);
156     }
157 
158     enum TraceLevel
159     {
160         NO_TRACE = 0,
161         SOFTWARE_TRACE = 1,
162         HARDWARE_TRACE = 2,
163         FULL_TRACE = 3,
164     }
165 }
166 
167 class RunMetadata
168 {
169     @Proto(1) StepStats stepStats = protoDefaultValue!(StepStats);
170     @Proto(2) CostGraphDef costGraph = protoDefaultValue!(CostGraphDef);
171     @Proto(3) GraphDef[] partitionGraphs = protoDefaultValue!(GraphDef[]);
172     @Proto(4) RunMetadata.FunctionGraphs[] functionGraphs = protoDefaultValue!(RunMetadata.FunctionGraphs[]);
173 
174     static class FunctionGraphs
175     {
176         @Proto(1) GraphDef[] partitionGraphs = protoDefaultValue!(GraphDef[]);
177         @Proto(2) GraphDef preOptimizationGraph = protoDefaultValue!(GraphDef);
178         @Proto(3) GraphDef postOptimizationGraph = protoDefaultValue!(GraphDef);
179     }
180 }
181 
182 class TensorConnection
183 {
184     @Proto(1) string fromTensor = protoDefaultValue!(string);
185     @Proto(2) string toTensor = protoDefaultValue!(string);
186 }
187 
188 class CallableOptions
189 {
190     @Proto(1) string[] feed = protoDefaultValue!(string[]);
191     @Proto(2) string[] fetch = protoDefaultValue!(string[]);
192     @Proto(3) string[] target = protoDefaultValue!(string[]);
193     @Proto(4) RunOptions runOptions = protoDefaultValue!(RunOptions);
194     @Proto(5) TensorConnection[] tensorConnection = protoDefaultValue!(TensorConnection[]);
195     @Proto(6) string[string] feedDevices = protoDefaultValue!(string[string]);
196     @Proto(7) string[string] fetchDevices = protoDefaultValue!(string[string]);
197     @Proto(8) bool fetchSkipSync = protoDefaultValue!(bool);
198 }