Class GraphOptions.Builder

  • All Implemented Interfaces:
    Cloneable, org.nd4j.shade.protobuf.Message.Builder, org.nd4j.shade.protobuf.MessageLite.Builder, org.nd4j.shade.protobuf.MessageLiteOrBuilder, org.nd4j.shade.protobuf.MessageOrBuilder, GraphOptionsOrBuilder
    Enclosing class:
    GraphOptions

    public static final class GraphOptions.Builder
    extends org.nd4j.shade.protobuf.GeneratedMessageV3.Builder<GraphOptions.Builder>
    implements GraphOptionsOrBuilder
    Protobuf type tensorflow.GraphOptions
    • Method Detail

      • getDescriptor

        public static final org.nd4j.shade.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetFieldAccessorTable

        protected org.nd4j.shade.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class org.nd4j.shade.protobuf.GeneratedMessageV3.Builder<GraphOptions.Builder>
      • clear

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

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

        public GraphOptions getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface org.nd4j.shade.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface org.nd4j.shade.protobuf.MessageOrBuilder
      • build

        public GraphOptions build()
        Specified by:
        build in interface org.nd4j.shade.protobuf.Message.Builder
        Specified by:
        build in interface org.nd4j.shade.protobuf.MessageLite.Builder
      • buildPartial

        public GraphOptions buildPartial()
        Specified by:
        buildPartial in interface org.nd4j.shade.protobuf.Message.Builder
        Specified by:
        buildPartial in interface org.nd4j.shade.protobuf.MessageLite.Builder
      • clone

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

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

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

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

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

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

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

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

        public GraphOptions.Builder mergeFrom​(org.nd4j.shade.protobuf.CodedInputStream input,
                                              org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
                                       throws IOException
        Specified by:
        mergeFrom in interface org.nd4j.shade.protobuf.Message.Builder
        Specified by:
        mergeFrom in interface org.nd4j.shade.protobuf.MessageLite.Builder
        Overrides:
        mergeFrom in class org.nd4j.shade.protobuf.AbstractMessage.Builder<GraphOptions.Builder>
        Throws:
        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.
         
        .tensorflow.OptimizerOptions optimizer_options = 3;
        Specified by:
        hasOptimizerOptions in interface GraphOptionsOrBuilder
        Returns:
        Whether the optimizerOptions field is set.
      • setOptimizerOptions

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

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

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

        public OptimizerOptions.Builder getOptimizerOptionsBuilder()
         Options controlling how graph is optimized.
         
        .tensorflow.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).
         
        .tensorflow.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).
         
        .tensorflow.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).
         
        .tensorflow.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).
         
        .tensorflow.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).
         
        .tensorflow.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).
         
        .tensorflow.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).
         
        .tensorflow.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).
         
        .tensorflow.RewriterConfig rewrite_options = 10;
        Specified by:
        getRewriteOptionsOrBuilder in interface GraphOptionsOrBuilder
      • setUnknownFields

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

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