From b8b829327cbbb77db13120098dd3d6be7591bfac Mon Sep 17 00:00:00 2001 From: ychao_1983 Date: Mon, 23 May 2022 09:52:09 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- routers/repo/cloudbrain.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/routers/repo/cloudbrain.go b/routers/repo/cloudbrain.go index 12d254812..68264708c 100755 --- a/routers/repo/cloudbrain.go +++ b/routers/repo/cloudbrain.go @@ -482,6 +482,17 @@ func cloudBrainShow(ctx *context.Context, tpName base.TplName, jobType models.Jo ctx.Data["resource_type"] = resourceType.Value } } + } else if cloudbrain.IsBenchmarkJob(task.JobType) { + if benchmarkGpuInfos == nil { + json.Unmarshal([]byte(setting.BenchmarkGpuTypes), &benchmarkGpuInfos) + } + + for _, resourceType := range benchmarkGpuInfos.GpuInfo { + if resourceType.Queue == jobRes.Config.GpuType { + ctx.Data["resource_type"] = resourceType.Value + } + } + } else { if gpuInfos == nil { json.Unmarshal([]byte(setting.GpuTypes), &gpuInfos)