Class NvidiaMpsAllocation
- All Implemented Interfaces:
Serializable,SdkPojo,ToCopyableBuilder<NvidiaMpsAllocation.Builder,NvidiaMpsAllocation>
The GPU memory and compute limits for a container that shares a GPU by using NVIDIA Multi-Process Service (MPS). Amazon ECS assigns the container a single GPU that has enough memory available. Other containers that use MPS can share the same GPU.
- See Also:
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic NvidiaMpsAllocation.Builderbuilder()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 inthashCode()final IntegerThe maximum percentage of the GPU's compute capacity that the container can use.final Integermemory()The amount of GPU memory, in MiB, to allocate to the container.static Class<? extends NvidiaMpsAllocation.Builder> 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.Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
Method Details
-
memory
The amount of GPU memory, in MiB, to allocate to the container. Amazon ECS assigns the container a GPU that has at least the specified amount of memory available, and sets the
CUDA_MPS_PINNED_DEVICE_MEM_LIMITenvironment variable in the container to limit its memory to this amount. The memory must be available on a single GPU. If more than one container in a task usesnvidiaMps, Amazon ECS assigns them the same GPU, which must have enough memory available for all of them.- Returns:
- The amount of GPU memory, in MiB, to allocate to the container. Amazon ECS assigns the container a GPU
that has at least the specified amount of memory available, and sets the
CUDA_MPS_PINNED_DEVICE_MEM_LIMITenvironment variable in the container to limit its memory to this amount. The memory must be available on a single GPU. If more than one container in a task usesnvidiaMps, Amazon ECS assigns them the same GPU, which must have enough memory available for all of them.
-
maxComputePercent
The maximum percentage of the GPU's compute capacity that the container can use. Amazon ECS sets the
CUDA_MPS_ACTIVE_THREAD_PERCENTAGEenvironment variable in the container to this value. This value is a limit, not a reservation.If you don't specify this parameter, Amazon ECS doesn't set
CUDA_MPS_ACTIVE_THREAD_PERCENTAGE, and the active thread percentage of the MPS server on the container instance applies. By default, this is 100 percent.- Returns:
- The maximum percentage of the GPU's compute capacity that the container can use. Amazon ECS sets the
CUDA_MPS_ACTIVE_THREAD_PERCENTAGEenvironment variable in the container to this value. This value is a limit, not a reservation.If you don't specify this parameter, Amazon ECS doesn't set
CUDA_MPS_ACTIVE_THREAD_PERCENTAGE, and the active thread percentage of the MPS server on the container instance applies. By default, this is 100 percent.
-
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<NvidiaMpsAllocation.Builder,NvidiaMpsAllocation> - 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.
-