Search code examples
restgoogle-cloud-platformcall

gcp rest call to get machine types supported for different gpu types


I am trying to use this rest call to get machine types and accelerators supported for it :https://compute.googleapis.com/compute/v1/projects/{}/zones/{}/machineTypes. While i get the accelerators information for a2 and g2, the info is not available for n1 machine type...

I tried the accelerator types call and machine types rest call..Is there any other gcp rest call which can list supported machine types for any gpu type?


Solution

  • There is no API or CLI command to list GPUs at this time.

    Note: only the N1, A2, and G2 VMs support GPUs. That should simplify your search for GPU machine types that support GPU attachments.

    I use this documentation to look up GPU details.

    This link details the GPUs supported for the N1 family.

    Most regions support a limited selection of GPUs. Consult this link for more details.

    At this time, it takes research to know if a machine type supports a GPU type in the desired region/zone. For example, the zone us-west1-c does not support any GPUs.