zhangmeng
2019-12-23 1dee4eae03db6c6ab028b2a37af07a9c6f0bb226
update;
2个文件已修改
18 ■■■■■ 已修改文件
app/slave/slave.go 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
main.go 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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{}) {
main.go
@@ -14,8 +14,6 @@
    "flag"
    "os"
    "basic.com/valib/gogpu.git"
    // "net/http"
    // _ "net/http/pprof"
)
@@ -89,12 +87,6 @@
}
func main() {
    indices := gogpu.RankGPU()
    if len(indices) == 0 {
        logo.Errorln("there is no gpu for valid")
        return
    }
    util.InitConfig()