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

Function ml_model_stop

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

Source from the content-addressed store, hash-verified

110}
111
112int
113ml_model_stop(struct ml_test *test, struct ml_options *opt, struct ml_model *model, uint16_t fid)
114{
115 struct test_common *t = ml_test_priv(test);
116 int ret;
117
118 RTE_SET_USED(t);
119
120 if (model->state == MODEL_LOADED)
121 return 0;
122
123 if (model->state != MODEL_STARTED)
124 return -EINVAL;
125
126 /* stop model */
127 ret = rte_ml_model_stop(opt->dev_id, model->id);
128 if (ret != 0) {
129 ml_err("Failed to stop model: %s\n", opt->filelist[fid].model);
130 model->state = MODEL_ERROR;
131 return ret;
132 }
133
134 model->state = MODEL_LOADED;
135
136 return 0;
137}

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_stopFunction · 0.85

Tested by

no test coverage detected