Class GPUOptions.Experimental

    • Field Detail

      • VIRTUAL_DEVICES_FIELD_NUMBER

        public static final int VIRTUAL_DEVICES_FIELD_NUMBER
        See Also:
        Constant Field Values
      • USE_UNIFIED_MEMORY_FIELD_NUMBER

        public static final int USE_UNIFIED_MEMORY_FIELD_NUMBER
        See Also:
        Constant Field Values
    • Method Detail

      • newInstance

        protected Object newInstance​(org.nd4j.shade.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
        Overrides:
        newInstance in class org.nd4j.shade.protobuf.GeneratedMessageV3
      • getUnknownFields

        public final org.nd4j.shade.protobuf.UnknownFieldSet getUnknownFields()
        Specified by:
        getUnknownFields in interface org.nd4j.shade.protobuf.MessageOrBuilder
        Overrides:
        getUnknownFields in class org.nd4j.shade.protobuf.GeneratedMessageV3
      • getDescriptor

        public static final org.nd4j.shade.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetFieldAccessorTable

        protected org.nd4j.shade.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class org.nd4j.shade.protobuf.GeneratedMessageV3
      • getVirtualDevicesList

        public List<GPUOptions.Experimental.VirtualDevices> 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 they appear in this list and the "memory_limit"
         list inside each element. For example,
           visible_device_list = "1,0"
           virtual_devices { memory_limit: 1GB memory_limit: 2GB }
           virtual_devices {}
         will create three 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 all available memory
         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:
        getVirtualDevicesList in interface GPUOptions.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 they appear in this list and the "memory_limit"
         list inside each element. For example,
           visible_device_list = "1,0"
           virtual_devices { memory_limit: 1GB memory_limit: 2GB }
           virtual_devices {}
         will create three 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 all available memory
         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:
        getVirtualDevicesOrBuilderList in interface GPUOptions.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 they appear in this list and the "memory_limit"
         list inside each element. For example,
           visible_device_list = "1,0"
           virtual_devices { memory_limit: 1GB memory_limit: 2GB }
           virtual_devices {}
         will create three 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 all available memory
         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:
        getVirtualDevicesCount in interface GPUOptions.ExperimentalOrBuilder
      • getVirtualDevices

        public GPUOptions.Experimental.VirtualDevices getVirtualDevices​(int index)
         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 they appear in this list and the "memory_limit"
         list inside each element. For example,
           visible_device_list = "1,0"
           virtual_devices { memory_limit: 1GB memory_limit: 2GB }
           virtual_devices {}
         will create three 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 all available memory
         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:
        getVirtualDevices in interface GPUOptions.ExperimentalOrBuilder
      • getVirtualDevicesOrBuilder

        public GPUOptions.Experimental.VirtualDevicesOrBuilder getVirtualDevicesOrBuilder​(int index)
         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 they appear in this list and the "memory_limit"
         list inside each element. For example,
           visible_device_list = "1,0"
           virtual_devices { memory_limit: 1GB memory_limit: 2GB }
           virtual_devices {}
         will create three 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 all available memory
         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:
        getVirtualDevicesOrBuilder in interface GPUOptions.ExperimentalOrBuilder
      • 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:
        getUseUnifiedMemory in interface GPUOptions.ExperimentalOrBuilder
        Returns:
        The useUnifiedMemory.
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface org.nd4j.shade.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class org.nd4j.shade.protobuf.GeneratedMessageV3
      • writeTo

        public void writeTo​(org.nd4j.shade.protobuf.CodedOutputStream output)
                     throws IOException
        Specified by:
        writeTo in interface org.nd4j.shade.protobuf.MessageLite
        Overrides:
        writeTo in class org.nd4j.shade.protobuf.GeneratedMessageV3
        Throws:
        IOException
      • getSerializedSize

        public int getSerializedSize()
        Specified by:
        getSerializedSize in interface org.nd4j.shade.protobuf.MessageLite
        Overrides:
        getSerializedSize in class org.nd4j.shade.protobuf.GeneratedMessageV3
      • equals

        public boolean equals​(Object obj)
        Specified by:
        equals in interface org.nd4j.shade.protobuf.Message
        Overrides:
        equals in class org.nd4j.shade.protobuf.AbstractMessage
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface org.nd4j.shade.protobuf.Message
        Overrides:
        hashCode in class org.nd4j.shade.protobuf.AbstractMessage
      • parseFrom

        public static GPUOptions.Experimental parseFrom​(ByteBuffer data)
                                                 throws org.nd4j.shade.protobuf.InvalidProtocolBufferException
        Throws:
        org.nd4j.shade.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static GPUOptions.Experimental parseFrom​(ByteBuffer data,
                                                        org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
                                                 throws org.nd4j.shade.protobuf.InvalidProtocolBufferException
        Throws:
        org.nd4j.shade.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static GPUOptions.Experimental parseFrom​(org.nd4j.shade.protobuf.ByteString data)
                                                 throws org.nd4j.shade.protobuf.InvalidProtocolBufferException
        Throws:
        org.nd4j.shade.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static GPUOptions.Experimental parseFrom​(org.nd4j.shade.protobuf.ByteString data,
                                                        org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
                                                 throws org.nd4j.shade.protobuf.InvalidProtocolBufferException
        Throws:
        org.nd4j.shade.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static GPUOptions.Experimental parseFrom​(byte[] data)
                                                 throws org.nd4j.shade.protobuf.InvalidProtocolBufferException
        Throws:
        org.nd4j.shade.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static GPUOptions.Experimental parseFrom​(byte[] data,
                                                        org.nd4j.shade.protobuf.ExtensionRegistryLite extensionRegistry)
                                                 throws org.nd4j.shade.protobuf.InvalidProtocolBufferException
        Throws:
        org.nd4j.shade.protobuf.InvalidProtocolBufferException
      • newBuilderForType

        public GPUOptions.Experimental.Builder newBuilderForType()
        Specified by:
        newBuilderForType in interface org.nd4j.shade.protobuf.Message
        Specified by:
        newBuilderForType in interface org.nd4j.shade.protobuf.MessageLite
      • toBuilder

        public GPUOptions.Experimental.Builder toBuilder()
        Specified by:
        toBuilder in interface org.nd4j.shade.protobuf.Message
        Specified by:
        toBuilder in interface org.nd4j.shade.protobuf.MessageLite
      • newBuilderForType

        protected GPUOptions.Experimental.Builder newBuilderForType​(org.nd4j.shade.protobuf.GeneratedMessageV3.BuilderParent parent)
        Specified by:
        newBuilderForType in class org.nd4j.shade.protobuf.GeneratedMessageV3
      • getParserForType

        public org.nd4j.shade.protobuf.Parser<GPUOptions.Experimental> getParserForType()
        Specified by:
        getParserForType in interface org.nd4j.shade.protobuf.Message
        Specified by:
        getParserForType in interface org.nd4j.shade.protobuf.MessageLite
        Overrides:
        getParserForType in class org.nd4j.shade.protobuf.GeneratedMessageV3
      • getDefaultInstanceForType

        public GPUOptions.Experimental getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface org.nd4j.shade.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface org.nd4j.shade.protobuf.MessageOrBuilder