Package org.tensorflow.framework
Class GPUOptions.Experimental.VirtualDevices.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderType>
com.google.protobuf.GeneratedMessageV3.Builder<GPUOptions.Experimental.VirtualDevices.Builder>
org.tensorflow.framework.GPUOptions.Experimental.VirtualDevices.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,GPUOptions.Experimental.VirtualDevicesOrBuilder
- Enclosing class:
- GPUOptions.Experimental.VirtualDevices
public static final class GPUOptions.Experimental.VirtualDevices.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<GPUOptions.Experimental.VirtualDevices.Builder> implements GPUOptions.Experimental.VirtualDevicesOrBuilder
Configuration for breaking down a visible GPU into multiple "virtual" devices.Protobuf type
tensorflow.GPUOptions.Experimental.VirtualDevices-
Method Summary
Modifier and Type Method Description GPUOptions.Experimental.VirtualDevices.BuilderaddAllMemoryLimitMb(java.lang.Iterable<? extends java.lang.Float> values)Per "virtual" device memory limit, in MB.GPUOptions.Experimental.VirtualDevices.BuilderaddAllPriority(java.lang.Iterable<? extends java.lang.Integer> values)Priority values to use with the virtual devices.GPUOptions.Experimental.VirtualDevices.BuilderaddMemoryLimitMb(float value)Per "virtual" device memory limit, in MB.GPUOptions.Experimental.VirtualDevices.BuilderaddPriority(int value)Priority values to use with the virtual devices.GPUOptions.Experimental.VirtualDevices.BuilderaddRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)GPUOptions.Experimental.VirtualDevicesbuild()GPUOptions.Experimental.VirtualDevicesbuildPartial()GPUOptions.Experimental.VirtualDevices.Builderclear()GPUOptions.Experimental.VirtualDevices.BuilderclearField(com.google.protobuf.Descriptors.FieldDescriptor field)GPUOptions.Experimental.VirtualDevices.BuilderclearMemoryLimitMb()Per "virtual" device memory limit, in MB.GPUOptions.Experimental.VirtualDevices.BuilderclearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)GPUOptions.Experimental.VirtualDevices.BuilderclearPriority()Priority values to use with the virtual devices.GPUOptions.Experimental.VirtualDevices.Builderclone()GPUOptions.Experimental.VirtualDevicesgetDefaultInstanceForType()static com.google.protobuf.Descriptors.DescriptorgetDescriptor()com.google.protobuf.Descriptors.DescriptorgetDescriptorForType()floatgetMemoryLimitMb(int index)Per "virtual" device memory limit, in MB.intgetMemoryLimitMbCount()Per "virtual" device memory limit, in MB.java.util.List<java.lang.Float>getMemoryLimitMbList()Per "virtual" device memory limit, in MB.intgetPriority(int index)Priority values to use with the virtual devices.intgetPriorityCount()Priority values to use with the virtual devices.java.util.List<java.lang.Integer>getPriorityList()Priority values to use with the virtual devices.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()booleanisInitialized()GPUOptions.Experimental.VirtualDevices.BuildermergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)GPUOptions.Experimental.VirtualDevices.BuildermergeFrom(com.google.protobuf.Message other)GPUOptions.Experimental.VirtualDevices.BuildermergeFrom(GPUOptions.Experimental.VirtualDevices other)GPUOptions.Experimental.VirtualDevices.BuildermergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)GPUOptions.Experimental.VirtualDevices.BuildersetField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)GPUOptions.Experimental.VirtualDevices.BuildersetMemoryLimitMb(int index, float value)Per "virtual" device memory limit, in MB.GPUOptions.Experimental.VirtualDevices.BuildersetPriority(int index, int value)Priority values to use with the virtual devices.GPUOptions.Experimental.VirtualDevices.BuildersetRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)GPUOptions.Experimental.VirtualDevices.BuildersetUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, newBuilderForField, onBuilt, onChanged, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeFrom, newUninitializedMessageException
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3.Builder<GPUOptions.Experimental.VirtualDevices.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessageV3.Builder<GPUOptions.Experimental.VirtualDevices.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessageV3.Builder<GPUOptions.Experimental.VirtualDevices.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
clone
- Specified by:
clonein interfacecom.google.protobuf.Message.Builder- Specified by:
clonein interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clonein classcom.google.protobuf.GeneratedMessageV3.Builder<GPUOptions.Experimental.VirtualDevices.Builder>
-
setField
public GPUOptions.Experimental.VirtualDevices.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)- Specified by:
setFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<GPUOptions.Experimental.VirtualDevices.Builder>
-
clearField
public GPUOptions.Experimental.VirtualDevices.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)- Specified by:
clearFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
clearFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<GPUOptions.Experimental.VirtualDevices.Builder>
-
clearOneof
public GPUOptions.Experimental.VirtualDevices.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)- Specified by:
clearOneofin interfacecom.google.protobuf.Message.Builder- Overrides:
clearOneofin classcom.google.protobuf.GeneratedMessageV3.Builder<GPUOptions.Experimental.VirtualDevices.Builder>
-
setRepeatedField
public GPUOptions.Experimental.VirtualDevices.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)- Specified by:
setRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<GPUOptions.Experimental.VirtualDevices.Builder>
-
addRepeatedField
public GPUOptions.Experimental.VirtualDevices.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)- Specified by:
addRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
addRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<GPUOptions.Experimental.VirtualDevices.Builder>
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<GPUOptions.Experimental.VirtualDevices.Builder>
-
mergeFrom
public GPUOptions.Experimental.VirtualDevices.Builder mergeFrom(GPUOptions.Experimental.VirtualDevices other) -
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3.Builder<GPUOptions.Experimental.VirtualDevices.Builder>
-
mergeFrom
public GPUOptions.Experimental.VirtualDevices.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<GPUOptions.Experimental.VirtualDevices.Builder>- Throws:
java.io.IOException
-
getMemoryLimitMbList
public java.util.List<java.lang.Float> getMemoryLimitMbList()Per "virtual" device memory limit, in MB. The number of elements in the list is the number of virtual devices to create on the corresponding visible GPU (see "virtual_devices" below). If empty, it will create single virtual device taking all available memory from the device. For the concept of "visible" and "virtual" GPU, see the comments for "visible_device_list" above for more information.
repeated float memory_limit_mb = 1;- Specified by:
getMemoryLimitMbListin interfaceGPUOptions.Experimental.VirtualDevicesOrBuilder- Returns:
- A list containing the memoryLimitMb.
-
getMemoryLimitMbCount
public int getMemoryLimitMbCount()Per "virtual" device memory limit, in MB. The number of elements in the list is the number of virtual devices to create on the corresponding visible GPU (see "virtual_devices" below). If empty, it will create single virtual device taking all available memory from the device. For the concept of "visible" and "virtual" GPU, see the comments for "visible_device_list" above for more information.
repeated float memory_limit_mb = 1;- Specified by:
getMemoryLimitMbCountin interfaceGPUOptions.Experimental.VirtualDevicesOrBuilder- Returns:
- The count of memoryLimitMb.
-
getMemoryLimitMb
public float getMemoryLimitMb(int index)Per "virtual" device memory limit, in MB. The number of elements in the list is the number of virtual devices to create on the corresponding visible GPU (see "virtual_devices" below). If empty, it will create single virtual device taking all available memory from the device. For the concept of "visible" and "virtual" GPU, see the comments for "visible_device_list" above for more information.
repeated float memory_limit_mb = 1;- Specified by:
getMemoryLimitMbin interfaceGPUOptions.Experimental.VirtualDevicesOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The memoryLimitMb at the given index.
-
setMemoryLimitMb
Per "virtual" device memory limit, in MB. The number of elements in the list is the number of virtual devices to create on the corresponding visible GPU (see "virtual_devices" below). If empty, it will create single virtual device taking all available memory from the device. For the concept of "visible" and "virtual" GPU, see the comments for "visible_device_list" above for more information.
repeated float memory_limit_mb = 1;- Parameters:
index- The index to set the value at.value- The memoryLimitMb to set.- Returns:
- This builder for chaining.
-
addMemoryLimitMb
Per "virtual" device memory limit, in MB. The number of elements in the list is the number of virtual devices to create on the corresponding visible GPU (see "virtual_devices" below). If empty, it will create single virtual device taking all available memory from the device. For the concept of "visible" and "virtual" GPU, see the comments for "visible_device_list" above for more information.
repeated float memory_limit_mb = 1;- Parameters:
value- The memoryLimitMb to add.- Returns:
- This builder for chaining.
-
addAllMemoryLimitMb
public GPUOptions.Experimental.VirtualDevices.Builder addAllMemoryLimitMb(java.lang.Iterable<? extends java.lang.Float> values)Per "virtual" device memory limit, in MB. The number of elements in the list is the number of virtual devices to create on the corresponding visible GPU (see "virtual_devices" below). If empty, it will create single virtual device taking all available memory from the device. For the concept of "visible" and "virtual" GPU, see the comments for "visible_device_list" above for more information.
repeated float memory_limit_mb = 1;- Parameters:
values- The memoryLimitMb to add.- Returns:
- This builder for chaining.
-
clearMemoryLimitMb
Per "virtual" device memory limit, in MB. The number of elements in the list is the number of virtual devices to create on the corresponding visible GPU (see "virtual_devices" below). If empty, it will create single virtual device taking all available memory from the device. For the concept of "visible" and "virtual" GPU, see the comments for "visible_device_list" above for more information.
repeated float memory_limit_mb = 1;- Returns:
- This builder for chaining.
-
getPriorityList
public java.util.List<java.lang.Integer> getPriorityList()Priority values to use with the virtual devices. Use the cuda function cudaDeviceGetStreamPriorityRange to query for valid range of values for priority. On a P4000 GPU with cuda 10.1, the priority range reported was 0 for least priority and -1 for greatest priority. If this field is not specified, then the virtual devices will be created with the default. If this field has values set, then the size of this must match with the above memory_limit_mb.
repeated int32 priority = 2;- Specified by:
getPriorityListin interfaceGPUOptions.Experimental.VirtualDevicesOrBuilder- Returns:
- A list containing the priority.
-
getPriorityCount
public int getPriorityCount()Priority values to use with the virtual devices. Use the cuda function cudaDeviceGetStreamPriorityRange to query for valid range of values for priority. On a P4000 GPU with cuda 10.1, the priority range reported was 0 for least priority and -1 for greatest priority. If this field is not specified, then the virtual devices will be created with the default. If this field has values set, then the size of this must match with the above memory_limit_mb.
repeated int32 priority = 2;- Specified by:
getPriorityCountin interfaceGPUOptions.Experimental.VirtualDevicesOrBuilder- Returns:
- The count of priority.
-
getPriority
public int getPriority(int index)Priority values to use with the virtual devices. Use the cuda function cudaDeviceGetStreamPriorityRange to query for valid range of values for priority. On a P4000 GPU with cuda 10.1, the priority range reported was 0 for least priority and -1 for greatest priority. If this field is not specified, then the virtual devices will be created with the default. If this field has values set, then the size of this must match with the above memory_limit_mb.
repeated int32 priority = 2;- Specified by:
getPriorityin interfaceGPUOptions.Experimental.VirtualDevicesOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The priority at the given index.
-
setPriority
Priority values to use with the virtual devices. Use the cuda function cudaDeviceGetStreamPriorityRange to query for valid range of values for priority. On a P4000 GPU with cuda 10.1, the priority range reported was 0 for least priority and -1 for greatest priority. If this field is not specified, then the virtual devices will be created with the default. If this field has values set, then the size of this must match with the above memory_limit_mb.
repeated int32 priority = 2;- Parameters:
index- The index to set the value at.value- The priority to set.- Returns:
- This builder for chaining.
-
addPriority
Priority values to use with the virtual devices. Use the cuda function cudaDeviceGetStreamPriorityRange to query for valid range of values for priority. On a P4000 GPU with cuda 10.1, the priority range reported was 0 for least priority and -1 for greatest priority. If this field is not specified, then the virtual devices will be created with the default. If this field has values set, then the size of this must match with the above memory_limit_mb.
repeated int32 priority = 2;- Parameters:
value- The priority to add.- Returns:
- This builder for chaining.
-
addAllPriority
public GPUOptions.Experimental.VirtualDevices.Builder addAllPriority(java.lang.Iterable<? extends java.lang.Integer> values)Priority values to use with the virtual devices. Use the cuda function cudaDeviceGetStreamPriorityRange to query for valid range of values for priority. On a P4000 GPU with cuda 10.1, the priority range reported was 0 for least priority and -1 for greatest priority. If this field is not specified, then the virtual devices will be created with the default. If this field has values set, then the size of this must match with the above memory_limit_mb.
repeated int32 priority = 2;- Parameters:
values- The priority to add.- Returns:
- This builder for chaining.
-
clearPriority
Priority values to use with the virtual devices. Use the cuda function cudaDeviceGetStreamPriorityRange to query for valid range of values for priority. On a P4000 GPU with cuda 10.1, the priority range reported was 0 for least priority and -1 for greatest priority. If this field is not specified, then the virtual devices will be created with the default. If this field has values set, then the size of this must match with the above memory_limit_mb.
repeated int32 priority = 2;- Returns:
- This builder for chaining.
-
setUnknownFields
public final GPUOptions.Experimental.VirtualDevices.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)- Specified by:
setUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
setUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<GPUOptions.Experimental.VirtualDevices.Builder>
-
mergeUnknownFields
public final GPUOptions.Experimental.VirtualDevices.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)- Specified by:
mergeUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<GPUOptions.Experimental.VirtualDevices.Builder>
-