Package org.tensorflow.framework
Interface RewriterConfigOrBuilder
-
- All Superinterfaces:
org.nd4j.shade.protobuf.MessageLiteOrBuilder
,org.nd4j.shade.protobuf.MessageOrBuilder
- All Known Implementing Classes:
RewriterConfig
,RewriterConfig.Builder
public interface RewriterConfigOrBuilder extends org.nd4j.shade.protobuf.MessageOrBuilder
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description RewriterConfig.Toggle
getArithmeticOptimization()
Arithmetic optimizations (default is ON) e.g.int
getArithmeticOptimizationValue()
Arithmetic optimizations (default is ON) e.g.AutoParallelOptions
getAutoParallel()
Configures AutoParallel optimization passes either through the meta-optimizer or when manually specified through the optimizers field.AutoParallelOptionsOrBuilder
getAutoParallelOrBuilder()
Configures AutoParallel optimization passes either through the meta-optimizer or when manually specified through the optimizers field.RewriterConfig.Toggle
getConstantFolding()
Fold constants (default is ON) Statically infer the value of tensors when possible, and materialize the result using constants.int
getConstantFoldingValue()
Fold constants (default is ON) Statically infer the value of tensors when possible, and materialize the result using constants.RewriterConfig.CustomGraphOptimizer
getCustomOptimizers(int index)
list of CustomGraphOptimizers to apply.int
getCustomOptimizersCount()
list of CustomGraphOptimizers to apply.List<RewriterConfig.CustomGraphOptimizer>
getCustomOptimizersList()
list of CustomGraphOptimizers to apply.RewriterConfig.CustomGraphOptimizerOrBuilder
getCustomOptimizersOrBuilder(int index)
list of CustomGraphOptimizers to apply.List<? extends RewriterConfig.CustomGraphOptimizerOrBuilder>
getCustomOptimizersOrBuilderList()
list of CustomGraphOptimizers to apply.RewriterConfig.Toggle
getDebugStripper()
Strips debug-related nodes from the graph (off by default).int
getDebugStripperValue()
Strips debug-related nodes from the graph (off by default).RewriterConfig.Toggle
getDependencyOptimization()
Control dependency optimizations (default is ON).int
getDependencyOptimizationValue()
Control dependency optimizations (default is ON).boolean
getDisableModelPruning()
If true, don't remove unnecessary ops from the graphRewriterConfig.Toggle
getFunctionOptimization()
Function optimizations (default is ON).int
getFunctionOptimizationValue()
Function optimizations (default is ON).RewriterConfig.Toggle
getLayoutOptimizer()
Optimize tensor layouts (default is ON) e.g.int
getLayoutOptimizerValue()
Optimize tensor layouts (default is ON) e.g.RewriterConfig.Toggle
getLoopOptimization()
Loop optimizations (default is ON).int
getLoopOptimizationValue()
Loop optimizations (default is ON).RewriterConfig.MemOptType
getMemoryOptimization()
Configures memory optimization passes through the meta-optimizer.int
getMemoryOptimizationValue()
Configures memory optimization passes through the meta-optimizer.String
getMemoryOptimizerTargetNodeNameScope()
A node name scope for node names which are valid outputs of recompuations.org.nd4j.shade.protobuf.ByteString
getMemoryOptimizerTargetNodeNameScopeBytes()
A node name scope for node names which are valid outputs of recompuations.RewriterConfig.NumIterationsType
getMetaOptimizerIterations()
Controls how many times we run the optimizers in meta optimizer (default is once).int
getMetaOptimizerIterationsValue()
Controls how many times we run the optimizers in meta optimizer (default is once).String
getOptimizers(int index)
If non-empty, will use this as an alternative way to specify a list of optimizations to turn on and the order of the optimizations (replacing the meta-optimizer).org.nd4j.shade.protobuf.ByteString
getOptimizersBytes(int index)
If non-empty, will use this as an alternative way to specify a list of optimizations to turn on and the order of the optimizations (replacing the meta-optimizer).int
getOptimizersCount()
If non-empty, will use this as an alternative way to specify a list of optimizations to turn on and the order of the optimizations (replacing the meta-optimizer).List<String>
getOptimizersList()
If non-empty, will use this as an alternative way to specify a list of optimizations to turn on and the order of the optimizations (replacing the meta-optimizer).RewriterConfig.Toggle
getRemapping()
Remapping (default is ON) Remap subgraphs onto more efficient implementations.int
getRemappingValue()
Remapping (default is ON) Remap subgraphs onto more efficient implementations.RewriterConfig.Toggle
getScopedAllocatorOptimization()
Try to allocate some independent Op outputs contiguously in order to merge or eliminate downstream Ops (off by default).int
getScopedAllocatorOptimizationValue()
Try to allocate some independent Op outputs contiguously in order to merge or eliminate downstream Ops (off by default).ScopedAllocatorOptions
getScopedAllocatorOpts()
.tensorflow.ScopedAllocatorOptions scoped_allocator_opts = 16;
ScopedAllocatorOptionsOrBuilder
getScopedAllocatorOptsOrBuilder()
.tensorflow.ScopedAllocatorOptions scoped_allocator_opts = 16;
RewriterConfig.Toggle
getShapeOptimization()
Shape optimizations (default is ON) Simplify computations made on shapes.int
getShapeOptimizationValue()
Shape optimizations (default is ON) Simplify computations made on shapes.boolean
hasAutoParallel()
Configures AutoParallel optimization passes either through the meta-optimizer or when manually specified through the optimizers field.boolean
hasScopedAllocatorOpts()
.tensorflow.ScopedAllocatorOptions scoped_allocator_opts = 16;
-
Methods inherited from interface org.nd4j.shade.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getDefaultInstanceForType, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
-
-
-
Method Detail
-
getLayoutOptimizerValue
int getLayoutOptimizerValue()
Optimize tensor layouts (default is ON) e.g. This will try to use NCHW layout on GPU which is faster.
.tensorflow.RewriterConfig.Toggle layout_optimizer = 1;
- Returns:
- The enum numeric value on the wire for layoutOptimizer.
-
getLayoutOptimizer
RewriterConfig.Toggle getLayoutOptimizer()
Optimize tensor layouts (default is ON) e.g. This will try to use NCHW layout on GPU which is faster.
.tensorflow.RewriterConfig.Toggle layout_optimizer = 1;
- Returns:
- The layoutOptimizer.
-
getConstantFoldingValue
int getConstantFoldingValue()
Fold constants (default is ON) Statically infer the value of tensors when possible, and materialize the result using constants.
.tensorflow.RewriterConfig.Toggle constant_folding = 3;
- Returns:
- The enum numeric value on the wire for constantFolding.
-
getConstantFolding
RewriterConfig.Toggle getConstantFolding()
Fold constants (default is ON) Statically infer the value of tensors when possible, and materialize the result using constants.
.tensorflow.RewriterConfig.Toggle constant_folding = 3;
- Returns:
- The constantFolding.
-
getShapeOptimizationValue
int getShapeOptimizationValue()
Shape optimizations (default is ON) Simplify computations made on shapes.
.tensorflow.RewriterConfig.Toggle shape_optimization = 13;
- Returns:
- The enum numeric value on the wire for shapeOptimization.
-
getShapeOptimization
RewriterConfig.Toggle getShapeOptimization()
Shape optimizations (default is ON) Simplify computations made on shapes.
.tensorflow.RewriterConfig.Toggle shape_optimization = 13;
- Returns:
- The shapeOptimization.
-
getRemappingValue
int getRemappingValue()
Remapping (default is ON) Remap subgraphs onto more efficient implementations.
.tensorflow.RewriterConfig.Toggle remapping = 14;
- Returns:
- The enum numeric value on the wire for remapping.
-
getRemapping
RewriterConfig.Toggle getRemapping()
Remapping (default is ON) Remap subgraphs onto more efficient implementations.
.tensorflow.RewriterConfig.Toggle remapping = 14;
- Returns:
- The remapping.
-
getArithmeticOptimizationValue
int getArithmeticOptimizationValue()
Arithmetic optimizations (default is ON) e.g. Simplify arithmetic ops; merge ops with same value (like constants).
.tensorflow.RewriterConfig.Toggle arithmetic_optimization = 7;
- Returns:
- The enum numeric value on the wire for arithmeticOptimization.
-
getArithmeticOptimization
RewriterConfig.Toggle getArithmeticOptimization()
Arithmetic optimizations (default is ON) e.g. Simplify arithmetic ops; merge ops with same value (like constants).
.tensorflow.RewriterConfig.Toggle arithmetic_optimization = 7;
- Returns:
- The arithmeticOptimization.
-
getDependencyOptimizationValue
int getDependencyOptimizationValue()
Control dependency optimizations (default is ON). Remove redundant control dependencies, which may enable other optimization.
.tensorflow.RewriterConfig.Toggle dependency_optimization = 8;
- Returns:
- The enum numeric value on the wire for dependencyOptimization.
-
getDependencyOptimization
RewriterConfig.Toggle getDependencyOptimization()
Control dependency optimizations (default is ON). Remove redundant control dependencies, which may enable other optimization.
.tensorflow.RewriterConfig.Toggle dependency_optimization = 8;
- Returns:
- The dependencyOptimization.
-
getLoopOptimizationValue
int getLoopOptimizationValue()
Loop optimizations (default is ON).
.tensorflow.RewriterConfig.Toggle loop_optimization = 9;
- Returns:
- The enum numeric value on the wire for loopOptimization.
-
getLoopOptimization
RewriterConfig.Toggle getLoopOptimization()
Loop optimizations (default is ON).
.tensorflow.RewriterConfig.Toggle loop_optimization = 9;
- Returns:
- The loopOptimization.
-
getFunctionOptimizationValue
int getFunctionOptimizationValue()
Function optimizations (default is ON).
.tensorflow.RewriterConfig.Toggle function_optimization = 10;
- Returns:
- The enum numeric value on the wire for functionOptimization.
-
getFunctionOptimization
RewriterConfig.Toggle getFunctionOptimization()
Function optimizations (default is ON).
.tensorflow.RewriterConfig.Toggle function_optimization = 10;
- Returns:
- The functionOptimization.
-
getDebugStripperValue
int getDebugStripperValue()
Strips debug-related nodes from the graph (off by default).
.tensorflow.RewriterConfig.Toggle debug_stripper = 11;
- Returns:
- The enum numeric value on the wire for debugStripper.
-
getDebugStripper
RewriterConfig.Toggle getDebugStripper()
Strips debug-related nodes from the graph (off by default).
.tensorflow.RewriterConfig.Toggle debug_stripper = 11;
- Returns:
- The debugStripper.
-
getDisableModelPruning
boolean getDisableModelPruning()
If true, don't remove unnecessary ops from the graph
bool disable_model_pruning = 2;
- Returns:
- The disableModelPruning.
-
getScopedAllocatorOptimizationValue
int getScopedAllocatorOptimizationValue()
Try to allocate some independent Op outputs contiguously in order to merge or eliminate downstream Ops (off by default).
.tensorflow.RewriterConfig.Toggle scoped_allocator_optimization = 15;
- Returns:
- The enum numeric value on the wire for scopedAllocatorOptimization.
-
getScopedAllocatorOptimization
RewriterConfig.Toggle getScopedAllocatorOptimization()
Try to allocate some independent Op outputs contiguously in order to merge or eliminate downstream Ops (off by default).
.tensorflow.RewriterConfig.Toggle scoped_allocator_optimization = 15;
- Returns:
- The scopedAllocatorOptimization.
-
getMetaOptimizerIterationsValue
int getMetaOptimizerIterationsValue()
Controls how many times we run the optimizers in meta optimizer (default is once).
.tensorflow.RewriterConfig.NumIterationsType meta_optimizer_iterations = 12;
- Returns:
- The enum numeric value on the wire for metaOptimizerIterations.
-
getMetaOptimizerIterations
RewriterConfig.NumIterationsType getMetaOptimizerIterations()
Controls how many times we run the optimizers in meta optimizer (default is once).
.tensorflow.RewriterConfig.NumIterationsType meta_optimizer_iterations = 12;
- Returns:
- The metaOptimizerIterations.
-
getMemoryOptimizationValue
int getMemoryOptimizationValue()
Configures memory optimization passes through the meta-optimizer. Has no effect on manually requested memory optimization passes in the optimizers field.
.tensorflow.RewriterConfig.MemOptType memory_optimization = 4;
- Returns:
- The enum numeric value on the wire for memoryOptimization.
-
getMemoryOptimization
RewriterConfig.MemOptType getMemoryOptimization()
Configures memory optimization passes through the meta-optimizer. Has no effect on manually requested memory optimization passes in the optimizers field.
.tensorflow.RewriterConfig.MemOptType memory_optimization = 4;
- Returns:
- The memoryOptimization.
-
getMemoryOptimizerTargetNodeNameScope
String getMemoryOptimizerTargetNodeNameScope()
A node name scope for node names which are valid outputs of recompuations. Inputs to nodes that match this scope may be recomputed (subject either to manual annotation of those input nodes or to manual annotation and heuristics depending on memory_optimization), but the nodes themselves will not be recomputed. This matches any sub-scopes as well, meaning the scope can appear not just as a top-level scope. For example, if the value is "gradients/", the default, it will match node name "gradients/foo", "foo/gradients/bar", but not "foo_gradients/"
string memory_optimizer_target_node_name_scope = 6;
- Returns:
- The memoryOptimizerTargetNodeNameScope.
-
getMemoryOptimizerTargetNodeNameScopeBytes
org.nd4j.shade.protobuf.ByteString getMemoryOptimizerTargetNodeNameScopeBytes()
A node name scope for node names which are valid outputs of recompuations. Inputs to nodes that match this scope may be recomputed (subject either to manual annotation of those input nodes or to manual annotation and heuristics depending on memory_optimization), but the nodes themselves will not be recomputed. This matches any sub-scopes as well, meaning the scope can appear not just as a top-level scope. For example, if the value is "gradients/", the default, it will match node name "gradients/foo", "foo/gradients/bar", but not "foo_gradients/"
string memory_optimizer_target_node_name_scope = 6;
- Returns:
- The bytes for memoryOptimizerTargetNodeNameScope.
-
hasAutoParallel
boolean hasAutoParallel()
Configures AutoParallel optimization passes either through the meta-optimizer or when manually specified through the optimizers field.
.tensorflow.AutoParallelOptions auto_parallel = 5;
- Returns:
- Whether the autoParallel field is set.
-
getAutoParallel
AutoParallelOptions getAutoParallel()
Configures AutoParallel optimization passes either through the meta-optimizer or when manually specified through the optimizers field.
.tensorflow.AutoParallelOptions auto_parallel = 5;
- Returns:
- The autoParallel.
-
getAutoParallelOrBuilder
AutoParallelOptionsOrBuilder getAutoParallelOrBuilder()
Configures AutoParallel optimization passes either through the meta-optimizer or when manually specified through the optimizers field.
.tensorflow.AutoParallelOptions auto_parallel = 5;
-
hasScopedAllocatorOpts
boolean hasScopedAllocatorOpts()
.tensorflow.ScopedAllocatorOptions scoped_allocator_opts = 16;
- Returns:
- Whether the scopedAllocatorOpts field is set.
-
getScopedAllocatorOpts
ScopedAllocatorOptions getScopedAllocatorOpts()
.tensorflow.ScopedAllocatorOptions scoped_allocator_opts = 16;
- Returns:
- The scopedAllocatorOpts.
-
getScopedAllocatorOptsOrBuilder
ScopedAllocatorOptionsOrBuilder getScopedAllocatorOptsOrBuilder()
.tensorflow.ScopedAllocatorOptions scoped_allocator_opts = 16;
-
getOptimizersList
List<String> getOptimizersList()
If non-empty, will use this as an alternative way to specify a list of optimizations to turn on and the order of the optimizations (replacing the meta-optimizer). Of the RewriterConfig options, only the AutoParallel configuration options (the auto_parallel field) apply to manually requested optimization passes ("autoparallel"). Memory optimization passes ("memory") invoked here are not configurable (in contrast to memory optimization passes through the meta-optimizer) and act only on manual op annotations. Custom registered optimizers will be run after the base optimizers, in the order that they are specified.
repeated string optimizers = 100;
- Returns:
- A list containing the optimizers.
-
getOptimizersCount
int getOptimizersCount()
If non-empty, will use this as an alternative way to specify a list of optimizations to turn on and the order of the optimizations (replacing the meta-optimizer). Of the RewriterConfig options, only the AutoParallel configuration options (the auto_parallel field) apply to manually requested optimization passes ("autoparallel"). Memory optimization passes ("memory") invoked here are not configurable (in contrast to memory optimization passes through the meta-optimizer) and act only on manual op annotations. Custom registered optimizers will be run after the base optimizers, in the order that they are specified.
repeated string optimizers = 100;
- Returns:
- The count of optimizers.
-
getOptimizers
String getOptimizers(int index)
If non-empty, will use this as an alternative way to specify a list of optimizations to turn on and the order of the optimizations (replacing the meta-optimizer). Of the RewriterConfig options, only the AutoParallel configuration options (the auto_parallel field) apply to manually requested optimization passes ("autoparallel"). Memory optimization passes ("memory") invoked here are not configurable (in contrast to memory optimization passes through the meta-optimizer) and act only on manual op annotations. Custom registered optimizers will be run after the base optimizers, in the order that they are specified.
repeated string optimizers = 100;
- Parameters:
index
- The index of the element to return.- Returns:
- The optimizers at the given index.
-
getOptimizersBytes
org.nd4j.shade.protobuf.ByteString getOptimizersBytes(int index)
If non-empty, will use this as an alternative way to specify a list of optimizations to turn on and the order of the optimizations (replacing the meta-optimizer). Of the RewriterConfig options, only the AutoParallel configuration options (the auto_parallel field) apply to manually requested optimization passes ("autoparallel"). Memory optimization passes ("memory") invoked here are not configurable (in contrast to memory optimization passes through the meta-optimizer) and act only on manual op annotations. Custom registered optimizers will be run after the base optimizers, in the order that they are specified.
repeated string optimizers = 100;
- Parameters:
index
- The index of the value to return.- Returns:
- The bytes of the optimizers at the given index.
-
getCustomOptimizersList
List<RewriterConfig.CustomGraphOptimizer> getCustomOptimizersList()
list of CustomGraphOptimizers to apply.
repeated .tensorflow.RewriterConfig.CustomGraphOptimizer custom_optimizers = 200;
-
getCustomOptimizers
RewriterConfig.CustomGraphOptimizer getCustomOptimizers(int index)
list of CustomGraphOptimizers to apply.
repeated .tensorflow.RewriterConfig.CustomGraphOptimizer custom_optimizers = 200;
-
getCustomOptimizersCount
int getCustomOptimizersCount()
list of CustomGraphOptimizers to apply.
repeated .tensorflow.RewriterConfig.CustomGraphOptimizer custom_optimizers = 200;
-
getCustomOptimizersOrBuilderList
List<? extends RewriterConfig.CustomGraphOptimizerOrBuilder> getCustomOptimizersOrBuilderList()
list of CustomGraphOptimizers to apply.
repeated .tensorflow.RewriterConfig.CustomGraphOptimizer custom_optimizers = 200;
-
getCustomOptimizersOrBuilder
RewriterConfig.CustomGraphOptimizerOrBuilder getCustomOptimizersOrBuilder(int index)
list of CustomGraphOptimizers to apply.
repeated .tensorflow.RewriterConfig.CustomGraphOptimizer custom_optimizers = 200;
-
-