MCPcopy Create free account
hub / github.com/F-Stack/f-stack / ml_model_start

Function ml_model_start

dpdk/app/test-mldev/test_model_common.c:85–110  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

83}
84
85int
86ml_model_start(struct ml_test *test, struct ml_options *opt, struct ml_model *model, uint16_t fid)
87{
88 struct test_common *t = ml_test_priv(test);
89 int ret;
90
91 RTE_SET_USED(t);
92
93 if (model->state == MODEL_STARTED)
94 return 0;
95
96 if (model->state != MODEL_LOADED)
97 return -EINVAL;
98
99 /* start model */
100 ret = rte_ml_model_start(opt->dev_id, model->id);
101 if (ret != 0) {
102 ml_err("Failed to start model : %s\n", opt->filelist[fid].model);
103 model->state = MODEL_ERROR;
104 return ret;
105 }
106
107 model->state = MODEL_STARTED;
108
109 return 0;
110}
111
112int
113ml_model_stop(struct ml_test *test, struct ml_options *opt, struct ml_model *model, uint16_t fid)

Callers 6

test_model_ops_subtest_aFunction · 0.85
test_model_ops_subtest_bFunction · 0.85
test_model_ops_subtest_cFunction · 0.85
test_model_ops_subtest_dFunction · 0.85

Calls 2

ml_test_privFunction · 0.85
rte_ml_model_startFunction · 0.85

Tested by

no test coverage detected