Skip to main content
Set the gpu parameter on @app.queue, @app.api, or @app.task to choose the hardware a resource runs on. You can use a short name, a GPU pool, an exact device, or a list of these.
If you don’t set gpu or cpu, the resource can run on any GPU.

How GPU strings are matched

The SDK resolves a string in this order and raises an error listing the valid options if nothing matches:
  1. "any", which allows every GPU.
  2. A pool ID such as "ADA_24" (case-insensitive).
  3. An exact device name such as "NVIDIA B200", or its enum name such as "NVIDIA_B200".
  4. A fragment of a device name, such as "4090", "B200", or "h100". Every device whose name contains the fragment matches, so "H100" selects all three H100 variants.
Because strings are checked when the decorator runs, a typo fails when you import your module rather than at deploy time.
Serverless endpoints (queue and API resources) select hardware by pool. If you pass an exact device, the endpoint uses that device’s pool, so workers can run on any GPU in the same pool. Tasks run on Pods, which select by device.

GPU pools

Use runpod.GpuGroup to request any GPU in a pool.

GPU types

Use runpod.GpuType to request one exact device.

Choose a GPU

  • For development, use GpuGroup.ANY or a list of several pools so workers start quickly even when one GPU type is scarce.
  • For production, pin a specific pool or device so performance and cost are predictable.
  • For multiple GPUs per worker, combine gpu with gpu_count, for example gpu="H100", gpu_count=4.
  • For a minimum driver version, set min_cuda_version, for example min_cuda_version="12.8".
For pricing by GPU, see Serverless pricing.

Next steps

Last modified on October 15, 2026