From 0b614d10b9985f089c304e4c6dcff134e3d486f2 Mon Sep 17 00:00:00 2001 From: zouap Date: Mon, 14 Nov 2022 15:26:48 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A8=A1=E5=9E=8B=E7=AE=A1=E7=90=86=E4=B8=AD?= =?UTF-8?q?=EF=BC=8CNPU=E7=9A=84=E8=A7=84=E6=A0=BC=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E9=97=AE=E9=A2=98=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- routers/repo/ai_model_manage.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/routers/repo/ai_model_manage.go b/routers/repo/ai_model_manage.go index 4cad38cc8..b66b50d37 100644 --- a/routers/repo/ai_model_manage.go +++ b/routers/repo/ai_model_manage.go @@ -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 {