Package org.tensorflow.framework
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.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,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 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(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) build()clear()Virtual Device ordinal number determines the device ID of the device.clearField(com.google.protobuf.Descriptors.FieldDescriptor field) Per "virtual" device memory limit, in MB.clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) Priority values to use with the virtual devices.clone()static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.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 com.google.protobuf.GeneratedMessageV3.FieldAccessorTablefinal booleanmergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) setDeviceOrdinal(int index, int value) Virtual Device ordinal number determines the device ID of the device.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(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
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, 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, 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, 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 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:
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(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>
-