| | |
| | | "analysis/util" |
| | | "context" |
| | | "plugin" |
| | | |
| | | "basic.com/valib/gogpu.git" |
| | | ) |
| | | |
| | | // TwoPluginConflict test |
| | |
| | | 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{}) { |
| | | |
| | |
| | | "flag" |
| | | |
| | | "os" |
| | | |
| | | "basic.com/valib/gogpu.git" |
| | | // "net/http" |
| | | // _ "net/http/pprof" |
| | | ) |
| | |
| | | } |
| | | |
| | | func main() { |
| | | |
| | | indices := gogpu.RankGPU() |
| | | if len(indices) == 0 { |
| | | logo.Errorln("there is no gpu for valid") |
| | | return |
| | | } |
| | | |
| | | util.InitConfig() |
| | | |