Reputation: 59
I have created an instance with only CPUs for Deep learning (cs231n) with Google Compute Engine.
I have upgraded my account and my GPU quota is 1 now.
However, following the documentation to add GPU to an existing instance did not work.
The documentation recommends editing the VM, however, after stopping the VM, there is no button/option to edit the VM instance.
I have seen answers on StackOverflow recommending the same as the documentation, it feels like the documentation is not aligned the interface.
I was wondering if anyone has been able to edit the VM and add GPUs to an existing VM instance?
Upvotes: 3
Views: 4952
Reputation: 1391
My GPU Quota is 1 and I have an instance(1) with GPU already. When I wanted another instance(2) with GPU, I removed the GPU from instance 1 and tried to add to instance 2. But the add GPU button was grayed out and I was not allowed to add a GPU to it. But when I tried to add it to another instance it was possible. I tried creating a "Create SImilar " option which is a new feature to GCP, it still did not allow me to add a GPU. Even created a snapshot and tried to create a new instance but failed.
Upvotes: 1
Reputation: 522
You can add or remove GPUs from your instance by stopping the instance and editing your instance's configuration.
Verify that all of your critical applications are stopped on the instance. You must stop the instance before you can add a GPU.
Go to the VM instances page to see your list of instances.
GO TO THE VM INSTANCES PAGE
On the list of instances, click the name of the instance where you want to add GPUs. The instance details page opens.
At the top of the instance details page, click Stop to stop the instance.
After the instance stops running, click Edit to change the instance properties.
If the instance has a shared-core machine type, you must change the machine type to have one or more vCPUs. You cannot add accelerators to instances with shared-core machine types.
In the Machine type section, click Customize to see advanced machine type options and available GPUs.
Click GPUs to see the list of available GPUs.
Select the number of GPUs and the GPU model that you want to add to your instance. Alternatively, you can set the number of GPUs to None to remove existing GPUs from the instance.
If you added GPUs to an instance, set the host maintenance setting to Terminate. If you removed GPUs from the instance, you can optionally set the host maintenance setting back to Migrate VM instance.
At the bottom of the instance details page, click Save to apply your changes.
After the instance settings are saved, click Start at the top of the instance details page to start the instance again.
Upvotes: 0
Reputation: 11377
The current documentation is a bit out of date. There's no "Edit" button, user should simply click on a VM Instance name and then select "customize" as on this picture: .
Upvotes: 3