Browse Source

提交代码

tags/v1.22.5.2^2
ychao_1983 3 years ago
parent
commit
b8b829327c
1 changed files with 11 additions and 0 deletions
  1. +11
    -0
      routers/repo/cloudbrain.go

+ 11
- 0
routers/repo/cloudbrain.go View File

@@ -482,6 +482,17 @@ func cloudBrainShow(ctx *context.Context, tpName base.TplName, jobType models.Jo
ctx.Data["resource_type"] = resourceType.Value 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 { } else {
if gpuInfos == nil { if gpuInfos == nil {
json.Unmarshal([]byte(setting.GpuTypes), &gpuInfos) json.Unmarshal([]byte(setting.GpuTypes), &gpuInfos)


Loading…
Cancel
Save