Package org.tensorflow.framework
Class GPUOptions.Experimental.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<GPUOptions.Experimental.Builder>
com.google.protobuf.GeneratedMessageV3.Builder<GPUOptions.Experimental.Builder>
org.tensorflow.framework.GPUOptions.Experimental.Builder
- All Implemented Interfaces:
com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable,GPUOptions.ExperimentalOrBuilder
- Enclosing class:
GPUOptions.Experimental
public static final class GPUOptions.Experimental.Builder
extends com.google.protobuf.GeneratedMessageV3.Builder<GPUOptions.Experimental.Builder>
implements GPUOptions.ExperimentalOrBuilder
Protobuf type
tensorflow.GPUOptions.Experimental-
Method Summary
Modifier and TypeMethodDescriptionaddAllVirtualDevices(Iterable<? extends GPUOptions.Experimental.VirtualDevices> values) The multi virtual device settings.addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) addVirtualDevices(int index, GPUOptions.Experimental.VirtualDevices value) The multi virtual device settings.addVirtualDevices(int index, GPUOptions.Experimental.VirtualDevices.Builder builderForValue) The multi virtual device settings.The multi virtual device settings.addVirtualDevices(GPUOptions.Experimental.VirtualDevices.Builder builderForValue) The multi virtual device settings.The multi virtual device settings.addVirtualDevicesBuilder(int index) The multi virtual device settings.build()clear()If non-empty, defines a good GPU ring order on a single worker based on device interconnect.By default, BFCAllocator may sleep when it runs out of memory, in the hopes that another thread will free up memory in the meantime.clearField(com.google.protobuf.Descriptors.FieldDescriptor field) If true, then the host allocator allocates its max memory all upfront and never grows.Memory limit for "GPU host allocator", aka pinned memory allocator.Memory limit for gpu system.BFC Allocator can return an allocated chunk of memory upto 2x the requested size.If kernel_tracker_max_bytes = n > 0, then a tracking event is inserted after every series of kernels allocating a sum of memory >= n.Parameters for GPUKernelTracker.If kernel_tracker_max_pending > 0 then no more than this many tracking events can be outstanding at a time.node_id for use when creating a PjRt GPU client with remote devices, which enumerates jobs*tasks from a ServerDef.If > 1, the number of device-to-device copy streams to create for each GPUDevice.The number of virtual devices to create on each visible GPU.clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) If true, save information needed for created a PjRt GPU client for creating a client with remote devices..tensorflow.GPUOptions.Experimental.StreamMergeOptions stream_merge_options = 19;If true then extra work is done by GPUDevice and GPUBFCAllocator to keep track of when GPU memory is freed and when kernels actually complete so that we can know when a nominally free memory chunk is really not subject to pending use.When true, use CUDA cudaMallocAsync API instead of TF gpu allocator.If true, uses CUDA unified memory for memory allocations.The multi virtual device settings.clone()If non-empty, defines a good GPU ring order on a single worker based on device interconnect.com.google.protobuf.ByteStringIf non-empty, defines a good GPU ring order on a single worker based on device interconnect.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorbooleanBy default, BFCAllocator may sleep when it runs out of memory, in the hopes that another thread will free up memory in the meantime.booleanIf true, then the host allocator allocates its max memory all upfront and never grows.floatMemory limit for "GPU host allocator", aka pinned memory allocator.intMemory limit for gpu system.doubleBFC Allocator can return an allocated chunk of memory upto 2x the requested size.intIf kernel_tracker_max_bytes = n > 0, then a tracking event is inserted after every series of kernels allocating a sum of memory >= n.intParameters for GPUKernelTracker.intIf kernel_tracker_max_pending > 0 then no more than this many tracking events can be outstanding at a time.intnode_id for use when creating a PjRt GPU client with remote devices, which enumerates jobs*tasks from a ServerDef.intIf > 1, the number of device-to-device copy streams to create for each GPUDevice.intThe number of virtual devices to create on each visible GPU.booleanIf true, save information needed for created a PjRt GPU client for creating a client with remote devices..tensorflow.GPUOptions.Experimental.StreamMergeOptions stream_merge_options = 19;.tensorflow.GPUOptions.Experimental.StreamMergeOptions stream_merge_options = 19;.tensorflow.GPUOptions.Experimental.StreamMergeOptions stream_merge_options = 19;booleanIf true then extra work is done by GPUDevice and GPUBFCAllocator to keep track of when GPU memory is freed and when kernels actually complete so that we can know when a nominally free memory chunk is really not subject to pending use.booleanWhen true, use CUDA cudaMallocAsync API instead of TF gpu allocator.booleanIf true, uses CUDA unified memory for memory allocations.getVirtualDevices(int index) The multi virtual device settings.getVirtualDevicesBuilder(int index) The multi virtual device settings.The multi virtual device settings.intThe multi virtual device settings.The multi virtual device settings.getVirtualDevicesOrBuilder(int index) The multi virtual device settings.The multi virtual device settings.boolean.tensorflow.GPUOptions.Experimental.StreamMergeOptions stream_merge_options = 19;protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTablefinal booleanmergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) mergeFrom(GPUOptions.Experimental other) .tensorflow.GPUOptions.Experimental.StreamMergeOptions stream_merge_options = 19;mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) removeVirtualDevices(int index) The multi virtual device settings.setCollectiveRingOrder(String value) If non-empty, defines a good GPU ring order on a single worker based on device interconnect.setCollectiveRingOrderBytes(com.google.protobuf.ByteString value) If non-empty, defines a good GPU ring order on a single worker based on device interconnect.setDisallowRetryOnAllocationFailure(boolean value) By default, BFCAllocator may sleep when it runs out of memory, in the hopes that another thread will free up memory in the meantime.setGpuHostMemDisallowGrowth(boolean value) If true, then the host allocator allocates its max memory all upfront and never grows.setGpuHostMemLimitInMb(float value) Memory limit for "GPU host allocator", aka pinned memory allocator.setGpuSystemMemorySizeInMb(int value) Memory limit for gpu system.setInternalFragmentationFraction(double value) BFC Allocator can return an allocated chunk of memory upto 2x the requested size.setKernelTrackerMaxBytes(int value) If kernel_tracker_max_bytes = n > 0, then a tracking event is inserted after every series of kernels allocating a sum of memory >= n.setKernelTrackerMaxInterval(int value) Parameters for GPUKernelTracker.setKernelTrackerMaxPending(int value) If kernel_tracker_max_pending > 0 then no more than this many tracking events can be outstanding at a time.setNodeId(int value) node_id for use when creating a PjRt GPU client with remote devices, which enumerates jobs*tasks from a ServerDef.setNumDevToDevCopyStreams(int value) If > 1, the number of device-to-device copy streams to create for each GPUDevice.setNumVirtualDevicesPerGpu(int value) The number of virtual devices to create on each visible GPU.setPopulatePjrtGpuClientCreationInfo(boolean value) If true, save information needed for created a PjRt GPU client for creating a client with remote devices.setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) .tensorflow.GPUOptions.Experimental.StreamMergeOptions stream_merge_options = 19;setStreamMergeOptions(GPUOptions.Experimental.StreamMergeOptions.Builder builderForValue) .tensorflow.GPUOptions.Experimental.StreamMergeOptions stream_merge_options = 19;setTimestampedAllocator(boolean value) If true then extra work is done by GPUDevice and GPUBFCAllocator to keep track of when GPU memory is freed and when kernels actually complete so that we can know when a nominally free memory chunk is really not subject to pending use.setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) setUseCudaMallocAsync(boolean value) When true, use CUDA cudaMallocAsync API instead of TF gpu allocator.setUseUnifiedMemory(boolean value) If true, uses CUDA unified memory for memory allocations.setVirtualDevices(int index, GPUOptions.Experimental.VirtualDevices value) The multi virtual device settings.setVirtualDevices(int index, GPUOptions.Experimental.VirtualDevices.Builder builderForValue) The multi virtual device settings.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.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.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.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.Builder>
-
setField
public GPUOptions.Experimental.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.Builder>
-
clearField
public GPUOptions.Experimental.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.Builder>
-
clearOneof
public GPUOptions.Experimental.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.Builder>
-
setRepeatedField
public GPUOptions.Experimental.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.Builder>
-
addRepeatedField
public GPUOptions.Experimental.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.Builder>
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<GPUOptions.Experimental.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3.Builder<GPUOptions.Experimental.Builder>
-
mergeFrom
public GPUOptions.Experimental.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.Builder>- Throws:
IOException
-
getVirtualDevicesList
The multi virtual device settings. If empty (not set), it will create single virtual device on each visible GPU, according to the settings in "visible_device_list" above. Otherwise, the number of elements in the list must be the same as the number of visible GPUs (after "visible_device_list" filtering if it is set), and the string represented device names (e.g. /device:GPU:<id>) will refer to the virtual devices and have the <id> field assigned sequentially starting from 0, according to the order of the virtual devices determined by device_ordinal and the location in the virtual device list. For example, visible_device_list = "1,0" virtual_devices { memory_limit: 1GB memory_limit: 2GB } virtual_devices { memory_limit: 3GB memory_limit: 4GB } will create 4 virtual devices as: /device:GPU:0 -> visible GPU 1 with 1GB memory /device:GPU:1 -> visible GPU 1 with 2GB memory /device:GPU:2 -> visible GPU 0 with 3GB memory /device:GPU:3 -> visible GPU 0 with 4GB memory but visible_device_list = "1,0" virtual_devices { memory_limit: 1GB memory_limit: 2GB device_ordinal: 10 device_ordinal: 20} virtual_devices { memory_limit: 3GB memory_limit: 4GB device_ordinal: 10 device_ordinal: 20} will create 4 virtual devices as: /device:GPU:0 -> visible GPU 1 with 1GB memory (ordinal 10) /device:GPU:1 -> visible GPU 0 with 3GB memory (ordinal 10) /device:GPU:2 -> visible GPU 1 with 2GB memory (ordinal 20) /device:GPU:3 -> visible GPU 0 with 4GB memory (ordinal 20) NOTE: 1. It's invalid to set both this and "per_process_gpu_memory_fraction" at the same time. 2. Currently this setting is per-process, not per-session. Using different settings in different sessions within same process will result in undefined behavior.repeated .tensorflow.GPUOptions.Experimental.VirtualDevices virtual_devices = 1;- Specified by:
getVirtualDevicesListin interfaceGPUOptions.ExperimentalOrBuilder
-
getVirtualDevicesCount
public int getVirtualDevicesCount()The multi virtual device settings. If empty (not set), it will create single virtual device on each visible GPU, according to the settings in "visible_device_list" above. Otherwise, the number of elements in the list must be the same as the number of visible GPUs (after "visible_device_list" filtering if it is set), and the string represented device names (e.g. /device:GPU:<id>) will refer to the virtual devices and have the <id> field assigned sequentially starting from 0, according to the order of the virtual devices determined by device_ordinal and the location in the virtual device list. For example, visible_device_list = "1,0" virtual_devices { memory_limit: 1GB memory_limit: 2GB } virtual_devices { memory_limit: 3GB memory_limit: 4GB } will create 4 virtual devices as: /device:GPU:0 -> visible GPU 1 with 1GB memory /device:GPU:1 -> visible GPU 1 with 2GB memory /device:GPU:2 -> visible GPU 0 with 3GB memory /device:GPU:3 -> visible GPU 0 with 4GB memory but visible_device_list = "1,0" virtual_devices { memory_limit: 1GB memory_limit: 2GB device_ordinal: 10 device_ordinal: 20} virtual_devices { memory_limit: 3GB memory_limit: 4GB device_ordinal: 10 device_ordinal: 20} will create 4 virtual devices as: /device:GPU:0 -> visible GPU 1 with 1GB memory (ordinal 10) /device:GPU:1 -> visible GPU 0 with 3GB memory (ordinal 10) /device:GPU:2 -> visible GPU 1 with 2GB memory (ordinal 20) /device:GPU:3 -> visible GPU 0 with 4GB memory (ordinal 20) NOTE: 1. It's invalid to set both this and "per_process_gpu_memory_fraction" at the same time. 2. Currently this setting is per-process, not per-session. Using different settings in different sessions within same process will result in undefined behavior.repeated .tensorflow.GPUOptions.Experimental.VirtualDevices virtual_devices = 1;- Specified by:
getVirtualDevicesCountin interfaceGPUOptions.ExperimentalOrBuilder
-
getVirtualDevices
The multi virtual device settings. If empty (not set), it will create single virtual device on each visible GPU, according to the settings in "visible_device_list" above. Otherwise, the number of elements in the list must be the same as the number of visible GPUs (after "visible_device_list" filtering if it is set), and the string represented device names (e.g. /device:GPU:<id>) will refer to the virtual devices and have the <id> field assigned sequentially starting from 0, according to the order of the virtual devices determined by device_ordinal and the location in the virtual device list. For example, visible_device_list = "1,0" virtual_devices { memory_limit: 1GB memory_limit: 2GB } virtual_devices { memory_limit: 3GB memory_limit: 4GB } will create 4 virtual devices as: /device:GPU:0 -> visible GPU 1 with 1GB memory /device:GPU:1 -> visible GPU 1 with 2GB memory /device:GPU:2 -> visible GPU 0 with 3GB memory /device:GPU:3 -> visible GPU 0 with 4GB memory but visible_device_list = "1,0" virtual_devices { memory_limit: 1GB memory_limit: 2GB device_ordinal: 10 device_ordinal: 20} virtual_devices { memory_limit: 3GB memory_limit: 4GB device_ordinal: 10 device_ordinal: 20} will create 4 virtual devices as: /device:GPU:0 -> visible GPU 1 with 1GB memory (ordinal 10) /device:GPU:1 -> visible GPU 0 with 3GB memory (ordinal 10) /device:GPU:2 -> visible GPU 1 with 2GB memory (ordinal 20) /device:GPU:3 -> visible GPU 0 with 4GB memory (ordinal 20) NOTE: 1. It's invalid to set both this and "per_process_gpu_memory_fraction" at the same time. 2. Currently this setting is per-process, not per-session. Using different settings in different sessions within same process will result in undefined behavior.repeated .tensorflow.GPUOptions.Experimental.VirtualDevices virtual_devices = 1;- Specified by:
getVirtualDevicesin interfaceGPUOptions.ExperimentalOrBuilder
-
setVirtualDevices
public GPUOptions.Experimental.Builder setVirtualDevices(int index, GPUOptions.Experimental.VirtualDevices value) The multi virtual device settings. If empty (not set), it will create single virtual device on each visible GPU, according to the settings in "visible_device_list" above. Otherwise, the number of elements in the list must be the same as the number of visible GPUs (after "visible_device_list" filtering if it is set), and the string represented device names (e.g. /device:GPU:<id>) will refer to the virtual devices and have the <id> field assigned sequentially starting from 0, according to the order of the virtual devices determined by device_ordinal and the location in the virtual device list. For example, visible_device_list = "1,0" virtual_devices { memory_limit: 1GB memory_limit: 2GB } virtual_devices { memory_limit: 3GB memory_limit: 4GB } will create 4 virtual devices as: /device:GPU:0 -> visible GPU 1 with 1GB memory /device:GPU:1 -> visible GPU 1 with 2GB memory /device:GPU:2 -> visible GPU 0 with 3GB memory /device:GPU:3 -> visible GPU 0 with 4GB memory but visible_device_list = "1,0" virtual_devices { memory_limit: 1GB memory_limit: 2GB device_ordinal: 10 device_ordinal: 20} virtual_devices { memory_limit: 3GB memory_limit: 4GB device_ordinal: 10 device_ordinal: 20} will create 4 virtual devices as: /device:GPU:0 -> visible GPU 1 with 1GB memory (ordinal 10) /device:GPU:1 -> visible GPU 0 with 3GB memory (ordinal 10) /device:GPU:2 -> visible GPU 1 with 2GB memory (ordinal 20) /device:GPU:3 -> visible GPU 0 with 4GB memory (ordinal 20) NOTE: 1. It's invalid to set both this and "per_process_gpu_memory_fraction" at the same time. 2. Currently this setting is per-process, not per-session. Using different settings in different sessions within same process will result in undefined behavior.repeated .tensorflow.GPUOptions.Experimental.VirtualDevices virtual_devices = 1; -
setVirtualDevices
public GPUOptions.Experimental.Builder setVirtualDevices(int index, GPUOptions.Experimental.VirtualDevices.Builder builderForValue) The multi virtual device settings. If empty (not set), it will create single virtual device on each visible GPU, according to the settings in "visible_device_list" above. Otherwise, the number of elements in the list must be the same as the number of visible GPUs (after "visible_device_list" filtering if it is set), and the string represented device names (e.g. /device:GPU:<id>) will refer to the virtual devices and have the <id> field assigned sequentially starting from 0, according to the order of the virtual devices determined by device_ordinal and the location in the virtual device list. For example, visible_device_list = "1,0" virtual_devices { memory_limit: 1GB memory_limit: 2GB } virtual_devices { memory_limit: 3GB memory_limit: 4GB } will create 4 virtual devices as: /device:GPU:0 -> visible GPU 1 with 1GB memory /device:GPU:1 -> visible GPU 1 with 2GB memory /device:GPU:2 -> visible GPU 0 with 3GB memory /device:GPU:3 -> visible GPU 0 with 4GB memory but visible_device_list = "1,0" virtual_devices { memory_limit: 1GB memory_limit: 2GB device_ordinal: 10 device_ordinal: 20} virtual_devices { memory_limit: 3GB memory_limit: 4GB device_ordinal: 10 device_ordinal: 20} will create 4 virtual devices as: /device:GPU:0 -> visible GPU 1 with 1GB memory (ordinal 10) /device:GPU:1 -> visible GPU 0 with 3GB memory (ordinal 10) /device:GPU:2 -> visible GPU 1 with 2GB memory (ordinal 20) /device:GPU:3 -> visible GPU 0 with 4GB memory (ordinal 20) NOTE: 1. It's invalid to set both this and "per_process_gpu_memory_fraction" at the same time. 2. Currently this setting is per-process, not per-session. Using different settings in different sessions within same process will result in undefined behavior.repeated .tensorflow.GPUOptions.Experimental.VirtualDevices virtual_devices = 1; -
addVirtualDevices
public GPUOptions.Experimental.Builder addVirtualDevices(GPUOptions.Experimental.VirtualDevices value) The multi virtual device settings. If empty (not set), it will create single virtual device on each visible GPU, according to the settings in "visible_device_list" above. Otherwise, the number of elements in the list must be the same as the number of visible GPUs (after "visible_device_list" filtering if it is set), and the string represented device names (e.g. /device:GPU:<id>) will refer to the virtual devices and have the <id> field assigned sequentially starting from 0, according to the order of the virtual devices determined by device_ordinal and the location in the virtual device list. For example, visible_device_list = "1,0" virtual_devices { memory_limit: 1GB memory_limit: 2GB } virtual_devices { memory_limit: 3GB memory_limit: 4GB } will create 4 virtual devices as: /device:GPU:0 -> visible GPU 1 with 1GB memory /device:GPU:1 -> visible GPU 1 with 2GB memory /device:GPU:2 -> visible GPU 0 with 3GB memory /device:GPU:3 -> visible GPU 0 with 4GB memory but visible_device_list = "1,0" virtual_devices { memory_limit: 1GB memory_limit: 2GB device_ordinal: 10 device_ordinal: 20} virtual_devices { memory_limit: 3GB memory_limit: 4GB device_ordinal: 10 device_ordinal: 20} will create 4 virtual devices as: /device:GPU:0 -> visible GPU 1 with 1GB memory (ordinal 10) /device:GPU:1 -> visible GPU 0 with 3GB memory (ordinal 10) /device:GPU:2 -> visible GPU 1 with 2GB memory (ordinal 20) /device:GPU:3 -> visible GPU 0 with 4GB memory (ordinal 20) NOTE: 1. It's invalid to set both this and "per_process_gpu_memory_fraction" at the same time. 2. Currently this setting is per-process, not per-session. Using different settings in different sessions within same process will result in undefined behavior.repeated .tensorflow.GPUOptions.Experimental.VirtualDevices virtual_devices = 1; -
addVirtualDevices
public GPUOptions.Experimental.Builder addVirtualDevices(int index, GPUOptions.Experimental.VirtualDevices value) The multi virtual device settings. If empty (not set), it will create single virtual device on each visible GPU, according to the settings in "visible_device_list" above. Otherwise, the number of elements in the list must be the same as the number of visible GPUs (after "visible_device_list" filtering if it is set), and the string represented device names (e.g. /device:GPU:<id>) will refer to the virtual devices and have the <id> field assigned sequentially starting from 0, according to the order of the virtual devices determined by device_ordinal and the location in the virtual device list. For example, visible_device_list = "1,0" virtual_devices { memory_limit: 1GB memory_limit: 2GB } virtual_devices { memory_limit: 3GB memory_limit: 4GB } will create 4 virtual devices as: /device:GPU:0 -> visible GPU 1 with 1GB memory /device:GPU:1 -> visible GPU 1 with 2GB memory /device:GPU:2 -> visible GPU 0 with 3GB memory /device:GPU:3 -> visible GPU 0 with 4GB memory but visible_device_list = "1,0" virtual_devices { memory_limit: 1GB memory_limit: 2GB device_ordinal: 10 device_ordinal: 20} virtual_devices { memory_limit: 3GB memory_limit: 4GB device_ordinal: 10 device_ordinal: 20} will create 4 virtual devices as: /device:GPU:0 -> visible GPU 1 with 1GB memory (ordinal 10) /device:GPU:1 -> visible GPU 0 with 3GB memory (ordinal 10) /device:GPU:2 -> visible GPU 1 with 2GB memory (ordinal 20) /device:GPU:3 -> visible GPU 0 with 4GB memory (ordinal 20) NOTE: 1. It's invalid to set both this and "per_process_gpu_memory_fraction" at the same time. 2. Currently this setting is per-process, not per-session. Using different settings in different sessions within same process will result in undefined behavior.repeated .tensorflow.GPUOptions.Experimental.VirtualDevices virtual_devices = 1; -
addVirtualDevices
public GPUOptions.Experimental.Builder addVirtualDevices(GPUOptions.Experimental.VirtualDevices.Builder builderForValue) The multi virtual device settings. If empty (not set), it will create single virtual device on each visible GPU, according to the settings in "visible_device_list" above. Otherwise, the number of elements in the list must be the same as the number of visible GPUs (after "visible_device_list" filtering if it is set), and the string represented device names (e.g. /device:GPU:<id>) will refer to the virtual devices and have the <id> field assigned sequentially starting from 0, according to the order of the virtual devices determined by device_ordinal and the location in the virtual device list. For example, visible_device_list = "1,0" virtual_devices { memory_limit: 1GB memory_limit: 2GB } virtual_devices { memory_limit: 3GB memory_limit: 4GB } will create 4 virtual devices as: /device:GPU:0 -> visible GPU 1 with 1GB memory /device:GPU:1 -> visible GPU 1 with 2GB memory /device:GPU:2 -> visible GPU 0 with 3GB memory /device:GPU:3 -> visible GPU 0 with 4GB memory but visible_device_list = "1,0" virtual_devices { memory_limit: 1GB memory_limit: 2GB device_ordinal: 10 device_ordinal: 20} virtual_devices { memory_limit: 3GB memory_limit: 4GB device_ordinal: 10 device_ordinal: 20} will create 4 virtual devices as: /device:GPU:0 -> visible GPU 1 with 1GB memory (ordinal 10) /device:GPU:1 -> visible GPU 0 with 3GB memory (ordinal 10) /device:GPU:2 -> visible GPU 1 with 2GB memory (ordinal 20) /device:GPU:3 -> visible GPU 0 with 4GB memory (ordinal 20) NOTE: 1. It's invalid to set both this and "per_process_gpu_memory_fraction" at the same time. 2. Currently this setting is per-process, not per-session. Using different settings in different sessions within same process will result in undefined behavior.repeated .tensorflow.GPUOptions.Experimental.VirtualDevices virtual_devices = 1; -
addVirtualDevices
public GPUOptions.Experimental.Builder addVirtualDevices(int index, GPUOptions.Experimental.VirtualDevices.Builder builderForValue) The multi virtual device settings. If empty (not set), it will create single virtual device on each visible GPU, according to the settings in "visible_device_list" above. Otherwise, the number of elements in the list must be the same as the number of visible GPUs (after "visible_device_list" filtering if it is set), and the string represented device names (e.g. /device:GPU:<id>) will refer to the virtual devices and have the <id> field assigned sequentially starting from 0, according to the order of the virtual devices determined by device_ordinal and the location in the virtual device list. For example, visible_device_list = "1,0" virtual_devices { memory_limit: 1GB memory_limit: 2GB } virtual_devices { memory_limit: 3GB memory_limit: 4GB } will create 4 virtual devices as: /device:GPU:0 -> visible GPU 1 with 1GB memory /device:GPU:1 -> visible GPU 1 with 2GB memory /device:GPU:2 -> visible GPU 0 with 3GB memory /device:GPU:3 -> visible GPU 0 with 4GB memory but visible_device_list = "1,0" virtual_devices { memory_limit: 1GB memory_limit: 2GB device_ordinal: 10 device_ordinal: 20} virtual_devices { memory_limit: 3GB memory_limit: 4GB device_ordinal: 10 device_ordinal: 20} will create 4 virtual devices as: /device:GPU:0 -> visible GPU 1 with 1GB memory (ordinal 10) /device:GPU:1 -> visible GPU 0 with 3GB memory (ordinal 10) /device:GPU:2 -> visible GPU 1 with 2GB memory (ordinal 20) /device:GPU:3 -> visible GPU 0 with 4GB memory (ordinal 20) NOTE: 1. It's invalid to set both this and "per_process_gpu_memory_fraction" at the same time. 2. Currently this setting is per-process, not per-session. Using different settings in different sessions within same process will result in undefined behavior.repeated .tensorflow.GPUOptions.Experimental.VirtualDevices virtual_devices = 1; -
addAllVirtualDevices
public GPUOptions.Experimental.Builder addAllVirtualDevices(Iterable<? extends GPUOptions.Experimental.VirtualDevices> values) The multi virtual device settings. If empty (not set), it will create single virtual device on each visible GPU, according to the settings in "visible_device_list" above. Otherwise, the number of elements in the list must be the same as the number of visible GPUs (after "visible_device_list" filtering if it is set), and the string represented device names (e.g. /device:GPU:<id>) will refer to the virtual devices and have the <id> field assigned sequentially starting from 0, according to the order of the virtual devices determined by device_ordinal and the location in the virtual device list. For example, visible_device_list = "1,0" virtual_devices { memory_limit: 1GB memory_limit: 2GB } virtual_devices { memory_limit: 3GB memory_limit: 4GB } will create 4 virtual devices as: /device:GPU:0 -> visible GPU 1 with 1GB memory /device:GPU:1 -> visible GPU 1 with 2GB memory /device:GPU:2 -> visible GPU 0 with 3GB memory /device:GPU:3 -> visible GPU 0 with 4GB memory but visible_device_list = "1,0" virtual_devices { memory_limit: 1GB memory_limit: 2GB device_ordinal: 10 device_ordinal: 20} virtual_devices { memory_limit: 3GB memory_limit: 4GB device_ordinal: 10 device_ordinal: 20} will create 4 virtual devices as: /device:GPU:0 -> visible GPU 1 with 1GB memory (ordinal 10) /device:GPU:1 -> visible GPU 0 with 3GB memory (ordinal 10) /device:GPU:2 -> visible GPU 1 with 2GB memory (ordinal 20) /device:GPU:3 -> visible GPU 0 with 4GB memory (ordinal 20) NOTE: 1. It's invalid to set both this and "per_process_gpu_memory_fraction" at the same time. 2. Currently this setting is per-process, not per-session. Using different settings in different sessions within same process will result in undefined behavior.repeated .tensorflow.GPUOptions.Experimental.VirtualDevices virtual_devices = 1; -
clearVirtualDevices
The multi virtual device settings. If empty (not set), it will create single virtual device on each visible GPU, according to the settings in "visible_device_list" above. Otherwise, the number of elements in the list must be the same as the number of visible GPUs (after "visible_device_list" filtering if it is set), and the string represented device names (e.g. /device:GPU:<id>) will refer to the virtual devices and have the <id> field assigned sequentially starting from 0, according to the order of the virtual devices determined by device_ordinal and the location in the virtual device list. For example, visible_device_list = "1,0" virtual_devices { memory_limit: 1GB memory_limit: 2GB } virtual_devices { memory_limit: 3GB memory_limit: 4GB } will create 4 virtual devices as: /device:GPU:0 -> visible GPU 1 with 1GB memory /device:GPU:1 -> visible GPU 1 with 2GB memory /device:GPU:2 -> visible GPU 0 with 3GB memory /device:GPU:3 -> visible GPU 0 with 4GB memory but visible_device_list = "1,0" virtual_devices { memory_limit: 1GB memory_limit: 2GB device_ordinal: 10 device_ordinal: 20} virtual_devices { memory_limit: 3GB memory_limit: 4GB device_ordinal: 10 device_ordinal: 20} will create 4 virtual devices as: /device:GPU:0 -> visible GPU 1 with 1GB memory (ordinal 10) /device:GPU:1 -> visible GPU 0 with 3GB memory (ordinal 10) /device:GPU:2 -> visible GPU 1 with 2GB memory (ordinal 20) /device:GPU:3 -> visible GPU 0 with 4GB memory (ordinal 20) NOTE: 1. It's invalid to set both this and "per_process_gpu_memory_fraction" at the same time. 2. Currently this setting is per-process, not per-session. Using different settings in different sessions within same process will result in undefined behavior.repeated .tensorflow.GPUOptions.Experimental.VirtualDevices virtual_devices = 1; -
removeVirtualDevices
The multi virtual device settings. If empty (not set), it will create single virtual device on each visible GPU, according to the settings in "visible_device_list" above. Otherwise, the number of elements in the list must be the same as the number of visible GPUs (after "visible_device_list" filtering if it is set), and the string represented device names (e.g. /device:GPU:<id>) will refer to the virtual devices and have the <id> field assigned sequentially starting from 0, according to the order of the virtual devices determined by device_ordinal and the location in the virtual device list. For example, visible_device_list = "1,0" virtual_devices { memory_limit: 1GB memory_limit: 2GB } virtual_devices { memory_limit: 3GB memory_limit: 4GB } will create 4 virtual devices as: /device:GPU:0 -> visible GPU 1 with 1GB memory /device:GPU:1 -> visible GPU 1 with 2GB memory /device:GPU:2 -> visible GPU 0 with 3GB memory /device:GPU:3 -> visible GPU 0 with 4GB memory but visible_device_list = "1,0" virtual_devices { memory_limit: 1GB memory_limit: 2GB device_ordinal: 10 device_ordinal: 20} virtual_devices { memory_limit: 3GB memory_limit: 4GB device_ordinal: 10 device_ordinal: 20} will create 4 virtual devices as: /device:GPU:0 -> visible GPU 1 with 1GB memory (ordinal 10) /device:GPU:1 -> visible GPU 0 with 3GB memory (ordinal 10) /device:GPU:2 -> visible GPU 1 with 2GB memory (ordinal 20) /device:GPU:3 -> visible GPU 0 with 4GB memory (ordinal 20) NOTE: 1. It's invalid to set both this and "per_process_gpu_memory_fraction" at the same time. 2. Currently this setting is per-process, not per-session. Using different settings in different sessions within same process will result in undefined behavior.repeated .tensorflow.GPUOptions.Experimental.VirtualDevices virtual_devices = 1; -
getVirtualDevicesBuilder
The multi virtual device settings. If empty (not set), it will create single virtual device on each visible GPU, according to the settings in "visible_device_list" above. Otherwise, the number of elements in the list must be the same as the number of visible GPUs (after "visible_device_list" filtering if it is set), and the string represented device names (e.g. /device:GPU:<id>) will refer to the virtual devices and have the <id> field assigned sequentially starting from 0, according to the order of the virtual devices determined by device_ordinal and the location in the virtual device list. For example, visible_device_list = "1,0" virtual_devices { memory_limit: 1GB memory_limit: 2GB } virtual_devices { memory_limit: 3GB memory_limit: 4GB } will create 4 virtual devices as: /device:GPU:0 -> visible GPU 1 with 1GB memory /device:GPU:1 -> visible GPU 1 with 2GB memory /device:GPU:2 -> visible GPU 0 with 3GB memory /device:GPU:3 -> visible GPU 0 with 4GB memory but visible_device_list = "1,0" virtual_devices { memory_limit: 1GB memory_limit: 2GB device_ordinal: 10 device_ordinal: 20} virtual_devices { memory_limit: 3GB memory_limit: 4GB device_ordinal: 10 device_ordinal: 20} will create 4 virtual devices as: /device:GPU:0 -> visible GPU 1 with 1GB memory (ordinal 10) /device:GPU:1 -> visible GPU 0 with 3GB memory (ordinal 10) /device:GPU:2 -> visible GPU 1 with 2GB memory (ordinal 20) /device:GPU:3 -> visible GPU 0 with 4GB memory (ordinal 20) NOTE: 1. It's invalid to set both this and "per_process_gpu_memory_fraction" at the same time. 2. Currently this setting is per-process, not per-session. Using different settings in different sessions within same process will result in undefined behavior.repeated .tensorflow.GPUOptions.Experimental.VirtualDevices virtual_devices = 1; -
getVirtualDevicesOrBuilder
The multi virtual device settings. If empty (not set), it will create single virtual device on each visible GPU, according to the settings in "visible_device_list" above. Otherwise, the number of elements in the list must be the same as the number of visible GPUs (after "visible_device_list" filtering if it is set), and the string represented device names (e.g. /device:GPU:<id>) will refer to the virtual devices and have the <id> field assigned sequentially starting from 0, according to the order of the virtual devices determined by device_ordinal and the location in the virtual device list. For example, visible_device_list = "1,0" virtual_devices { memory_limit: 1GB memory_limit: 2GB } virtual_devices { memory_limit: 3GB memory_limit: 4GB } will create 4 virtual devices as: /device:GPU:0 -> visible GPU 1 with 1GB memory /device:GPU:1 -> visible GPU 1 with 2GB memory /device:GPU:2 -> visible GPU 0 with 3GB memory /device:GPU:3 -> visible GPU 0 with 4GB memory but visible_device_list = "1,0" virtual_devices { memory_limit: 1GB memory_limit: 2GB device_ordinal: 10 device_ordinal: 20} virtual_devices { memory_limit: 3GB memory_limit: 4GB device_ordinal: 10 device_ordinal: 20} will create 4 virtual devices as: /device:GPU:0 -> visible GPU 1 with 1GB memory (ordinal 10) /device:GPU:1 -> visible GPU 0 with 3GB memory (ordinal 10) /device:GPU:2 -> visible GPU 1 with 2GB memory (ordinal 20) /device:GPU:3 -> visible GPU 0 with 4GB memory (ordinal 20) NOTE: 1. It's invalid to set both this and "per_process_gpu_memory_fraction" at the same time. 2. Currently this setting is per-process, not per-session. Using different settings in different sessions within same process will result in undefined behavior.repeated .tensorflow.GPUOptions.Experimental.VirtualDevices virtual_devices = 1;- Specified by:
getVirtualDevicesOrBuilderin interfaceGPUOptions.ExperimentalOrBuilder
-
getVirtualDevicesOrBuilderList
public List<? extends GPUOptions.Experimental.VirtualDevicesOrBuilder> getVirtualDevicesOrBuilderList()The multi virtual device settings. If empty (not set), it will create single virtual device on each visible GPU, according to the settings in "visible_device_list" above. Otherwise, the number of elements in the list must be the same as the number of visible GPUs (after "visible_device_list" filtering if it is set), and the string represented device names (e.g. /device:GPU:<id>) will refer to the virtual devices and have the <id> field assigned sequentially starting from 0, according to the order of the virtual devices determined by device_ordinal and the location in the virtual device list. For example, visible_device_list = "1,0" virtual_devices { memory_limit: 1GB memory_limit: 2GB } virtual_devices { memory_limit: 3GB memory_limit: 4GB } will create 4 virtual devices as: /device:GPU:0 -> visible GPU 1 with 1GB memory /device:GPU:1 -> visible GPU 1 with 2GB memory /device:GPU:2 -> visible GPU 0 with 3GB memory /device:GPU:3 -> visible GPU 0 with 4GB memory but visible_device_list = "1,0" virtual_devices { memory_limit: 1GB memory_limit: 2GB device_ordinal: 10 device_ordinal: 20} virtual_devices { memory_limit: 3GB memory_limit: 4GB device_ordinal: 10 device_ordinal: 20} will create 4 virtual devices as: /device:GPU:0 -> visible GPU 1 with 1GB memory (ordinal 10) /device:GPU:1 -> visible GPU 0 with 3GB memory (ordinal 10) /device:GPU:2 -> visible GPU 1 with 2GB memory (ordinal 20) /device:GPU:3 -> visible GPU 0 with 4GB memory (ordinal 20) NOTE: 1. It's invalid to set both this and "per_process_gpu_memory_fraction" at the same time. 2. Currently this setting is per-process, not per-session. Using different settings in different sessions within same process will result in undefined behavior.repeated .tensorflow.GPUOptions.Experimental.VirtualDevices virtual_devices = 1;- Specified by:
getVirtualDevicesOrBuilderListin interfaceGPUOptions.ExperimentalOrBuilder
-
addVirtualDevicesBuilder
The multi virtual device settings. If empty (not set), it will create single virtual device on each visible GPU, according to the settings in "visible_device_list" above. Otherwise, the number of elements in the list must be the same as the number of visible GPUs (after "visible_device_list" filtering if it is set), and the string represented device names (e.g. /device:GPU:<id>) will refer to the virtual devices and have the <id> field assigned sequentially starting from 0, according to the order of the virtual devices determined by device_ordinal and the location in the virtual device list. For example, visible_device_list = "1,0" virtual_devices { memory_limit: 1GB memory_limit: 2GB } virtual_devices { memory_limit: 3GB memory_limit: 4GB } will create 4 virtual devices as: /device:GPU:0 -> visible GPU 1 with 1GB memory /device:GPU:1 -> visible GPU 1 with 2GB memory /device:GPU:2 -> visible GPU 0 with 3GB memory /device:GPU:3 -> visible GPU 0 with 4GB memory but visible_device_list = "1,0" virtual_devices { memory_limit: 1GB memory_limit: 2GB device_ordinal: 10 device_ordinal: 20} virtual_devices { memory_limit: 3GB memory_limit: 4GB device_ordinal: 10 device_ordinal: 20} will create 4 virtual devices as: /device:GPU:0 -> visible GPU 1 with 1GB memory (ordinal 10) /device:GPU:1 -> visible GPU 0 with 3GB memory (ordinal 10) /device:GPU:2 -> visible GPU 1 with 2GB memory (ordinal 20) /device:GPU:3 -> visible GPU 0 with 4GB memory (ordinal 20) NOTE: 1. It's invalid to set both this and "per_process_gpu_memory_fraction" at the same time. 2. Currently this setting is per-process, not per-session. Using different settings in different sessions within same process will result in undefined behavior.repeated .tensorflow.GPUOptions.Experimental.VirtualDevices virtual_devices = 1; -
addVirtualDevicesBuilder
The multi virtual device settings. If empty (not set), it will create single virtual device on each visible GPU, according to the settings in "visible_device_list" above. Otherwise, the number of elements in the list must be the same as the number of visible GPUs (after "visible_device_list" filtering if it is set), and the string represented device names (e.g. /device:GPU:<id>) will refer to the virtual devices and have the <id> field assigned sequentially starting from 0, according to the order of the virtual devices determined by device_ordinal and the location in the virtual device list. For example, visible_device_list = "1,0" virtual_devices { memory_limit: 1GB memory_limit: 2GB } virtual_devices { memory_limit: 3GB memory_limit: 4GB } will create 4 virtual devices as: /device:GPU:0 -> visible GPU 1 with 1GB memory /device:GPU:1 -> visible GPU 1 with 2GB memory /device:GPU:2 -> visible GPU 0 with 3GB memory /device:GPU:3 -> visible GPU 0 with 4GB memory but visible_device_list = "1,0" virtual_devices { memory_limit: 1GB memory_limit: 2GB device_ordinal: 10 device_ordinal: 20} virtual_devices { memory_limit: 3GB memory_limit: 4GB device_ordinal: 10 device_ordinal: 20} will create 4 virtual devices as: /device:GPU:0 -> visible GPU 1 with 1GB memory (ordinal 10) /device:GPU:1 -> visible GPU 0 with 3GB memory (ordinal 10) /device:GPU:2 -> visible GPU 1 with 2GB memory (ordinal 20) /device:GPU:3 -> visible GPU 0 with 4GB memory (ordinal 20) NOTE: 1. It's invalid to set both this and "per_process_gpu_memory_fraction" at the same time. 2. Currently this setting is per-process, not per-session. Using different settings in different sessions within same process will result in undefined behavior.repeated .tensorflow.GPUOptions.Experimental.VirtualDevices virtual_devices = 1; -
getVirtualDevicesBuilderList
The multi virtual device settings. If empty (not set), it will create single virtual device on each visible GPU, according to the settings in "visible_device_list" above. Otherwise, the number of elements in the list must be the same as the number of visible GPUs (after "visible_device_list" filtering if it is set), and the string represented device names (e.g. /device:GPU:<id>) will refer to the virtual devices and have the <id> field assigned sequentially starting from 0, according to the order of the virtual devices determined by device_ordinal and the location in the virtual device list. For example, visible_device_list = "1,0" virtual_devices { memory_limit: 1GB memory_limit: 2GB } virtual_devices { memory_limit: 3GB memory_limit: 4GB } will create 4 virtual devices as: /device:GPU:0 -> visible GPU 1 with 1GB memory /device:GPU:1 -> visible GPU 1 with 2GB memory /device:GPU:2 -> visible GPU 0 with 3GB memory /device:GPU:3 -> visible GPU 0 with 4GB memory but visible_device_list = "1,0" virtual_devices { memory_limit: 1GB memory_limit: 2GB device_ordinal: 10 device_ordinal: 20} virtual_devices { memory_limit: 3GB memory_limit: 4GB device_ordinal: 10 device_ordinal: 20} will create 4 virtual devices as: /device:GPU:0 -> visible GPU 1 with 1GB memory (ordinal 10) /device:GPU:1 -> visible GPU 0 with 3GB memory (ordinal 10) /device:GPU:2 -> visible GPU 1 with 2GB memory (ordinal 20) /device:GPU:3 -> visible GPU 0 with 4GB memory (ordinal 20) NOTE: 1. It's invalid to set both this and "per_process_gpu_memory_fraction" at the same time. 2. Currently this setting is per-process, not per-session. Using different settings in different sessions within same process will result in undefined behavior.repeated .tensorflow.GPUOptions.Experimental.VirtualDevices virtual_devices = 1; -
getNumVirtualDevicesPerGpu
public int getNumVirtualDevicesPerGpu()The number of virtual devices to create on each visible GPU. The available memory will be split equally among all virtual devices. If the field `memory_limit_mb` in `VirtualDevices` is not empty, this field will be ignored.
int32 num_virtual_devices_per_gpu = 15;- Specified by:
getNumVirtualDevicesPerGpuin interfaceGPUOptions.ExperimentalOrBuilder- Returns:
- The numVirtualDevicesPerGpu.
-
setNumVirtualDevicesPerGpu
The number of virtual devices to create on each visible GPU. The available memory will be split equally among all virtual devices. If the field `memory_limit_mb` in `VirtualDevices` is not empty, this field will be ignored.
int32 num_virtual_devices_per_gpu = 15;- Parameters:
value- The numVirtualDevicesPerGpu to set.- Returns:
- This builder for chaining.
-
clearNumVirtualDevicesPerGpu
The number of virtual devices to create on each visible GPU. The available memory will be split equally among all virtual devices. If the field `memory_limit_mb` in `VirtualDevices` is not empty, this field will be ignored.
int32 num_virtual_devices_per_gpu = 15;- Returns:
- This builder for chaining.
-
getUseUnifiedMemory
public boolean getUseUnifiedMemory()If true, uses CUDA unified memory for memory allocations. If per_process_gpu_memory_fraction option is greater than 1.0, then unified memory is used regardless of the value for this field. See comments for per_process_gpu_memory_fraction field for more details and requirements of the unified memory. This option is useful to oversubscribe memory if multiple processes are sharing a single GPU while individually using less than 1.0 per process memory fraction.
bool use_unified_memory = 2;- Specified by:
getUseUnifiedMemoryin interfaceGPUOptions.ExperimentalOrBuilder- Returns:
- The useUnifiedMemory.
-
setUseUnifiedMemory
If true, uses CUDA unified memory for memory allocations. If per_process_gpu_memory_fraction option is greater than 1.0, then unified memory is used regardless of the value for this field. See comments for per_process_gpu_memory_fraction field for more details and requirements of the unified memory. This option is useful to oversubscribe memory if multiple processes are sharing a single GPU while individually using less than 1.0 per process memory fraction.
bool use_unified_memory = 2;- Parameters:
value- The useUnifiedMemory to set.- Returns:
- This builder for chaining.
-
clearUseUnifiedMemory
If true, uses CUDA unified memory for memory allocations. If per_process_gpu_memory_fraction option is greater than 1.0, then unified memory is used regardless of the value for this field. See comments for per_process_gpu_memory_fraction field for more details and requirements of the unified memory. This option is useful to oversubscribe memory if multiple processes are sharing a single GPU while individually using less than 1.0 per process memory fraction.
bool use_unified_memory = 2;- Returns:
- This builder for chaining.
-
getNumDevToDevCopyStreams
public int getNumDevToDevCopyStreams()If > 1, the number of device-to-device copy streams to create for each GPUDevice. Default value is 0, which is automatically converted to 1.
int32 num_dev_to_dev_copy_streams = 3;- Specified by:
getNumDevToDevCopyStreamsin interfaceGPUOptions.ExperimentalOrBuilder- Returns:
- The numDevToDevCopyStreams.
-
setNumDevToDevCopyStreams
If > 1, the number of device-to-device copy streams to create for each GPUDevice. Default value is 0, which is automatically converted to 1.
int32 num_dev_to_dev_copy_streams = 3;- Parameters:
value- The numDevToDevCopyStreams to set.- Returns:
- This builder for chaining.
-
clearNumDevToDevCopyStreams
If > 1, the number of device-to-device copy streams to create for each GPUDevice. Default value is 0, which is automatically converted to 1.
int32 num_dev_to_dev_copy_streams = 3;- Returns:
- This builder for chaining.
-
getCollectiveRingOrder
If non-empty, defines a good GPU ring order on a single worker based on device interconnect. This assumes that all workers have the same GPU topology. Specify as a comma-separated string, e.g. "3,2,1,0,7,6,5,4". This ring order is used by the RingReducer implementation of CollectiveReduce, and serves as an override to automatic ring order generation in OrderTaskDeviceMap() during CollectiveParam resolution.
string collective_ring_order = 4;- Specified by:
getCollectiveRingOrderin interfaceGPUOptions.ExperimentalOrBuilder- Returns:
- The collectiveRingOrder.
-
getCollectiveRingOrderBytes
public com.google.protobuf.ByteString getCollectiveRingOrderBytes()If non-empty, defines a good GPU ring order on a single worker based on device interconnect. This assumes that all workers have the same GPU topology. Specify as a comma-separated string, e.g. "3,2,1,0,7,6,5,4". This ring order is used by the RingReducer implementation of CollectiveReduce, and serves as an override to automatic ring order generation in OrderTaskDeviceMap() during CollectiveParam resolution.
string collective_ring_order = 4;- Specified by:
getCollectiveRingOrderBytesin interfaceGPUOptions.ExperimentalOrBuilder- Returns:
- The bytes for collectiveRingOrder.
-
setCollectiveRingOrder
If non-empty, defines a good GPU ring order on a single worker based on device interconnect. This assumes that all workers have the same GPU topology. Specify as a comma-separated string, e.g. "3,2,1,0,7,6,5,4". This ring order is used by the RingReducer implementation of CollectiveReduce, and serves as an override to automatic ring order generation in OrderTaskDeviceMap() during CollectiveParam resolution.
string collective_ring_order = 4;- Parameters:
value- The collectiveRingOrder to set.- Returns:
- This builder for chaining.
-
clearCollectiveRingOrder
If non-empty, defines a good GPU ring order on a single worker based on device interconnect. This assumes that all workers have the same GPU topology. Specify as a comma-separated string, e.g. "3,2,1,0,7,6,5,4". This ring order is used by the RingReducer implementation of CollectiveReduce, and serves as an override to automatic ring order generation in OrderTaskDeviceMap() during CollectiveParam resolution.
string collective_ring_order = 4;- Returns:
- This builder for chaining.
-
setCollectiveRingOrderBytes
public GPUOptions.Experimental.Builder setCollectiveRingOrderBytes(com.google.protobuf.ByteString value) If non-empty, defines a good GPU ring order on a single worker based on device interconnect. This assumes that all workers have the same GPU topology. Specify as a comma-separated string, e.g. "3,2,1,0,7,6,5,4". This ring order is used by the RingReducer implementation of CollectiveReduce, and serves as an override to automatic ring order generation in OrderTaskDeviceMap() during CollectiveParam resolution.
string collective_ring_order = 4;- Parameters:
value- The bytes for collectiveRingOrder to set.- Returns:
- This builder for chaining.
-
getTimestampedAllocator
public boolean getTimestampedAllocator()If true then extra work is done by GPUDevice and GPUBFCAllocator to keep track of when GPU memory is freed and when kernels actually complete so that we can know when a nominally free memory chunk is really not subject to pending use.
bool timestamped_allocator = 5;- Specified by:
getTimestampedAllocatorin interfaceGPUOptions.ExperimentalOrBuilder- Returns:
- The timestampedAllocator.
-
setTimestampedAllocator
If true then extra work is done by GPUDevice and GPUBFCAllocator to keep track of when GPU memory is freed and when kernels actually complete so that we can know when a nominally free memory chunk is really not subject to pending use.
bool timestamped_allocator = 5;- Parameters:
value- The timestampedAllocator to set.- Returns:
- This builder for chaining.
-
clearTimestampedAllocator
If true then extra work is done by GPUDevice and GPUBFCAllocator to keep track of when GPU memory is freed and when kernels actually complete so that we can know when a nominally free memory chunk is really not subject to pending use.
bool timestamped_allocator = 5;- Returns:
- This builder for chaining.
-
getKernelTrackerMaxInterval
public int getKernelTrackerMaxInterval()Parameters for GPUKernelTracker. By default no kernel tracking is done. Note that timestamped_allocator is only effective if some tracking is specified. If kernel_tracker_max_interval = n > 0, then a tracking event is inserted after every n kernels without an event.
int32 kernel_tracker_max_interval = 7;- Specified by:
getKernelTrackerMaxIntervalin interfaceGPUOptions.ExperimentalOrBuilder- Returns:
- The kernelTrackerMaxInterval.
-
setKernelTrackerMaxInterval
Parameters for GPUKernelTracker. By default no kernel tracking is done. Note that timestamped_allocator is only effective if some tracking is specified. If kernel_tracker_max_interval = n > 0, then a tracking event is inserted after every n kernels without an event.
int32 kernel_tracker_max_interval = 7;- Parameters:
value- The kernelTrackerMaxInterval to set.- Returns:
- This builder for chaining.
-
clearKernelTrackerMaxInterval
Parameters for GPUKernelTracker. By default no kernel tracking is done. Note that timestamped_allocator is only effective if some tracking is specified. If kernel_tracker_max_interval = n > 0, then a tracking event is inserted after every n kernels without an event.
int32 kernel_tracker_max_interval = 7;- Returns:
- This builder for chaining.
-
getKernelTrackerMaxBytes
public int getKernelTrackerMaxBytes()If kernel_tracker_max_bytes = n > 0, then a tracking event is inserted after every series of kernels allocating a sum of memory >= n. If one kernel allocates b * n bytes, then one event will be inserted after it, but it will count as b against the pending limit.
int32 kernel_tracker_max_bytes = 8;- Specified by:
getKernelTrackerMaxBytesin interfaceGPUOptions.ExperimentalOrBuilder- Returns:
- The kernelTrackerMaxBytes.
-
setKernelTrackerMaxBytes
If kernel_tracker_max_bytes = n > 0, then a tracking event is inserted after every series of kernels allocating a sum of memory >= n. If one kernel allocates b * n bytes, then one event will be inserted after it, but it will count as b against the pending limit.
int32 kernel_tracker_max_bytes = 8;- Parameters:
value- The kernelTrackerMaxBytes to set.- Returns:
- This builder for chaining.
-
clearKernelTrackerMaxBytes
If kernel_tracker_max_bytes = n > 0, then a tracking event is inserted after every series of kernels allocating a sum of memory >= n. If one kernel allocates b * n bytes, then one event will be inserted after it, but it will count as b against the pending limit.
int32 kernel_tracker_max_bytes = 8;- Returns:
- This builder for chaining.
-
getKernelTrackerMaxPending
public int getKernelTrackerMaxPending()If kernel_tracker_max_pending > 0 then no more than this many tracking events can be outstanding at a time. An attempt to launch an additional kernel will stall until an event completes.
int32 kernel_tracker_max_pending = 9;- Specified by:
getKernelTrackerMaxPendingin interfaceGPUOptions.ExperimentalOrBuilder- Returns:
- The kernelTrackerMaxPending.
-
setKernelTrackerMaxPending
If kernel_tracker_max_pending > 0 then no more than this many tracking events can be outstanding at a time. An attempt to launch an additional kernel will stall until an event completes.
int32 kernel_tracker_max_pending = 9;- Parameters:
value- The kernelTrackerMaxPending to set.- Returns:
- This builder for chaining.
-
clearKernelTrackerMaxPending
If kernel_tracker_max_pending > 0 then no more than this many tracking events can be outstanding at a time. An attempt to launch an additional kernel will stall until an event completes.
int32 kernel_tracker_max_pending = 9;- Returns:
- This builder for chaining.
-
getInternalFragmentationFraction
public double getInternalFragmentationFraction()BFC Allocator can return an allocated chunk of memory upto 2x the requested size. For virtual devices with tight memory constraints, and proportionately large allocation requests, this can lead to a significant reduction in available memory. The threshold below controls when a chunk should be split if the chunk size exceeds requested memory size. It is expressed as a fraction of total available memory for the tf device. For example setting it to 0.05 would imply a chunk needs to be split if its size exceeds the requested memory by 5% of the total virtual device/gpu memory size.
double internal_fragmentation_fraction = 10;- Specified by:
getInternalFragmentationFractionin interfaceGPUOptions.ExperimentalOrBuilder- Returns:
- The internalFragmentationFraction.
-
setInternalFragmentationFraction
BFC Allocator can return an allocated chunk of memory upto 2x the requested size. For virtual devices with tight memory constraints, and proportionately large allocation requests, this can lead to a significant reduction in available memory. The threshold below controls when a chunk should be split if the chunk size exceeds requested memory size. It is expressed as a fraction of total available memory for the tf device. For example setting it to 0.05 would imply a chunk needs to be split if its size exceeds the requested memory by 5% of the total virtual device/gpu memory size.
double internal_fragmentation_fraction = 10;- Parameters:
value- The internalFragmentationFraction to set.- Returns:
- This builder for chaining.
-
clearInternalFragmentationFraction
BFC Allocator can return an allocated chunk of memory upto 2x the requested size. For virtual devices with tight memory constraints, and proportionately large allocation requests, this can lead to a significant reduction in available memory. The threshold below controls when a chunk should be split if the chunk size exceeds requested memory size. It is expressed as a fraction of total available memory for the tf device. For example setting it to 0.05 would imply a chunk needs to be split if its size exceeds the requested memory by 5% of the total virtual device/gpu memory size.
double internal_fragmentation_fraction = 10;- Returns:
- This builder for chaining.
-
getUseCudaMallocAsync
public boolean getUseCudaMallocAsync()When true, use CUDA cudaMallocAsync API instead of TF gpu allocator.
bool use_cuda_malloc_async = 11;- Specified by:
getUseCudaMallocAsyncin interfaceGPUOptions.ExperimentalOrBuilder- Returns:
- The useCudaMallocAsync.
-
setUseCudaMallocAsync
When true, use CUDA cudaMallocAsync API instead of TF gpu allocator.
bool use_cuda_malloc_async = 11;- Parameters:
value- The useCudaMallocAsync to set.- Returns:
- This builder for chaining.
-
clearUseCudaMallocAsync
When true, use CUDA cudaMallocAsync API instead of TF gpu allocator.
bool use_cuda_malloc_async = 11;- Returns:
- This builder for chaining.
-
getDisallowRetryOnAllocationFailure
public boolean getDisallowRetryOnAllocationFailure()By default, BFCAllocator may sleep when it runs out of memory, in the hopes that another thread will free up memory in the meantime. Setting this to true disables the sleep; instead we'll OOM immediately.
bool disallow_retry_on_allocation_failure = 12;- Specified by:
getDisallowRetryOnAllocationFailurein interfaceGPUOptions.ExperimentalOrBuilder- Returns:
- The disallowRetryOnAllocationFailure.
-
setDisallowRetryOnAllocationFailure
By default, BFCAllocator may sleep when it runs out of memory, in the hopes that another thread will free up memory in the meantime. Setting this to true disables the sleep; instead we'll OOM immediately.
bool disallow_retry_on_allocation_failure = 12;- Parameters:
value- The disallowRetryOnAllocationFailure to set.- Returns:
- This builder for chaining.
-
clearDisallowRetryOnAllocationFailure
By default, BFCAllocator may sleep when it runs out of memory, in the hopes that another thread will free up memory in the meantime. Setting this to true disables the sleep; instead we'll OOM immediately.
bool disallow_retry_on_allocation_failure = 12;- Returns:
- This builder for chaining.
-
getGpuHostMemLimitInMb
public float getGpuHostMemLimitInMb()Memory limit for "GPU host allocator", aka pinned memory allocator. This can also be set via the envvar TF_GPU_HOST_MEM_LIMIT_IN_MB.
float gpu_host_mem_limit_in_mb = 13;- Specified by:
getGpuHostMemLimitInMbin interfaceGPUOptions.ExperimentalOrBuilder- Returns:
- The gpuHostMemLimitInMb.
-
setGpuHostMemLimitInMb
Memory limit for "GPU host allocator", aka pinned memory allocator. This can also be set via the envvar TF_GPU_HOST_MEM_LIMIT_IN_MB.
float gpu_host_mem_limit_in_mb = 13;- Parameters:
value- The gpuHostMemLimitInMb to set.- Returns:
- This builder for chaining.
-
clearGpuHostMemLimitInMb
Memory limit for "GPU host allocator", aka pinned memory allocator. This can also be set via the envvar TF_GPU_HOST_MEM_LIMIT_IN_MB.
float gpu_host_mem_limit_in_mb = 13;- Returns:
- This builder for chaining.
-
getGpuHostMemDisallowGrowth
public boolean getGpuHostMemDisallowGrowth()If true, then the host allocator allocates its max memory all upfront and never grows. This can be useful for latency-sensitive systems, because growing the GPU host memory pool can be expensive. You probably only want to use this in combination with gpu_host_mem_limit_in_mb, because the default GPU host memory limit is quite high.
bool gpu_host_mem_disallow_growth = 14;- Specified by:
getGpuHostMemDisallowGrowthin interfaceGPUOptions.ExperimentalOrBuilder- Returns:
- The gpuHostMemDisallowGrowth.
-
setGpuHostMemDisallowGrowth
If true, then the host allocator allocates its max memory all upfront and never grows. This can be useful for latency-sensitive systems, because growing the GPU host memory pool can be expensive. You probably only want to use this in combination with gpu_host_mem_limit_in_mb, because the default GPU host memory limit is quite high.
bool gpu_host_mem_disallow_growth = 14;- Parameters:
value- The gpuHostMemDisallowGrowth to set.- Returns:
- This builder for chaining.
-
clearGpuHostMemDisallowGrowth
If true, then the host allocator allocates its max memory all upfront and never grows. This can be useful for latency-sensitive systems, because growing the GPU host memory pool can be expensive. You probably only want to use this in combination with gpu_host_mem_limit_in_mb, because the default GPU host memory limit is quite high.
bool gpu_host_mem_disallow_growth = 14;- Returns:
- This builder for chaining.
-
getGpuSystemMemorySizeInMb
public int getGpuSystemMemorySizeInMb()Memory limit for gpu system. This can also be set by TF_DEVICE_MIN_SYS_MEMORY_IN_MB, which takes precedence over gpu_system_memory_size_in_mb. With this, user can configure the gpu system memory size for better resource estimation of multi-tenancy(one gpu with multiple model) use case.
int32 gpu_system_memory_size_in_mb = 16;- Specified by:
getGpuSystemMemorySizeInMbin interfaceGPUOptions.ExperimentalOrBuilder- Returns:
- The gpuSystemMemorySizeInMb.
-
setGpuSystemMemorySizeInMb
Memory limit for gpu system. This can also be set by TF_DEVICE_MIN_SYS_MEMORY_IN_MB, which takes precedence over gpu_system_memory_size_in_mb. With this, user can configure the gpu system memory size for better resource estimation of multi-tenancy(one gpu with multiple model) use case.
int32 gpu_system_memory_size_in_mb = 16;- Parameters:
value- The gpuSystemMemorySizeInMb to set.- Returns:
- This builder for chaining.
-
clearGpuSystemMemorySizeInMb
Memory limit for gpu system. This can also be set by TF_DEVICE_MIN_SYS_MEMORY_IN_MB, which takes precedence over gpu_system_memory_size_in_mb. With this, user can configure the gpu system memory size for better resource estimation of multi-tenancy(one gpu with multiple model) use case.
int32 gpu_system_memory_size_in_mb = 16;- Returns:
- This builder for chaining.
-
getPopulatePjrtGpuClientCreationInfo
public boolean getPopulatePjrtGpuClientCreationInfo()If true, save information needed for created a PjRt GPU client for creating a client with remote devices.
bool populate_pjrt_gpu_client_creation_info = 17;- Specified by:
getPopulatePjrtGpuClientCreationInfoin interfaceGPUOptions.ExperimentalOrBuilder- Returns:
- The populatePjrtGpuClientCreationInfo.
-
setPopulatePjrtGpuClientCreationInfo
If true, save information needed for created a PjRt GPU client for creating a client with remote devices.
bool populate_pjrt_gpu_client_creation_info = 17;- Parameters:
value- The populatePjrtGpuClientCreationInfo to set.- Returns:
- This builder for chaining.
-
clearPopulatePjrtGpuClientCreationInfo
If true, save information needed for created a PjRt GPU client for creating a client with remote devices.
bool populate_pjrt_gpu_client_creation_info = 17;- Returns:
- This builder for chaining.
-
getNodeId
public int getNodeId()node_id for use when creating a PjRt GPU client with remote devices, which enumerates jobs*tasks from a ServerDef.
int32 node_id = 18;- Specified by:
getNodeIdin interfaceGPUOptions.ExperimentalOrBuilder- Returns:
- The nodeId.
-
setNodeId
node_id for use when creating a PjRt GPU client with remote devices, which enumerates jobs*tasks from a ServerDef.
int32 node_id = 18;- Parameters:
value- The nodeId to set.- Returns:
- This builder for chaining.
-
clearNodeId
node_id for use when creating a PjRt GPU client with remote devices, which enumerates jobs*tasks from a ServerDef.
int32 node_id = 18;- Returns:
- This builder for chaining.
-
hasStreamMergeOptions
public boolean hasStreamMergeOptions().tensorflow.GPUOptions.Experimental.StreamMergeOptions stream_merge_options = 19;- Specified by:
hasStreamMergeOptionsin interfaceGPUOptions.ExperimentalOrBuilder- Returns:
- Whether the streamMergeOptions field is set.
-
getStreamMergeOptions
.tensorflow.GPUOptions.Experimental.StreamMergeOptions stream_merge_options = 19;- Specified by:
getStreamMergeOptionsin interfaceGPUOptions.ExperimentalOrBuilder- Returns:
- The streamMergeOptions.
-
setStreamMergeOptions
public GPUOptions.Experimental.Builder setStreamMergeOptions(GPUOptions.Experimental.StreamMergeOptions value) .tensorflow.GPUOptions.Experimental.StreamMergeOptions stream_merge_options = 19; -
setStreamMergeOptions
public GPUOptions.Experimental.Builder setStreamMergeOptions(GPUOptions.Experimental.StreamMergeOptions.Builder builderForValue) .tensorflow.GPUOptions.Experimental.StreamMergeOptions stream_merge_options = 19; -
mergeStreamMergeOptions
public GPUOptions.Experimental.Builder mergeStreamMergeOptions(GPUOptions.Experimental.StreamMergeOptions value) .tensorflow.GPUOptions.Experimental.StreamMergeOptions stream_merge_options = 19; -
clearStreamMergeOptions
.tensorflow.GPUOptions.Experimental.StreamMergeOptions stream_merge_options = 19; -
getStreamMergeOptionsBuilder
.tensorflow.GPUOptions.Experimental.StreamMergeOptions stream_merge_options = 19; -
getStreamMergeOptionsOrBuilder
.tensorflow.GPUOptions.Experimental.StreamMergeOptions stream_merge_options = 19;- Specified by:
getStreamMergeOptionsOrBuilderin interfaceGPUOptions.ExperimentalOrBuilder
-
setUnknownFields
public final GPUOptions.Experimental.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) - Specified by:
setUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
setUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<GPUOptions.Experimental.Builder>
-
mergeUnknownFields
public final GPUOptions.Experimental.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) - Specified by:
mergeUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<GPUOptions.Experimental.Builder>
-