Browse Source

Merge pull request 'fix-2100' (#2156) from fix-2054 into V20220601

Reviewed-on: https://git.openi.org.cn/OpenI/aiforge/pulls/2156
Reviewed-by: lewis <747342561@qq.com>
pull/2168/head
lewis 3 years ago
parent
commit
c9e1c6113f
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
}
}
} 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)


Loading…
Cancel
Save