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.proto.GPUOptions.Experimental.StreamMergeOptions.Builder
- All Implemented Interfaces:
Message.Builder, MessageLite.Builder, MessageLiteOrBuilder, MessageOrBuilder, Cloneable, GPUOptions.Experimental.StreamMergeOptionsOrBuilder
- Enclosing class:
GPUOptions.Experimental.StreamMergeOptions
public static final class GPUOptions.Experimental.StreamMergeOptions.Builder
extends 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 Summary
Modifier and TypeMethodDescriptionbuild()clear()If true, the compute stream will be used for device_to_device copy as well.If true, the compute stream will be used for device_to_host copy as well.If true, the compute stream will be used for host_to_device copy as well.static final Descriptors.DescriptorbooleanIf true, the compute stream will be used for device_to_device copy as well.booleanIf true, the compute stream will be used for device_to_host copy as well.booleanIf true, the compute stream will be used for host_to_device copy as well.protected GeneratedMessage.FieldAccessorTablefinal booleanmergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) setMergeDeviceToDeviceStream(boolean value) If true, the compute stream will be used for device_to_device copy as well.setMergeDeviceToHostStream(boolean value) If true, the compute stream will be used for device_to_host copy as well.setMergeHostToDeviceStream(boolean value) If true, the compute stream will be used for host_to_device copy as well.Methods inherited from class GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Message.Builder
mergeDelimitedFrom, mergeDelimitedFrom
-
Method Details
-
getDescriptor
-
internalGetFieldAccessorTable
- Specified by:
internalGetFieldAccessorTablein classGeneratedMessage.Builder<GPUOptions.Experimental.StreamMergeOptions.Builder>
-
clear
- Specified by:
clearin interfaceMessage.Builder- Specified by:
clearin interfaceMessageLite.Builder- Overrides:
clearin classGeneratedMessage.Builder<GPUOptions.Experimental.StreamMergeOptions.Builder>
-
getDescriptorForType
- Specified by:
getDescriptorForTypein interfaceMessage.Builder- Specified by:
getDescriptorForTypein interfaceMessageOrBuilder- Overrides:
getDescriptorForTypein classGeneratedMessage.Builder<GPUOptions.Experimental.StreamMergeOptions.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfaceMessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfaceMessageOrBuilder
-
build
- Specified by:
buildin interfaceMessage.Builder- Specified by:
buildin interfaceMessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfaceMessage.Builder- Specified by:
buildPartialin interfaceMessageLite.Builder
-
mergeFrom
- Specified by:
mergeFromin interfaceMessage.Builder- Overrides:
mergeFromin classAbstractMessage.Builder<GPUOptions.Experimental.StreamMergeOptions.Builder>
-
mergeFrom
public GPUOptions.Experimental.StreamMergeOptions.Builder mergeFrom(GPUOptions.Experimental.StreamMergeOptions other) -
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfaceMessageLiteOrBuilder- Overrides:
isInitializedin classGeneratedMessage.Builder<GPUOptions.Experimental.StreamMergeOptions.Builder>
-
mergeFrom
public GPUOptions.Experimental.StreamMergeOptions.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfaceMessage.Builder- Specified by:
mergeFromin interfaceMessageLite.Builder- Overrides:
mergeFromin classAbstractMessage.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:
getMergeHostToDeviceStreamin interfaceGPUOptions.Experimental.StreamMergeOptionsOrBuilder- Returns:
- The mergeHostToDeviceStream.
-
setMergeHostToDeviceStream
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
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:
getMergeDeviceToHostStreamin interfaceGPUOptions.Experimental.StreamMergeOptionsOrBuilder- Returns:
- The mergeDeviceToHostStream.
-
setMergeDeviceToHostStream
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
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:
getMergeDeviceToDeviceStreamin interfaceGPUOptions.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
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.
-