Skip to content

GpuDevice

Source code in docs_src/capo_ecs/types/gpu_device.py
class GpuDevice(TypedDict, closed=True):
    gpu_id: NotRequired["capo_ecs.types.string.String"]
    """<p>The ID of the GPU. This ID matches the GPU IDs in the <code>gpuIds</code> of the containers that Amazon ECS assigned to the GPU.</p>"""
    sharing_mode: NotRequired["capo_ecs.types.gpu_sharing_mode.GpuSharingMode"]
    """<p>How the GPU is shared between containers.</p> <p>Valid values:</p> <ul> <li> <p> <code>IDLE</code> - No containers are assigned to the GPU, and all of its memory is available.</p> </li> <li> <p> <code>NVIDIA_MPS</code> - One or more containers share the GPU by using NVIDIA Multi-Process Service (MPS).</p> </li> <li> <p> <code>DEDICATED</code> - One container has exclusive use of the GPU.</p> </li> </ul>"""
    total_memory_in_mi_b: NotRequired["capo_ecs.types.boxed_integer.BoxedInteger"]
    """<p>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.</p>"""
    remaining_memory_in_mi_b: NotRequired["capo_ecs.types.boxed_integer.BoxedInteger"]
    """<p>The amount of GPU memory, in MiB, that's available to allocate to new containers that use the <code>nvidiaMps</code> 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.</p>"""
    container_count: NotRequired["capo_ecs.types.boxed_integer.BoxedInteger"]
    """<p>The number of containers that Amazon ECS assigned to the GPU. This value is <code>0</code> when the sharing mode is <code>IDLE</code> and <code>1</code> when the sharing mode is <code>DEDICATED</code>. Amazon ECS counts the containers that it assigned to the GPU, not the processes that are running on it.</p>"""

container_count instance-attribute

container_count: NotRequired[BoxedInteger]

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 instance-attribute

gpu_id: NotRequired[String]

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 instance-attribute

remaining_memory_in_mi_b: NotRequired[BoxedInteger]

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 instance-attribute

sharing_mode: NotRequired[GpuSharingMode]

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 instance-attribute

total_memory_in_mi_b: NotRequired[BoxedInteger]

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.