| | |
| | | "analysis/util" |
| | | "context" |
| | | "plugin" |
| | | "strconv" |
| | | |
| | | "basic.com/valib/gogpu.git" |
| | | ) |
| | |
| | | return false |
| | | } |
| | | } |
| | | // 设置gpu index |
| | | rGPU := gpu |
| | | if v, ok := cfg.Param["gpu"]; ok { |
| | | if t, err := strconv.Atoi(v); err != nil { |
| | | rGPU = -1 |
| | | } else { |
| | | rGPU = t |
| | | } |
| | | } |
| | | // 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{}) { |
| | | |
| | | handle := sdk.fnCreate(config, typ, id, gpu, shm, util.ToRuleIPC, 30, logo.Infoln, nil) |
| | | handle := sdk.fnCreate(config, typ, id, rGPU, shm, util.ToRuleIPC, 30, logo.Infoln, nil) |
| | | if handle == nil { |
| | | logo.Errorln("Create SDK: ", typ, " ID: ", id, " Error") |
| | | return false |
| | |
| | | Subproject commit 8e69694b2716538a358cee52d39eac55f2c8ae64 |
| | | Subproject commit a91ae4e576ac1d11e7834d8161a7d5355cd139e9 |
| | |
| | | Subproject commit 7419cbb40e0e51d9daf2ea827d8c939a6f40d870 |
| | | Subproject commit bdf3ad71583fb4ef100d3819ecdae8fd9f70083e |
| | |
| | | "so_file_path": "./libs/reid/libreid.so", |
| | | "runtime":"./libs/reid", |
| | | "param": { |
| | | "gpu":0, |
| | | "gpu-memory":"1024", |
| | | "reid-model":"./data/reid/model.pt" |
| | | } |