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 Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<GPUOptions.Experimental.VirtualDevices.Builder>
    • clear

      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessageV3.Builder<GPUOptions.Experimental.VirtualDevices.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<GPUOptions.Experimental.VirtualDevices.Builder>
    • getDefaultInstanceForType

      public GPUOptions.Experimental.VirtualDevices getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • clone

      Specified by:
      clone in interface com.google.protobuf.Message.Builder
      Specified by:
      clone in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clone in class com.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:
      setField in interface com.google.protobuf.Message.Builder
      Overrides:
      setField in class com.google.protobuf.GeneratedMessageV3.Builder<GPUOptions.Experimental.VirtualDevices.Builder>
    • clearField

      public GPUOptions.Experimental.VirtualDevices.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
      Specified by:
      clearField in interface com.google.protobuf.Message.Builder
      Overrides:
      clearField in class com.google.protobuf.GeneratedMessageV3.Builder<GPUOptions.Experimental.VirtualDevices.Builder>
    • clearOneof

      public GPUOptions.Experimental.VirtualDevices.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
      Specified by:
      clearOneof in interface com.google.protobuf.Message.Builder
      Overrides:
      clearOneof in class com.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:
      setRepeatedField in interface com.google.protobuf.Message.Builder
      Overrides:
      setRepeatedField in class com.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:
      addRepeatedField in interface com.google.protobuf.Message.Builder
      Overrides:
      addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<GPUOptions.Experimental.VirtualDevices.Builder>
    • mergeFrom

      public GPUOptions.Experimental.VirtualDevices.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<GPUOptions.Experimental.VirtualDevices.Builder>
    • mergeFrom

    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.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:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<GPUOptions.Experimental.VirtualDevices.Builder>
      Throws:
      IOException
    • getMemoryLimitMbList

      public List<Float> getMemoryLimitMbList()
       Per "virtual" device memory limit, in MB. The number of elements in
       the list is the number of virtual devices to create on the
       corresponding visible GPU (see "virtual_devices" below).
       If empty 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:
      getMemoryLimitMbList in interface GPUOptions.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:
      getMemoryLimitMbCount in interface GPUOptions.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:
      getMemoryLimitMb in interface GPUOptions.Experimental.VirtualDevicesOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The memoryLimitMb at the given index.
    • setMemoryLimitMb

      public GPUOptions.Experimental.VirtualDevices.Builder setMemoryLimitMb(int index, float value)
       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

      public GPUOptions.Experimental.VirtualDevices.Builder addMemoryLimitMb(float value)
       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

      public List<Integer> getPriorityList()
       Priority values to use with the virtual devices. Use the cuda function
       cudaDeviceGetStreamPriorityRange to query for valid range of values for
       priority.
      
       On a P4000 GPU with cuda 10.1, the priority range reported was 0 for
       least priority and -1 for greatest priority.
      
       If this field is not specified, then the virtual devices will be
       created with the default. If this field has values set, then the size
       of this must match with the above memory_limit_mb.
       
      repeated int32 priority = 2;
      Specified by:
      getPriorityList in interface GPUOptions.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:
      getPriorityCount in interface GPUOptions.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:
      getPriority in interface GPUOptions.Experimental.VirtualDevicesOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The priority at the given index.
    • setPriority

      public GPUOptions.Experimental.VirtualDevices.Builder setPriority(int index, int value)
       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

      public GPUOptions.Experimental.VirtualDevices.Builder addPriority(int value)
       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

      public List<Integer> 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:
      getDeviceOrdinalList in interface GPUOptions.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:
      getDeviceOrdinalCount in interface GPUOptions.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:
      getDeviceOrdinal in interface GPUOptions.Experimental.VirtualDevicesOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The deviceOrdinal at the given index.
    • setDeviceOrdinal

      public GPUOptions.Experimental.VirtualDevices.Builder setDeviceOrdinal(int index, int value)
       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

      public GPUOptions.Experimental.VirtualDevices.Builder addDeviceOrdinal(int value)
       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:
      setUnknownFields in interface com.google.protobuf.Message.Builder
      Overrides:
      setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<GPUOptions.Experimental.VirtualDevices.Builder>
    • mergeUnknownFields

      public final GPUOptions.Experimental.VirtualDevices.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
      Specified by:
      mergeUnknownFields in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<GPUOptions.Experimental.VirtualDevices.Builder>