- Newest
- Most votes
- Most comments
The issue you're experiencing with the G6f instance is related to how the ECS agent handles fractional GPUs. The G6f.2xlarge with 0.25 NVIDIA L4 GPU is part of AWS's new fractional GPU instances, which are the first GPU instances provisioned with GPU partitioning powered by NVIDIA L4 Tensor Core GPUs.
While the ECS agent is correctly detecting the GPU UUID (as shown in your logs), it's not properly recognizing the fractional GPU as an allocatable resource, which is why the integerValue is showing as 0 instead of 1. This is likely because the current ECS agent implementation was designed with whole GPUs in mind rather than fractional GPUs.
Here are some potential workarounds:
-
Modify the GPU information file: The ECS agent reads GPU information from
/var/lib/ecs/gpu/nvidia_gpu_info.json. You could try creating or modifying this file to explicitly set the GPU count. -
Use platform devices in your task definition: Instead of relying on the automatic GPU detection, you can explicitly specify the GPU UUID in your task definition using the
platformDevicesparameter, which allows you to reference the specific GPU by its ID. -
Try a newer ECS agent version: AWS periodically updates the ECS agent to support new instance types and features. Check if there's a newer version available that might have better support for fractional GPUs.
-
Contact AWS Support: Since G6f instances with fractional GPUs are relatively new, you might need to reach out to AWS Support for specific guidance on how to properly configure the ECS agent for these instances.
For your current setup, I would recommend trying to explicitly specify the GPU in your task definition using the platformDevices parameter rather than relying on the resourceRequirements approach, as this might bypass the issue with the integer count.
Also, ensure that you're using the latest NVIDIA GRID driver (18.4 or newer) as you've already done, which is required for the G6f instances with fractional GPUs.
Sources
Announcing general availability of Amazon EC2 G6f instances with fractional GPUs - AWS
PlatformDevice - Amazon Elastic Container Service
Specifying GPUs in an Amazon ECS task definition - Amazon Elastic Container Service
answered 10 months ago
Relevant content
asked 2 years ago
- AWS OFFICIALUpdated 5 months ago
