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

Function rte_ml_dev_info_get

dpdk/lib/mldev/rte_mldev.c:229–250  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

227}
228
229int
230rte_ml_dev_info_get(int16_t dev_id, struct rte_ml_dev_info *dev_info)
231{
232 struct rte_ml_dev *dev;
233
234 if (!rte_ml_dev_is_valid_dev(dev_id)) {
235 RTE_MLDEV_LOG(ERR, "Invalid dev_id = %d", dev_id);
236 return -EINVAL;
237 }
238
239 dev = rte_ml_dev_pmd_get_dev(dev_id);
240 if (*dev->dev_ops->dev_info_get == NULL)
241 return -ENOTSUP;
242
243 if (dev_info == NULL) {
244 RTE_MLDEV_LOG(ERR, "Dev %d, dev_info cannot be NULL", dev_id);
245 return -EINVAL;
246 }
247 memset(dev_info, 0, sizeof(struct rte_ml_dev_info));
248
249 return (*dev->dev_ops->dev_info_get)(dev, dev_info);
250}
251
252int
253rte_ml_dev_configure(int16_t dev_id, const struct rte_ml_dev_config *config)

Callers 8

rte_ml_dev_configureFunction · 0.85
test_model_ops_setupFunction · 0.85
ml_test_cap_checkFunction · 0.85
ml_test_device_configureFunction · 0.85
test_inference_cap_checkFunction · 0.85
test_inference_setupFunction · 0.85
ml_options_dumpFunction · 0.85
test_device_setupFunction · 0.85

Calls 3

rte_ml_dev_is_valid_devFunction · 0.85
rte_ml_dev_pmd_get_devFunction · 0.85
memsetFunction · 0.85

Tested by 6

test_model_ops_setupFunction · 0.68
ml_test_cap_checkFunction · 0.68
ml_test_device_configureFunction · 0.68
test_inference_cap_checkFunction · 0.68
test_inference_setupFunction · 0.68
test_device_setupFunction · 0.68