Class GpuDevice
- All Implemented Interfaces:
Serializable,SdkPojo,ToCopyableBuilder<GpuDevice.Builder,GpuDevice>
The state of a GPU on a container instance, including its sharing mode and the memory that's available for new containers.
- See Also:
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic GpuDevice.Builderbuilder()final IntegerThe number of containers that Amazon ECS assigned to the GPU.final booleanfinal booleanequalsBySdkFields(Object obj) Indicates whether some other object is "equal to" this one by SDK fields.final <T> Optional<T> getValueForField(String fieldName, Class<T> clazz) final StringgpuId()The ID of the GPU.final inthashCode()final IntegerThe amount of GPU memory, in MiB, that's available to allocate to new containers that use thenvidiaMpssharing strategy.static Class<? extends GpuDevice.Builder> final GpuSharingModeHow the GPU is shared between containers.final StringHow the GPU is shared between containers.Take this object and create a builder that contains all of the current property values of this object.final StringtoString()Returns a string representation of this object.final IntegerThe total amount of GPU memory, in MiB, that the Amazon ECS container agent reported for the GPU.Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
Method Details
-
gpuId
The ID of the GPU. This ID matches the GPU IDs in the
gpuIdsof the containers that Amazon ECS assigned to the GPU.- Returns:
- The ID of the GPU. This ID matches the GPU IDs in the
gpuIdsof the containers that Amazon ECS assigned to the GPU.
-
sharingMode
How the GPU is shared between containers.
Valid values:
-
IDLE- No containers are assigned to the GPU, and all of its memory is available. -
NVIDIA_MPS- One or more containers share the GPU by using NVIDIA Multi-Process Service (MPS). -
DEDICATED- One container has exclusive use of the GPU.
If the service returns an enum value that is not available in the current SDK version,
sharingModewill returnGpuSharingMode.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromsharingModeAsString().- Returns:
- How the GPU is shared between containers.
Valid values:
-
IDLE- No containers are assigned to the GPU, and all of its memory is available. -
NVIDIA_MPS- One or more containers share the GPU by using NVIDIA Multi-Process Service (MPS). -
DEDICATED- One container has exclusive use of the GPU.
-
- See Also:
-
-
sharingModeAsString
How the GPU is shared between containers.
Valid values:
-
IDLE- No containers are assigned to the GPU, and all of its memory is available. -
NVIDIA_MPS- One or more containers share the GPU by using NVIDIA Multi-Process Service (MPS). -
DEDICATED- One container has exclusive use of the GPU.
If the service returns an enum value that is not available in the current SDK version,
sharingModewill returnGpuSharingMode.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromsharingModeAsString().- Returns:
- How the GPU is shared between containers.
Valid values:
-
IDLE- No containers are assigned to the GPU, and all of its memory is available. -
NVIDIA_MPS- One or more containers share the GPU by using NVIDIA Multi-Process Service (MPS). -
DEDICATED- One container has exclusive use of the GPU.
-
- See Also:
-
-
totalMemoryInMiB
The total amount of GPU memory, in MiB, that the Amazon ECS container agent reported for the GPU. This is the memory that's available to containers, and it can be less than the nominal memory of the GPU.
- Returns:
- The total amount of GPU memory, in MiB, that the Amazon ECS container agent reported for the GPU. This is the memory that's available to containers, and it can be less than the nominal memory of the GPU.
-
remainingMemoryInMiB
The amount of GPU memory, in MiB, that's available to allocate to new containers that use the
nvidiaMpssharing strategy. Amazon ECS calculates this value from the memory that it allocated to containers on the GPU, not from the memory that the containers use.- Returns:
- The amount of GPU memory, in MiB, that's available to allocate to new containers that use the
nvidiaMpssharing strategy. Amazon ECS calculates this value from the memory that it allocated to containers on the GPU, not from the memory that the containers use.
-
containerCount
The number of containers that Amazon ECS assigned to the GPU. This value is
0when the sharing mode isIDLEand1when the sharing mode isDEDICATED. Amazon ECS counts the containers that it assigned to the GPU, not the processes that are running on it.- Returns:
- The number of containers that Amazon ECS assigned to the GPU. This value is
0when the sharing mode isIDLEand1when the sharing mode isDEDICATED. Amazon ECS counts the containers that it assigned to the GPU, not the processes that are running on it.
-
toBuilder
Description copied from interface:ToCopyableBuilderTake this object and create a builder that contains all of the current property values of this object.- Specified by:
toBuilderin interfaceToCopyableBuilder<GpuDevice.Builder,GpuDevice> - Returns:
- a builder for type T
-
builder
-
serializableBuilderClass
-
hashCode
-
equals
-
equalsBySdkFields
Description copied from interface:SdkPojoIndicates whether some other object is "equal to" this one by SDK fields. An SDK field is a modeled, non-inherited field in anSdkPojoclass, and is generated based on a service model.If an
SdkPojoclass does not have any inherited fields,equalsBySdkFieldsandequalsare essentially the same.- Specified by:
equalsBySdkFieldsin interfaceSdkPojo- Parameters:
obj- the object to be compared with- Returns:
- true if the other object equals to this object by sdk fields, false otherwise.
-
toString
-
getValueForField
-
sdkFields
-
sdkFieldNameToField
- Specified by:
sdkFieldNameToFieldin interfaceSdkPojo- Returns:
- The mapping between the field name and its corresponding field.
-