| | |
| | | "flag" |
| | | |
| | | "os" |
| | | |
| | | "basic.com/valib/gogpu.git" |
| | | // "net/http" |
| | | // _ "net/http/pprof" |
| | | ) |
| | |
| | | ) |
| | | |
| | | func init() { |
| | | flag.StringVar(&role, "role", roleMaster, "run process role master/slave, default single") |
| | | flag.StringVar(&runType, "sdk", util.FeatAll, "run sdk type, face/facedetect/facecompare/yolo,etc.") |
| | | flag.StringVar(&role, "role", roleMaster, "run process role master/slave, default master") |
| | | flag.StringVar(&runType, "sdk", util.FeatAll, "run sdk type, facedetect/yolo,etc.") |
| | | flag.StringVar(&id, "id", util.FakeSdkID, "sdk id as ipc label") |
| | | |
| | | flag.StringVar(&configPath, util.ConfigPath, "", "sdk config file path") |
| | |
| | | |
| | | func main() { |
| | | |
| | | indices := gogpu.RankGPU() |
| | | if len(indices) == 0 { |
| | | logo.Errorln("there is no gpu for valid") |
| | | return |
| | | } |
| | | |
| | | util.InitConfig() |
| | | |
| | | flag.Parse() |
| | |
| | | ret := false |
| | | if role == roleMaster { |
| | | setParamters() |
| | | ret = master.Run(ctx, configPath, "./libcomm.so") |
| | | ret = master.Run(ctx, "./libcomm.so", configPath) |
| | | |
| | | } else if role == roleSlave { |
| | | ret = slave.Run(ctx, configPath, runType, id, gpu, shm) |
| | | } else if role == "test" { |
| | | ret = slave.TwoPluginConflict("./libcomm.so", "./zconf/Yolo.json") |
| | | } |
| | | |
| | | if ret { |