square-agency-59624
10/09/2025, 11:06 AMancient-wolf-19325
10/09/2025, 11:06 AM@task decorator with the requests=Resources(gpu="1") argument for generic GPU access, or add the accelerator argument (e.g., accelerator=V100) to target a specific GPU type. For example:
from flytekit import Resources, task
from flytekit.extras.accelerators import V100
@task(requests=Resources(gpu="1"), accelerator=V100)
def my_task():
...
You must also ensure your Kubernetes node pool is labeled and tainted to match the GPU type, and configure the FlytePropeller Helm values (gpu-device-node-label, etc.) to match your node labels. See the linked documentation for details on both Flyte task code and cluster configuration steps. According to the official docs, Flyte injects the necessary node selectors and tolerations to schedule the pod on the correct GPU node type, provided your cluster is set up accordingly. For partitioned GPUs (like A100 MIG), use the appropriate accelerator constant (e.g., A100.partition_2g_10gb) in the decorator.
For full details and YAML configuration examples, see Configuring access to GPUs and Flyte 1.10.6 Release. Would you like a step-by-step breakdown of the cluster and Flyte configuration process?
Sources:
- Configuring access to GPUs
- Flyte 1.10.6 Release 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.