GpuDevice¶
Structure Class¶
GpuDevice
dataclass
¶
Bases: _SerdeShape
The state of a GPU on a container instance, including its sharing mode and the memory that's available for new containers.
Attributes¶
container_count
class-attribute
instance-attribute
¶
container_count: int | None = ...
The number of containers that Amazon ECS assigned to the GPU. This value
is 0 when the sharing mode is IDLE and 1 when the sharing mode is
DEDICATED. Amazon ECS counts the containers that it assigned to the
GPU, not the processes that are running on it.
gpu_id
class-attribute
instance-attribute
¶
gpu_id: str | None = ...
The ID of the GPU. This ID matches the GPU IDs in the gpuIds of the
containers that Amazon ECS assigned to the GPU.
remaining_memory_in_mi_b
class-attribute
instance-attribute
¶
remaining_memory_in_mi_b: int | None = ...
The amount of GPU memory, in MiB, that's available to allocate to new
containers that use the nvidiaMps sharing 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.
sharing_mode
class-attribute
instance-attribute
¶
sharing_mode: str | None = ...
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.
total_memory_in_mi_b
class-attribute
instance-attribute
¶
total_memory_in_mi_b: int | None = ...
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.