Class GraphOptions.Builder

  • All Implemented Interfaces:
    com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, java.lang.Cloneable, GraphOptionsOrBuilder
    Enclosing class:
    GraphOptions

    public static final class GraphOptions.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<GraphOptions.Builder>
    implements GraphOptionsOrBuilder
    Protobuf type org.platanios.tensorflow.proto.GraphOptions
    • Method Detail

      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<GraphOptions.Builder>
      • clear

        public GraphOptions.Builder clear()
        Specified by:
        clear in interface com.google.protobuf.Message.Builder
        Specified by:
        clear in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clear in class com.google.protobuf.GeneratedMessageV3.Builder<GraphOptions.Builder>
      • getDescriptorForType

        public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
        Specified by:
        getDescriptorForType in interface com.google.protobuf.Message.Builder
        Specified by:
        getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
        Overrides:
        getDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<GraphOptions.Builder>
      • getDefaultInstanceForType

        public GraphOptions getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
      • build

        public GraphOptions build()
        Specified by:
        build in interface com.google.protobuf.Message.Builder
        Specified by:
        build in interface com.google.protobuf.MessageLite.Builder
      • buildPartial

        public GraphOptions buildPartial()
        Specified by:
        buildPartial in interface com.google.protobuf.Message.Builder
        Specified by:
        buildPartial in interface com.google.protobuf.MessageLite.Builder
      • clone

        public GraphOptions.Builder clone()
        Specified by:
        clone in interface com.google.protobuf.Message.Builder
        Specified by:
        clone in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clone in class com.google.protobuf.GeneratedMessageV3.Builder<GraphOptions.Builder>
      • setField

        public GraphOptions.Builder setField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                             java.lang.Object value)
        Specified by:
        setField in interface com.google.protobuf.Message.Builder
        Overrides:
        setField in class com.google.protobuf.GeneratedMessageV3.Builder<GraphOptions.Builder>
      • clearField

        public GraphOptions.Builder clearField​(com.google.protobuf.Descriptors.FieldDescriptor field)
        Specified by:
        clearField in interface com.google.protobuf.Message.Builder
        Overrides:
        clearField in class com.google.protobuf.GeneratedMessageV3.Builder<GraphOptions.Builder>
      • clearOneof

        public GraphOptions.Builder clearOneof​(com.google.protobuf.Descriptors.OneofDescriptor oneof)
        Specified by:
        clearOneof in interface com.google.protobuf.Message.Builder
        Overrides:
        clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<GraphOptions.Builder>
      • setRepeatedField

        public GraphOptions.Builder setRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                     int index,
                                                     java.lang.Object value)
        Specified by:
        setRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<GraphOptions.Builder>
      • addRepeatedField

        public GraphOptions.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                     java.lang.Object value)
        Specified by:
        addRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<GraphOptions.Builder>
      • mergeFrom

        public GraphOptions.Builder mergeFrom​(com.google.protobuf.Message other)
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<GraphOptions.Builder>
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<GraphOptions.Builder>
      • mergeFrom

        public GraphOptions.Builder mergeFrom​(com.google.protobuf.CodedInputStream input,
                                              com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                       throws java.io.IOException
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Specified by:
        mergeFrom in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<GraphOptions.Builder>
        Throws:
        java.io.IOException
      • getEnableRecvScheduling

        public boolean getEnableRecvScheduling()
         If true, use control flow to schedule the activation of Recv nodes.
         (Currently ignored.)
         
        bool enable_recv_scheduling = 2;
        Specified by:
        getEnableRecvScheduling in interface GraphOptionsOrBuilder
        Returns:
        The enableRecvScheduling.
      • setEnableRecvScheduling

        public GraphOptions.Builder setEnableRecvScheduling​(boolean value)
         If true, use control flow to schedule the activation of Recv nodes.
         (Currently ignored.)
         
        bool enable_recv_scheduling = 2;
        Parameters:
        value - The enableRecvScheduling to set.
        Returns:
        This builder for chaining.
      • clearEnableRecvScheduling

        public GraphOptions.Builder clearEnableRecvScheduling()
         If true, use control flow to schedule the activation of Recv nodes.
         (Currently ignored.)
         
        bool enable_recv_scheduling = 2;
        Returns:
        This builder for chaining.
      • hasOptimizerOptions

        public boolean hasOptimizerOptions()
         Options controlling how graph is optimized.
         
        .org.platanios.tensorflow.proto.OptimizerOptions optimizer_options = 3;
        Specified by:
        hasOptimizerOptions in interface GraphOptionsOrBuilder
        Returns:
        Whether the optimizerOptions field is set.
      • getOptimizerOptions

        public OptimizerOptions getOptimizerOptions()
         Options controlling how graph is optimized.
         
        .org.platanios.tensorflow.proto.OptimizerOptions optimizer_options = 3;
        Specified by:
        getOptimizerOptions in interface GraphOptionsOrBuilder
        Returns:
        The optimizerOptions.
      • setOptimizerOptions

        public GraphOptions.Builder setOptimizerOptions​(OptimizerOptions value)
         Options controlling how graph is optimized.
         
        .org.platanios.tensorflow.proto.OptimizerOptions optimizer_options = 3;
      • setOptimizerOptions

        public GraphOptions.Builder setOptimizerOptions​(OptimizerOptions.Builder builderForValue)
         Options controlling how graph is optimized.
         
        .org.platanios.tensorflow.proto.OptimizerOptions optimizer_options = 3;
      • mergeOptimizerOptions

        public GraphOptions.Builder mergeOptimizerOptions​(OptimizerOptions value)
         Options controlling how graph is optimized.
         
        .org.platanios.tensorflow.proto.OptimizerOptions optimizer_options = 3;
      • clearOptimizerOptions

        public GraphOptions.Builder clearOptimizerOptions()
         Options controlling how graph is optimized.
         
        .org.platanios.tensorflow.proto.OptimizerOptions optimizer_options = 3;
      • getOptimizerOptionsBuilder

        public OptimizerOptions.Builder getOptimizerOptionsBuilder()
         Options controlling how graph is optimized.
         
        .org.platanios.tensorflow.proto.OptimizerOptions optimizer_options = 3;
      • getBuildCostModel

        public long getBuildCostModel()
         The number of steps to run before returning a cost model detailing
         the memory usage and performance of each node of the graph. 0 means
         no cost model.
         
        int64 build_cost_model = 4;
        Specified by:
        getBuildCostModel in interface GraphOptionsOrBuilder
        Returns:
        The buildCostModel.
      • setBuildCostModel

        public GraphOptions.Builder setBuildCostModel​(long value)
         The number of steps to run before returning a cost model detailing
         the memory usage and performance of each node of the graph. 0 means
         no cost model.
         
        int64 build_cost_model = 4;
        Parameters:
        value - The buildCostModel to set.
        Returns:
        This builder for chaining.
      • clearBuildCostModel

        public GraphOptions.Builder clearBuildCostModel()
         The number of steps to run before returning a cost model detailing
         the memory usage and performance of each node of the graph. 0 means
         no cost model.
         
        int64 build_cost_model = 4;
        Returns:
        This builder for chaining.
      • getBuildCostModelAfter

        public long getBuildCostModelAfter()
         The number of steps to skip before collecting statistics for the
         cost model.
         
        int64 build_cost_model_after = 9;
        Specified by:
        getBuildCostModelAfter in interface GraphOptionsOrBuilder
        Returns:
        The buildCostModelAfter.
      • setBuildCostModelAfter

        public GraphOptions.Builder setBuildCostModelAfter​(long value)
         The number of steps to skip before collecting statistics for the
         cost model.
         
        int64 build_cost_model_after = 9;
        Parameters:
        value - The buildCostModelAfter to set.
        Returns:
        This builder for chaining.
      • clearBuildCostModelAfter

        public GraphOptions.Builder clearBuildCostModelAfter()
         The number of steps to skip before collecting statistics for the
         cost model.
         
        int64 build_cost_model_after = 9;
        Returns:
        This builder for chaining.
      • getInferShapes

        public boolean getInferShapes()
         Annotate each Node with Op output shape data, to the extent it can
         be statically inferred.
         
        bool infer_shapes = 5;
        Specified by:
        getInferShapes in interface GraphOptionsOrBuilder
        Returns:
        The inferShapes.
      • setInferShapes

        public GraphOptions.Builder setInferShapes​(boolean value)
         Annotate each Node with Op output shape data, to the extent it can
         be statically inferred.
         
        bool infer_shapes = 5;
        Parameters:
        value - The inferShapes to set.
        Returns:
        This builder for chaining.
      • clearInferShapes

        public GraphOptions.Builder clearInferShapes()
         Annotate each Node with Op output shape data, to the extent it can
         be statically inferred.
         
        bool infer_shapes = 5;
        Returns:
        This builder for chaining.
      • getPlacePrunedGraph

        public boolean getPlacePrunedGraph()
         Only place the subgraphs that are run, rather than the entire graph.
         This is useful for interactive graph building, where one might
         produce graphs that cannot be placed during the debugging
         process.  In particular, it allows the client to continue work in
         a session after adding a node to a graph whose placement
         constraints are unsatisfiable.
         
        bool place_pruned_graph = 6;
        Specified by:
        getPlacePrunedGraph in interface GraphOptionsOrBuilder
        Returns:
        The placePrunedGraph.
      • setPlacePrunedGraph

        public GraphOptions.Builder setPlacePrunedGraph​(boolean value)
         Only place the subgraphs that are run, rather than the entire graph.
         This is useful for interactive graph building, where one might
         produce graphs that cannot be placed during the debugging
         process.  In particular, it allows the client to continue work in
         a session after adding a node to a graph whose placement
         constraints are unsatisfiable.
         
        bool place_pruned_graph = 6;
        Parameters:
        value - The placePrunedGraph to set.
        Returns:
        This builder for chaining.
      • clearPlacePrunedGraph

        public GraphOptions.Builder clearPlacePrunedGraph()
         Only place the subgraphs that are run, rather than the entire graph.
         This is useful for interactive graph building, where one might
         produce graphs that cannot be placed during the debugging
         process.  In particular, it allows the client to continue work in
         a session after adding a node to a graph whose placement
         constraints are unsatisfiable.
         
        bool place_pruned_graph = 6;
        Returns:
        This builder for chaining.
      • getEnableBfloat16Sendrecv

        public boolean getEnableBfloat16Sendrecv()
         If true, transfer float values between processes as bfloat16.
         
        bool enable_bfloat16_sendrecv = 7;
        Specified by:
        getEnableBfloat16Sendrecv in interface GraphOptionsOrBuilder
        Returns:
        The enableBfloat16Sendrecv.
      • setEnableBfloat16Sendrecv

        public GraphOptions.Builder setEnableBfloat16Sendrecv​(boolean value)
         If true, transfer float values between processes as bfloat16.
         
        bool enable_bfloat16_sendrecv = 7;
        Parameters:
        value - The enableBfloat16Sendrecv to set.
        Returns:
        This builder for chaining.
      • clearEnableBfloat16Sendrecv

        public GraphOptions.Builder clearEnableBfloat16Sendrecv()
         If true, transfer float values between processes as bfloat16.
         
        bool enable_bfloat16_sendrecv = 7;
        Returns:
        This builder for chaining.
      • getTimelineStep

        public int getTimelineStep()
         If > 0, record a timeline every this many steps.
         EXPERIMENTAL: This currently has no effect in MasterSession.
         
        int32 timeline_step = 8;
        Specified by:
        getTimelineStep in interface GraphOptionsOrBuilder
        Returns:
        The timelineStep.
      • setTimelineStep

        public GraphOptions.Builder setTimelineStep​(int value)
         If > 0, record a timeline every this many steps.
         EXPERIMENTAL: This currently has no effect in MasterSession.
         
        int32 timeline_step = 8;
        Parameters:
        value - The timelineStep to set.
        Returns:
        This builder for chaining.
      • clearTimelineStep

        public GraphOptions.Builder clearTimelineStep()
         If > 0, record a timeline every this many steps.
         EXPERIMENTAL: This currently has no effect in MasterSession.
         
        int32 timeline_step = 8;
        Returns:
        This builder for chaining.
      • hasRewriteOptions

        public boolean hasRewriteOptions()
         Options that control the type and amount of graph rewriting.
         Not currently configurable via the public Python API (i.e. there is no API
         stability guarantee if you import RewriterConfig explicitly).
         
        .org.platanios.tensorflow.proto.RewriterConfig rewrite_options = 10;
        Specified by:
        hasRewriteOptions in interface GraphOptionsOrBuilder
        Returns:
        Whether the rewriteOptions field is set.
      • getRewriteOptions

        public RewriterConfig getRewriteOptions()
         Options that control the type and amount of graph rewriting.
         Not currently configurable via the public Python API (i.e. there is no API
         stability guarantee if you import RewriterConfig explicitly).
         
        .org.platanios.tensorflow.proto.RewriterConfig rewrite_options = 10;
        Specified by:
        getRewriteOptions in interface GraphOptionsOrBuilder
        Returns:
        The rewriteOptions.
      • setRewriteOptions

        public GraphOptions.Builder setRewriteOptions​(RewriterConfig value)
         Options that control the type and amount of graph rewriting.
         Not currently configurable via the public Python API (i.e. there is no API
         stability guarantee if you import RewriterConfig explicitly).
         
        .org.platanios.tensorflow.proto.RewriterConfig rewrite_options = 10;
      • setRewriteOptions

        public GraphOptions.Builder setRewriteOptions​(RewriterConfig.Builder builderForValue)
         Options that control the type and amount of graph rewriting.
         Not currently configurable via the public Python API (i.e. there is no API
         stability guarantee if you import RewriterConfig explicitly).
         
        .org.platanios.tensorflow.proto.RewriterConfig rewrite_options = 10;
      • mergeRewriteOptions

        public GraphOptions.Builder mergeRewriteOptions​(RewriterConfig value)
         Options that control the type and amount of graph rewriting.
         Not currently configurable via the public Python API (i.e. there is no API
         stability guarantee if you import RewriterConfig explicitly).
         
        .org.platanios.tensorflow.proto.RewriterConfig rewrite_options = 10;
      • clearRewriteOptions

        public GraphOptions.Builder clearRewriteOptions()
         Options that control the type and amount of graph rewriting.
         Not currently configurable via the public Python API (i.e. there is no API
         stability guarantee if you import RewriterConfig explicitly).
         
        .org.platanios.tensorflow.proto.RewriterConfig rewrite_options = 10;
      • getRewriteOptionsBuilder

        public RewriterConfig.Builder getRewriteOptionsBuilder()
         Options that control the type and amount of graph rewriting.
         Not currently configurable via the public Python API (i.e. there is no API
         stability guarantee if you import RewriterConfig explicitly).
         
        .org.platanios.tensorflow.proto.RewriterConfig rewrite_options = 10;
      • getRewriteOptionsOrBuilder

        public RewriterConfigOrBuilder getRewriteOptionsOrBuilder()
         Options that control the type and amount of graph rewriting.
         Not currently configurable via the public Python API (i.e. there is no API
         stability guarantee if you import RewriterConfig explicitly).
         
        .org.platanios.tensorflow.proto.RewriterConfig rewrite_options = 10;
        Specified by:
        getRewriteOptionsOrBuilder in interface GraphOptionsOrBuilder
      • setUnknownFields

        public final GraphOptions.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        setUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<GraphOptions.Builder>
      • mergeUnknownFields

        public final GraphOptions.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<GraphOptions.Builder>