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

Function ml_model_unload

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

Source from the content-addressed store, hash-verified

56}
57
58int
59ml_model_unload(struct ml_test *test, struct ml_options *opt, struct ml_model *model, uint16_t fid)
60{
61 struct test_common *t = ml_test_priv(test);
62 int ret;
63
64 RTE_SET_USED(t);
65
66 if (model->state == MODEL_INITIAL)
67 return 0;
68
69 if (model->state != MODEL_LOADED)
70 return -EINVAL;
71
72 /* unload model */
73 ret = rte_ml_model_unload(opt->dev_id, model->id);
74 if (ret != 0) {
75 ml_err("Failed to unload model: %s\n", opt->filelist[fid].model);
76 model->state = MODEL_ERROR;
77 return ret;
78 }
79
80 model->state = MODEL_INITIAL;
81
82 return 0;
83}
84
85int
86ml_model_start(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_unloadFunction · 0.85

Tested by

no test coverage detected