灵活配比 GPU/CPU 功能打破了传统云厂商“CPU/内存/GPU”强绑定的模式,允许用户在创建计算实例时,自定义 GPU 和 GPU 的资源组合。该功能主要面向资源管理员以及需要模型训练、推理等高性能计算任务的开发者,解决不同计算阶段对资源需求不一导致的成本浪费问题,帮助你最大化资源利用率。
说明
此功能为开白功能,且开白后不支持回滚(取消开白),请按需申请使用。
管理员可以为在资源组中为团队开发以及算法工程师配置资源规格模板 (CPU/GPU/内存) 。
说明
管理员权限请授权 MLPlatformAdminAccess,详细请参见权限管理。
控制台资源组 > 预付费实例规格 > 负载规格配置。
该功能需要额外开白使用,如需使用,请提交工单申请。
开发机/自定义任务/在线服务均支持GPU/CPU灵活配比功能。
- 开发机路径:【开发机】-【创建开发机】-【环境配置-计算资源】
- 自定义任务路径:【自定义任务】-【创建自定义任务】-【资源配置-实例配置】
- 在线服务路径:【在线服务】-【创建服务】-【资源配置-计算资源】
以下说明为自定义任务中操作步骤:

自定义任务yaml定义中对指定资源的结构体做了扩展。
非灵活配比方式提交自定义任务,格式不做变更。
# self define e.g text_classfication TaskName: "非灵活配比方式提交的任务" # description for this task Description: "" # entry point command Entrypoint: "sleep infinity" Tags: [] # the code path you want to upload locally UserCodePath: "" # remote path mount in training container RemoteMountCodePath: "" # user define env var Envs: [] # queue created under Resource Group, empty as default queue ResourceQueueID: "q-xxxxxxxxxx" # distributed framework, support: TensorFlow PS,PyTorch DDP,Horovod,BytePS Framework: "Custom" TaskRoleSpecs: - RoleName: "worker" RoleReplicas: 1 Flavor: "ml.c2i.large" ActiveDeadlineSeconds: 864000 # enable tensor board or not EnableTensorBoard: false # storages Storages: [] ImageUrl: "vemlp-cn-beijing.cr.volces.com/preset-images/python:3.10" CacheType: "Cloudfs" # user define retry options RetryOptions: EnableRetry: true MaxRetryTimes: 5 IntervalSeconds: 120 PolicySets: - "Failed"
开启灵活配比方式提交自定义任务后,指定资源格式作了对应扩展。
# self define e.g text_classfication TaskName: "灵活配比方式提交的gpu/cpu任务" # description for this task Description: "" # entry point command Entrypoint: "sleep inf" Tags: [] # the code path you want to upload locally UserCodePath: "" # remote path mount in training container RemoteMountCodePath: "" # user define env var Envs: [] # queue created under Resource Group, empty as default queue ResourceQueueID: "q-xxxxxxxxxx" # distributed framework, support: TensorFlow PS,PyTorch DDP,Horovod,BytePS Framework: "TensorFlowPS" TaskRoleSpecs: - RoleName: "worker" RoleReplicas: 1 # 当使用灵活配比方式提交的GPU任务时,填写以下参数。提交CPU任务时请注释掉 Flavor: "custom" ResourceSpec: Family: "ml.hpcpni2l" CPU: 105.000 Memory: 1875.000 GPUNum: 8 # 当使用灵活配比方式提交的CPU任务时,填写以下参数。提交GPU任务时请注释掉 Flavor: "custom" ResourceSpec: CPU: 2.000 Memory: 8.000 ActiveDeadlineSeconds: 864000 # enable tensor board or not EnableTensorBoard: false # storages Storages: [] ImageUrl: "vemlp-cn-beijing.cr.volces.com/preset-images/python:3.10" CacheType: "Cloudfs" # user define retry options RetryOptions: EnableRetry: false MaxRetryTimes: 5 IntervalSeconds: 120 PolicySets: []
submit 子命令
export 子命令