Browse Source

模型管理中,NPU的规格显示问题。

Signed-off-by: zouap <zouap@pcl.ac.cn>
tags/v1.22.11.2^2
zouap 3 years ago
parent
commit
0b614d10b9
1 changed files with 5 additions and 1 deletions
  1. +5
    -1
      routers/repo/ai_model_manage.go

+ 5
- 1
routers/repo/ai_model_manage.go View File

@@ -78,7 +78,11 @@ func saveModelByParameters(jobId string, versionName string, name string, versio
cloudType = models.TypeCloudBrainTwo
spec, err := resource.GetCloudbrainSpec(aiTask.ID)
if err == nil {
flaverName := "NPU: " + fmt.Sprint(spec.AccCardsNum) + "*" + spec.AccCardType + ",CPU: " + fmt.Sprint(spec.CpuCores) + "," + ctx.Tr("cloudbrain.gpu_memory") + ": " + fmt.Sprint(spec.GPUMemGiB) + "GB," + ctx.Tr("cloudbrain.memory") + ": " + fmt.Sprint(spec.MemGiB) + "GB"
flaverName := "NPU: " + fmt.Sprint(spec.AccCardsNum) + "*" + spec.AccCardType + ",CPU: " + fmt.Sprint(spec.CpuCores) + ","
if spec.GPUMemGiB > 0 {
flaverName += ctx.Tr("cloudbrain.gpu_memory") + ": " + fmt.Sprint(spec.GPUMemGiB) + "GB,"
}
flaverName += ctx.Tr("cloudbrain.memory") + ": " + fmt.Sprint(spec.MemGiB) + "GB"
aiTask.FlavorName = flaverName
}
} else if aiTask.ComputeResource == models.GPUResource {


Loading…
Cancel
Save