Google Compute Engine provides graphics processing units (GPUs) that you can attach to your virtual machine instances. You can use these GPUs to accelerate specific workloads on your instances such as machine learning and data processing.
To learn how to add GPUs to your instances, read Attaching GPUs to Instances.
Compute Engine provides NVIDIA® Tesla® K80 GPUs for your instances in passthrough mode so that your virtual machine instances have direct control over the GPUs and their associated memory. You can attach GPUs to any non-shared-core predefined machine type or custom machine type that you are able to create in a zone. However, instances with lower numbers of GPUs are limited to a maximum number of vCPUs. In general, higher numbers of GPUs allow you to create instances with higher numbers of vCPUs and system memory.
|GPU model||GPUs||GPU boards||GPU memory||Available vCPUs||Available memory||Available zones|
|NVIDIA® Tesla® K80||1 GPU||1/2 board||12 GB GDDR5||1 - 8 vCPUs||1 - 52 GB||
|2 GPUs||1 board||24 GB GDDR5||1 - 16 vCPUs||1 - 104 GB|
|4 GPUs||2 boards||48 GB GDDR5||1 - 32 vCPUs||1 - 208 GB|
|8 GPUs||4 boards||96 GB GDDR5||1 - 64 vCPUs||1 - 416 GB|
Instances with GPUs have specific restrictions that make them behave differently than other instance types.
- You must have GPU quota before you can create instances with GPUs. Check the quotas page to ensure that you have enough GPUs available in your project and request a quota increase. Free Trial accounts do not receive GPU quota by default.
- Instances with one or more GPUs have a maximum number of vCPUs for each GPU that you attach to the instance. For example, each NVIDIA® Tesla® K80 GPU allows you to have up to eight vCPUs in your instance machine type. To see the available vCPU ranges for different GPU configurations, see the GPUs list.
- You cannot attach GPUs to instances with shared-core machine types.
- You cannot attach GPUs to preemptible instances.
- GPU instances cannot live migrate for host maintenance events because the VM instance is directly attached to a specific hardware device. When you create GPU instances, you must set your instances to terminate for host maintenance events and optionally, set the instance to restart on a different host system after the VM instance terminates. Learn how to handle host maintenance events on instances with GPUs.
- GPUs require device drivers in order to function properly. You can use any driver that you like, but you must ensure that these drivers are installed and configured properly. For example, some drivers install kernel modules that you must reconfigure every time you update the kernel for your instance. You can avoid this issue by installing drivers using dynamic kernel module support system (DKMS). For instructions on how to install drivers for instances with GPUs, see installing GPU drivers.