zhangmeng
2019-12-23 1dee4eae03db6c6ab028b2a37af07a9c6f0bb226
app/slave/slave.go
@@ -6,6 +6,8 @@
   "analysis/util"
   "context"
   "plugin"
   "basic.com/valib/gogpu.git"
)
// TwoPluginConflict test
@@ -39,6 +41,14 @@
      return false
   }
   // 配置文件设置了gpu memory且值至少两位数,判断是否有gpu可用
   if v, ok := cfg.Param["gpu-memory"]; ok && len(v) > 1 {
      indices := gogpu.RankGPU()
      if len(indices) == 0 {
         logo.Errorln("!!!!!!THERE IS NO VALID GPU")
         return false
      }
   }
   // func Create(config string, typ, id string, gpu int, shm bool, ipc2Rule string, ruleMaxSize int, fn func(...interface{}), reserved map[string]string) interface{}
   // func Run(ctx context.Context, i interface{}) {