Associate Cloud Engineer ยท Cloud Run operations and accelerators
GPUs and TPUs
When to use GPUs vs TPUs, attaching GPUs to VMs, GKE node pools and Cloud Run, quotas and driver considerations.
Key points
- GPUs are general-purpose accelerators for ML, rendering and compute, attachable to Compute Engine VMs (N1 with T4/P4/V100, or A/G machine types with GPUs built in), GKE node pools and Cloud Run (L4, one GPU per instance, instance-based billing).
- TPUs are Google-designed accelerators specialised for tensor-heavy ML.
- Always check quota, zone availability and driver installation.
Source: https://docs.cloud.google.com/run/docs/configuring/services/gpu
Practice questions
How many GPUs can a single Cloud Run instance have attached?
- One
- Two
- Four
- Eight
Show answer
Answer: A. One
Each Cloud Run instance supports exactly one GPU; the --gpu flag accepts only 1.
Which are true requirements or limits for Cloud Run services with GPUs?
- Instance-based billing is required
- Max instances must stay below the project's GPU quota in the region
- You can request up to 4 GPUs per instance
- GPUs are available in every Cloud Run region
- Request-based billing is required
Show answer
Answer: A. Instance-based billing is required, B. Max instances must stay below the project's GPU quota in the region
GPUs need instance-based billing, and max instances must stay below the regional GPU quota. Only one GPU per instance is allowed and GPUs are offered in selected regions only.
True or false: a single Cloud Run instance can attach up to four GPUs, like a large GPU VM.
Show answer
Answer: False
False. Cloud Run supports one GPU per instance; scale out with more instances instead.
Practice 8 questions on this topic in Bitzu
Short lessons, instant explanations and spaced review of what you get wrong. Free on iOS and Android.
