Class GPUOptions.Experimental.StreamMergeOptions.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<GPUOptions.Experimental.StreamMergeOptions.Builder>
com.google.protobuf.GeneratedMessage.Builder<GPUOptions.Experimental.StreamMergeOptions.Builder>
org.tensorflow.framework.GPUOptions.Experimental.StreamMergeOptions.Builder
All Implemented Interfaces:
com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable, GPUOptions.Experimental.StreamMergeOptionsOrBuilder
Enclosing class:
GPUOptions.Experimental.StreamMergeOptions

public static final class GPUOptions.Experimental.StreamMergeOptions.Builder extends com.google.protobuf.GeneratedMessage.Builder<GPUOptions.Experimental.StreamMergeOptions.Builder> implements GPUOptions.Experimental.StreamMergeOptionsOrBuilder
 Whether to merge data transfer streams into the compute stream in the
 same stream group. Stream merging helps reduce the overhead caused by
 stream synchronization, especially when data transfers are frequent. For
 example, setting "merge_host_to_device_stream = true" will make the
 compute stream responsible for both computation and host to device memory
 copy.
 
Protobuf type tensorflow.GPUOptions.Experimental.StreamMergeOptions
  • Method Details

    • getDescriptor

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

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<GPUOptions.Experimental.StreamMergeOptions.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.GeneratedMessage.Builder<GPUOptions.Experimental.StreamMergeOptions.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.GeneratedMessage.Builder<GPUOptions.Experimental.StreamMergeOptions.Builder>
    • getDefaultInstanceForType

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

      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public GPUOptions.Experimental.StreamMergeOptions.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<GPUOptions.Experimental.StreamMergeOptions.Builder>
    • mergeFrom

    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<GPUOptions.Experimental.StreamMergeOptions.Builder>
    • mergeFrom

      public GPUOptions.Experimental.StreamMergeOptions.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws 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<GPUOptions.Experimental.StreamMergeOptions.Builder>
      Throws:
      IOException
    • getMergeHostToDeviceStream

      public boolean getMergeHostToDeviceStream()
       If true, the compute stream will be used for host_to_device copy as
       well. It's no longer necessary to record an event before the copy to
       let the copy stream wait for the compute stream to finish. There is
       also no need to wait for the copy to complete before executing the
       callback function.
       
      bool merge_host_to_device_stream = 1;
      Specified by:
      getMergeHostToDeviceStream in interface GPUOptions.Experimental.StreamMergeOptionsOrBuilder
      Returns:
      The mergeHostToDeviceStream.
    • setMergeHostToDeviceStream

      public GPUOptions.Experimental.StreamMergeOptions.Builder setMergeHostToDeviceStream(boolean value)
       If true, the compute stream will be used for host_to_device copy as
       well. It's no longer necessary to record an event before the copy to
       let the copy stream wait for the compute stream to finish. There is
       also no need to wait for the copy to complete before executing the
       callback function.
       
      bool merge_host_to_device_stream = 1;
      Parameters:
      value - The mergeHostToDeviceStream to set.
      Returns:
      This builder for chaining.
    • clearMergeHostToDeviceStream

      public GPUOptions.Experimental.StreamMergeOptions.Builder clearMergeHostToDeviceStream()
       If true, the compute stream will be used for host_to_device copy as
       well. It's no longer necessary to record an event before the copy to
       let the copy stream wait for the compute stream to finish. There is
       also no need to wait for the copy to complete before executing the
       callback function.
       
      bool merge_host_to_device_stream = 1;
      Returns:
      This builder for chaining.
    • getMergeDeviceToHostStream

      public boolean getMergeDeviceToHostStream()
       If true, the compute stream will be used for device_to_host copy as
       well. It's no longer necessary to record an event before the copy to
       let the copy stream wait for the compute stream to finish.
       
      bool merge_device_to_host_stream = 2;
      Specified by:
      getMergeDeviceToHostStream in interface GPUOptions.Experimental.StreamMergeOptionsOrBuilder
      Returns:
      The mergeDeviceToHostStream.
    • setMergeDeviceToHostStream

      public GPUOptions.Experimental.StreamMergeOptions.Builder setMergeDeviceToHostStream(boolean value)
       If true, the compute stream will be used for device_to_host copy as
       well. It's no longer necessary to record an event before the copy to
       let the copy stream wait for the compute stream to finish.
       
      bool merge_device_to_host_stream = 2;
      Parameters:
      value - The mergeDeviceToHostStream to set.
      Returns:
      This builder for chaining.
    • clearMergeDeviceToHostStream

      public GPUOptions.Experimental.StreamMergeOptions.Builder clearMergeDeviceToHostStream()
       If true, the compute stream will be used for device_to_host copy as
       well. It's no longer necessary to record an event before the copy to
       let the copy stream wait for the compute stream to finish.
       
      bool merge_device_to_host_stream = 2;
      Returns:
      This builder for chaining.
    • getMergeDeviceToDeviceStream

      public boolean getMergeDeviceToDeviceStream()
       If true, the compute stream will be used for device_to_device copy as
       well. It's no longer necessary to record an event before the copy to
       let the copy stream wait for the compute stream of the sending device
       to finish. There is also no need to wait for the compute stream of the
       receiving device to finish if the copy is within the same device.
       
      bool merge_device_to_device_stream = 3;
      Specified by:
      getMergeDeviceToDeviceStream in interface GPUOptions.Experimental.StreamMergeOptionsOrBuilder
      Returns:
      The mergeDeviceToDeviceStream.
    • setMergeDeviceToDeviceStream

      public GPUOptions.Experimental.StreamMergeOptions.Builder setMergeDeviceToDeviceStream(boolean value)
       If true, the compute stream will be used for device_to_device copy as
       well. It's no longer necessary to record an event before the copy to
       let the copy stream wait for the compute stream of the sending device
       to finish. There is also no need to wait for the compute stream of the
       receiving device to finish if the copy is within the same device.
       
      bool merge_device_to_device_stream = 3;
      Parameters:
      value - The mergeDeviceToDeviceStream to set.
      Returns:
      This builder for chaining.
    • clearMergeDeviceToDeviceStream

      public GPUOptions.Experimental.StreamMergeOptions.Builder clearMergeDeviceToDeviceStream()
       If true, the compute stream will be used for device_to_device copy as
       well. It's no longer necessary to record an event before the copy to
       let the copy stream wait for the compute stream of the sending device
       to finish. There is also no need to wait for the compute stream of the
       receiving device to finish if the copy is within the same device.
       
      bool merge_device_to_device_stream = 3;
      Returns:
      This builder for chaining.