GPU slicing

Updated at:

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.

    Note

    When 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

  1. 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).

  2. Create a new service or update an existing one to open the service configuration page.

  3. 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.

    Note

    If 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.

  4. After you configure the parameters, click Deploy or Update.

Local client

  1. 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.

    Important

    If 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.

  2. See Command reference and use the create or modify command to create or update the service.

FAQ

Q: Why is the GPU slicing option missing?

Perform the following steps to troubleshoot the issue:

  1. Ensure that the Resource Type is set to EAS resource group or Lingjun resource quota.

  2. Verify that the selected resource group contains GPU resources (i.e., the value in the GPU column is not 0).

  3. 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.