Class GPUOptions.Experimental.VirtualDevices.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<GPUOptions.Experimental.VirtualDevices.Builder>
com.google.protobuf.GeneratedMessageV3.Builder<GPUOptions.Experimental.VirtualDevices.Builder>
org.tensorflow.proto.GPUOptions.Experimental.VirtualDevices.Builder
- All Implemented Interfaces:
Message.Builder, MessageLite.Builder, MessageLiteOrBuilder, MessageOrBuilder, Cloneable, GPUOptions.Experimental.VirtualDevicesOrBuilder
- Enclosing class:
GPUOptions.Experimental.VirtualDevices
public static final class GPUOptions.Experimental.VirtualDevices.Builder
extends 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 TypeMethodDescriptionaddAllDeviceOrdinal(Iterable<? extends Integer> values) Virtual Device ordinal number determines the device ID of the device.addAllMemoryLimitMb(Iterable<? extends Float> values) Per "virtual" device memory limit, in MB.addAllPriority(Iterable<? extends Integer> values) Priority values to use with the virtual devices.addDeviceOrdinal(int value) Virtual Device ordinal number determines the device ID of the device.addMemoryLimitMb(float value) Per "virtual" device memory limit, in MB.addPriority(int value) Priority values to use with the virtual devices.addRepeatedField(Descriptors.FieldDescriptor field, Object value) build()clear()Virtual Device ordinal number determines the device ID of the device.Per "virtual" device memory limit, in MB.Priority values to use with the virtual devices.clone()static final Descriptors.DescriptorintgetDeviceOrdinal(int index) Virtual Device ordinal number determines the device ID of the device.intVirtual Device ordinal number determines the device ID of the device.Virtual Device ordinal number determines the device ID of the device.floatgetMemoryLimitMb(int index) Per "virtual" device memory limit, in MB.intPer "virtual" device memory limit, in MB.Per "virtual" device memory limit, in MB.intgetPriority(int index) Priority values to use with the virtual devices.intPriority values to use with the virtual devices.Priority values to use with the virtual devices.protected GeneratedMessageV3.FieldAccessorTablefinal booleanmergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) mergeUnknownFields(UnknownFieldSet unknownFields) setDeviceOrdinal(int index, int value) Virtual Device ordinal number determines the device ID of the device.setField(Descriptors.FieldDescriptor field, Object value) setMemoryLimitMb(int index, float value) Per "virtual" device memory limit, in MB.setPriority(int index, int value) Priority values to use with the virtual devices.setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value) setUnknownFields(UnknownFieldSet unknownFields) Methods inherited from class GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, 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, mergeDelimitedFromMethods inherited from interface MessageLite.Builder
mergeFromMethods inherited from interface MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
-
internalGetFieldAccessorTable
- Specified by:
internalGetFieldAccessorTablein classGeneratedMessageV3.Builder<GPUOptions.Experimental.VirtualDevices.Builder>
-
clear
- Specified by:
clearin interfaceMessage.Builder- Specified by:
clearin interfaceMessageLite.Builder- Overrides:
clearin classGeneratedMessageV3.Builder<GPUOptions.Experimental.VirtualDevices.Builder>
-
getDescriptorForType
- Specified by:
getDescriptorForTypein interfaceMessage.Builder- Specified by:
getDescriptorForTypein interfaceMessageOrBuilder- Overrides:
getDescriptorForTypein classGeneratedMessageV3.Builder<GPUOptions.Experimental.VirtualDevices.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
-
clone
- Specified by:
clonein interfaceMessage.Builder- Specified by:
clonein interfaceMessageLite.Builder- Overrides:
clonein classGeneratedMessageV3.Builder<GPUOptions.Experimental.VirtualDevices.Builder>
-
setField
public GPUOptions.Experimental.VirtualDevices.Builder setField(Descriptors.FieldDescriptor field, Object value) - Specified by:
setFieldin interfaceMessage.Builder- Overrides:
setFieldin classGeneratedMessageV3.Builder<GPUOptions.Experimental.VirtualDevices.Builder>
-
clearField
- Specified by:
clearFieldin interfaceMessage.Builder- Overrides:
clearFieldin classGeneratedMessageV3.Builder<GPUOptions.Experimental.VirtualDevices.Builder>
-
clearOneof
- Specified by:
clearOneofin interfaceMessage.Builder- Overrides:
clearOneofin classGeneratedMessageV3.Builder<GPUOptions.Experimental.VirtualDevices.Builder>
-
setRepeatedField
public GPUOptions.Experimental.VirtualDevices.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value) - Specified by:
setRepeatedFieldin interfaceMessage.Builder- Overrides:
setRepeatedFieldin classGeneratedMessageV3.Builder<GPUOptions.Experimental.VirtualDevices.Builder>
-
addRepeatedField
public GPUOptions.Experimental.VirtualDevices.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value) - Specified by:
addRepeatedFieldin interfaceMessage.Builder- Overrides:
addRepeatedFieldin classGeneratedMessageV3.Builder<GPUOptions.Experimental.VirtualDevices.Builder>
-
mergeFrom
- Specified by:
mergeFromin interfaceMessage.Builder- Overrides:
mergeFromin classAbstractMessage.Builder<GPUOptions.Experimental.VirtualDevices.Builder>
-
mergeFrom
public GPUOptions.Experimental.VirtualDevices.Builder mergeFrom(GPUOptions.Experimental.VirtualDevices other) -
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfaceMessageLiteOrBuilder- Overrides:
isInitializedin classGeneratedMessageV3.Builder<GPUOptions.Experimental.VirtualDevices.Builder>
-
mergeFrom
public GPUOptions.Experimental.VirtualDevices.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfaceMessage.Builder- Specified by:
mergeFromin interfaceMessageLite.Builder- Overrides:
mergeFromin classAbstractMessage.Builder<GPUOptions.Experimental.VirtualDevices.Builder>- Throws:
IOException
-
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 and `num_virtual_devices_per_gpu` is not set, 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 and `num_virtual_devices_per_gpu` is not set, 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 and `num_virtual_devices_per_gpu` is not set, 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 and `num_virtual_devices_per_gpu` is not set, 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 and `num_virtual_devices_per_gpu` is not set, 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(Iterable<? extends 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 and `num_virtual_devices_per_gpu` is not set, 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 and `num_virtual_devices_per_gpu` is not set, 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
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(Iterable<? extends 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.
-
getDeviceOrdinalList
Virtual Device ordinal number determines the device ID of the device. A Virtual device with a lower ordinal number always receives the a smaller device id. The phyiscal device id and location in the virtual device list is used to break ties.
repeated int32 device_ordinal = 3;- Specified by:
getDeviceOrdinalListin interfaceGPUOptions.Experimental.VirtualDevicesOrBuilder- Returns:
- A list containing the deviceOrdinal.
-
getDeviceOrdinalCount
public int getDeviceOrdinalCount()Virtual Device ordinal number determines the device ID of the device. A Virtual device with a lower ordinal number always receives the a smaller device id. The phyiscal device id and location in the virtual device list is used to break ties.
repeated int32 device_ordinal = 3;- Specified by:
getDeviceOrdinalCountin interfaceGPUOptions.Experimental.VirtualDevicesOrBuilder- Returns:
- The count of deviceOrdinal.
-
getDeviceOrdinal
public int getDeviceOrdinal(int index) Virtual Device ordinal number determines the device ID of the device. A Virtual device with a lower ordinal number always receives the a smaller device id. The phyiscal device id and location in the virtual device list is used to break ties.
repeated int32 device_ordinal = 3;- Specified by:
getDeviceOrdinalin interfaceGPUOptions.Experimental.VirtualDevicesOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The deviceOrdinal at the given index.
-
setDeviceOrdinal
Virtual Device ordinal number determines the device ID of the device. A Virtual device with a lower ordinal number always receives the a smaller device id. The phyiscal device id and location in the virtual device list is used to break ties.
repeated int32 device_ordinal = 3;- Parameters:
index- The index to set the value at.value- The deviceOrdinal to set.- Returns:
- This builder for chaining.
-
addDeviceOrdinal
Virtual Device ordinal number determines the device ID of the device. A Virtual device with a lower ordinal number always receives the a smaller device id. The phyiscal device id and location in the virtual device list is used to break ties.
repeated int32 device_ordinal = 3;- Parameters:
value- The deviceOrdinal to add.- Returns:
- This builder for chaining.
-
addAllDeviceOrdinal
public GPUOptions.Experimental.VirtualDevices.Builder addAllDeviceOrdinal(Iterable<? extends Integer> values) Virtual Device ordinal number determines the device ID of the device. A Virtual device with a lower ordinal number always receives the a smaller device id. The phyiscal device id and location in the virtual device list is used to break ties.
repeated int32 device_ordinal = 3;- Parameters:
values- The deviceOrdinal to add.- Returns:
- This builder for chaining.
-
clearDeviceOrdinal
Virtual Device ordinal number determines the device ID of the device. A Virtual device with a lower ordinal number always receives the a smaller device id. The phyiscal device id and location in the virtual device list is used to break ties.
repeated int32 device_ordinal = 3;- Returns:
- This builder for chaining.
-
setUnknownFields
public final GPUOptions.Experimental.VirtualDevices.Builder setUnknownFields(UnknownFieldSet unknownFields) - Specified by:
setUnknownFieldsin interfaceMessage.Builder- Overrides:
setUnknownFieldsin classGeneratedMessageV3.Builder<GPUOptions.Experimental.VirtualDevices.Builder>
-
mergeUnknownFields
public final GPUOptions.Experimental.VirtualDevices.Builder mergeUnknownFields(UnknownFieldSet unknownFields) - Specified by:
mergeUnknownFieldsin interfaceMessage.Builder- Overrides:
mergeUnknownFieldsin classGeneratedMessageV3.Builder<GPUOptions.Experimental.VirtualDevices.Builder>
-