@@ -18,9 +18,9 @@ option java_package = "org.tensorflow.framework";
18
18
option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf/for_core_protos_go_proto" ;
19
19
20
20
message GPUOptions {
21
- // Fraction of the available GPU memory to allocate for each process.
21
+ // Fraction of the total GPU memory to allocate for each process.
22
22
// 1 means to allocate all of the GPU memory, 0.5 means the process
23
- // allocates up to ~50% of the available GPU memory.
23
+ // allocates up to ~50% of the total GPU memory.
24
24
//
25
25
// GPU memory is pre-allocated unless the allow_growth option is enabled.
26
26
//
@@ -239,6 +239,19 @@ message GPUOptions {
239
239
// hopes that another thread will free up memory in the meantime. Setting
240
240
// this to true disables the sleep; instead we'll OOM immediately.
241
241
bool disallow_retry_on_allocation_failure = 12 ;
242
+
243
+ // Memory limit for "GPU host allocator", aka pinned memory allocator. This
244
+ // can also be set via the envvar TF_GPU_HOST_MEM_LIMIT_IN_MB.
245
+ float gpu_host_mem_limit_in_mb = 13 ;
246
+
247
+ // If true, then the host allocator allocates its max memory all upfront and
248
+ // never grows. This can be useful for latency-sensitive systems, because
249
+ // growing the GPU host memory pool can be expensive.
250
+ //
251
+ // You probably only want to use this in combination with
252
+ // gpu_host_mem_limit_in_mb, because the default GPU host memory limit is
253
+ // quite high.
254
+ bool gpu_host_mem_disallow_growth = 14 ;
242
255
}
243
256
244
257
// Everything inside experimental is subject to change and is not subject
@@ -582,7 +595,8 @@ message ConfigProto {
582
595
// If set, this can be used by the runtime and the Ops for debugging,
583
596
// monitoring, etc.
584
597
//
585
- // NOTE: This is currently used and propagated only by the direct session.
598
+ // NOTE: This is currently used and propagated only by the direct session
599
+ // and EagerContext.
586
600
SessionMetadata session_metadata = 11 ;
587
601
588
602
// If true, the session may treat the graph as being static for optimization
@@ -615,18 +629,9 @@ message ConfigProto {
615
629
MLIR_BRIDGE_ROLLOUT_ENABLED = 1 ;
616
630
// Disabling the MLIR bridge disables it for all graphs in this session.
617
631
MLIR_BRIDGE_ROLLOUT_DISABLED = 2 ;
618
- // Enable the MLIR bridge on a per graph basis based on an analysis of
619
- // the features used in the graph. If the features used by the graph are
620
- // supported by the MLIR bridge, the MLIR bridge will be used to run the
621
- // graph.
622
- MLIR_BRIDGE_ROLLOUT_SAFE_MODE_ENABLED = 3 ;
623
- // Enable the MLIR bridge in a fallback mode on a per graph basis based
624
- // on an analysis of the features used in the graph.
625
- // Running the MLIR bridge in the fallback mode means that it is
626
- // executed and it commits all the changes to the TF graph in case
627
- // of success. And it does not in case of failures and let the old bridge
628
- // to process the TF graph.
629
- MLIR_BRIDGE_ROLLOUT_SAFE_MODE_FALLBACK_ENABLED = 4 ;
632
+ reserved 3 , 4 ;
633
+ reserved "MLIR_BRIDGE_ROLLOUT_SAFE_MODE_ENABLED" ,
634
+ "MLIR_BRIDGE_ROLLOUT_SAFE_MODE_FALLBACK_ENABLED" ;
630
635
}
631
636
// Whether to enable the MLIR-based TF->XLA bridge.
632
637
MlirBridgeRollout mlir_bridge_rollout = 17 ;
@@ -675,7 +680,18 @@ message ConfigProto {
675
680
// Distributed coordination service configurations.
676
681
CoordinationServiceConfig coordination_config = 23 ;
677
682
678
- // Next: 24
683
+ // If true, the session will treat the graph as being non-static for
684
+ // optimization purposes.
685
+ //
686
+ // If this option is set to true when a session is created, the full
687
+ // GraphDef will be retained to enable calls to Session::Extend().
688
+ // Calling Extend() without setting this flag will result in errors.
689
+ //
690
+ // This option is meant to replace `optimize_for_static_graph` and it
691
+ // aims to negate its value.
692
+ bool disable_optimize_for_static_graph = 24 ;
693
+
694
+ // Next: 25
679
695
}
680
696
681
697
Experimental experimental = 16 ;
0 commit comments