GPUs
Run blocks on GPUs, and what to do when GPUs are in short supply.
For model training, deep learning and other GPU work, run a block on GPU compute (AWS SageMaker).
GPU settings
Instance type
The GPU instance to run on
Spot instances
Use spare capacity at a lower cost. Spot instances can be interrupted, so they suit work that can be restarted.
Keep-alive
Keep the instance running between block runs, so the next run starts faster
Maximum run time
The longest the block can run
Maximum wait time
The longest to wait for an instance to become available
Retry until GPU is available
How long to keep trying when no GPU is available. See below.
GPU instance types
G5
ml.g5.xlarge, ml.g5.2xlarge, ml.g5.4xlarge, ml.g5.8xlarge, ml.g5.12xlarge, ml.g5.16xlarge, ml.g5.24xlarge, ml.g5.48xlarge
G4dn
ml.g4dn.xlarge, ml.g4dn.2xlarge, ml.g4dn.4xlarge
P3
ml.p3.2xlarge
P2
ml.p2.xlarge
The compute settings show each instance's GPU model, CPU, memory and GPU memory.
When GPUs are in short supply
GPU capacity in the cloud isn't guaranteed. At busy times, the instance type you've chosen may not be available.
Retry until GPU is available controls what happens then:
Never (the default)
The run fails straight away if no GPU is available
15 minutes
Zerve keeps trying for up to 15 minutes
1 hour
Zerve keeps trying for up to an hour
12 hours
Zerve keeps trying for up to 12 hours
While retrying, Zerve waits a little longer between each attempt.
If a run fails because no GPU was available, you can turn on retries, choose a different instance type, or try again later.
Use a GPU environment
A GPU only helps if the block's environment includes GPU-enabled libraries. Use the Deep Learning (CUDA 12.6) preset, which includes PyTorch and TensorFlow for GPUs, or add GPU versions of your libraries to your own environment. See Environment presets.
Last updated
Was this helpful?
