GPU slicing
Elastic Algorithm Service (EAS) provides GPU slicing for more cost-effective and efficient use of compute resources when you deploy model services. This feature partitions the compute power and GPU memory of a single physical GPU card to be shared among multiple service instances. This improves GPU utilization and reduces deployment costs.
Prerequisites
You can configure GPU slicing only if you meet the following prerequisites:
Resource Type: Use an EAS resource group or a Lingjun resource quota.
Instance Status: GPU instances in the resource group must be in the running state and not in other states like Starting or Stopped.
NoteWhen you purchase a GPU instance for the first time, initialization typically takes 8 to 10 minutes. Wait for the instance to initialize before proceeding.
Configuration
You can configure GPU slicing when you create or update a service.
Console
Log on to the PAI console. Select a region on the top of the page. Then, select the desired workspace and click Enter Elastic Algorithm Service (EAS).
Create a new service or update an existing one to open the service configuration page.
In the Resource Information section, configure the following key parameters. For details on other parameters, see custom deployment.
Parameter
Description
Resource Type
Select EAS Resource Group or Resource Quota.
GPU Slicing
Select this checkbox to enable GPU slicing.
NoteIf this option is not available, see Why is the GPU slicing option missing?.
Deployment Resources
Enter the GPU Ratio per Card. Valid values: 0.01 to 0.99. For example, 0.25 means 25% of a single GPU card.
After you configure the parameters, click Deploy or Update.
Local client
The following example shows the GPU slicing fields in a JSON configuration file:
{ "metadata": { "gpu_core_percentage": 5 } }gpu_core_percentage: Corresponds to the Computing Power per GPU (%) parameter in the PAI console.
ImportantIf you use GPU memory-based scheduling, do not configure the gpu field or set it to 0. If the gpu field is set to 1, the instance exclusively uses the entire GPU card. In this case, the gpu_core_percentage field is ignored.
See Command reference and use the
createormodifycommand to create or update the service.
FAQ
Q: Why is the GPU slicing option missing?
Perform the following steps to troubleshoot the issue:
Ensure that the Resource Type is set to EAS resource group or Lingjun resource quota.
Verify that the selected resource group contains GPU resources (i.e., the value in the GPU column is not 0).
Verify that the GPU instance status is "running" and not in other states such as "Starting" or "Stopped". If the resource is being initialized, you must wait for the initialization to complete.