API Reference Manual 1.51.0
Loading...
Searching...
No Matches
ml.h File Reference

ODP Machine Learning (ML) offload. More...

#include <odp/visibility_begin.h>
#include <odp/api/event_types.h>
#include <odp/api/ml_types.h>
#include <odp/api/pool_types.h>
#include <odp/api/std_types.h>
#include <odp/visibility_end.h>
Include dependency graph for spec/ml.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

int odp_ml_num_engines (void)
 Query number of ML engines.
 
int odp_ml_capability (odp_ml_capability_t *capa)
 Query ML capabilities.
 
int odp_ml_engine_capability (uint32_t engine_id, odp_ml_capability_t *capa)
 Query ML capabilities of a specific engine.
 
void odp_ml_config_init (odp_ml_config_t *config)
 Initialize ML configuration parameters.
 
int odp_ml_config (const odp_ml_config_t *config)
 Configure ML offload.
 
void odp_ml_model_param_init (odp_ml_model_param_t *param)
 Initialize ML model parameters.
 
odp_ml_model_t odp_ml_model_create (const char *name, const odp_ml_model_param_t *param)
 Create an ML model.
 
int odp_ml_model_destroy (odp_ml_model_t model)
 Destroy an ML model.
 
odp_ml_model_t odp_ml_model_lookup (const char *name)
 Find a model by name.
 
int odp_ml_model_load (odp_ml_model_t model, odp_ml_load_result_t *result)
 Load ML model.
 
int odp_ml_model_load_start (odp_ml_model_t model, const odp_ml_compl_param_t *compl_param)
 Start asynchronous model load.
 
int odp_ml_model_load_status (odp_ml_model_t model, uint32_t compl_id, odp_ml_load_result_t *result)
 Check model load completion.
 
int odp_ml_model_unload (odp_ml_model_t model, odp_ml_load_result_t *result)
 Unload ML model.
 
int odp_ml_model_unload_start (odp_ml_model_t model, const odp_ml_compl_param_t *compl_param)
 Start asynchronous model unload.
 
int odp_ml_model_unload_status (odp_ml_model_t model, uint32_t compl_id, odp_ml_load_result_t *result)
 Check model unload completion.
 
void odp_ml_run_param_init (odp_ml_run_param_t *param)
 Initialize model run parameters.
 
int odp_ml_run (odp_ml_model_t model, const odp_ml_data_t *data, const odp_ml_run_param_t *param)
 Run the model in synchronous mode.
 
int odp_ml_run_multi (odp_ml_model_t model, const odp_ml_data_t data[], const odp_ml_run_param_t param[], int num)
 Run the model multiple times in synchronous mode.
 
int odp_ml_run_start (odp_ml_model_t model, const odp_ml_data_t *data, const odp_ml_compl_param_t *compl_param, const odp_ml_run_param_t *run_param)
 Start model run in asynchronous mode.
 
int odp_ml_run_start_multi (odp_ml_model_t model, const odp_ml_data_t data[], const odp_ml_compl_param_t compl_param[], const odp_ml_run_param_t run_param[], int num)
 Start multiple model runs in asynchronous mode.
 
int odp_ml_run_status (odp_ml_model_t model, uint32_t compl_id, odp_ml_run_result_t *result)
 Check model run completion.
 
void odp_ml_compl_pool_param_init (odp_ml_compl_pool_param_t *param)
 Initialize ML completion event pool parameters.
 
odp_pool_t odp_ml_compl_pool_create (const char *name, const odp_ml_compl_pool_param_t *param)
 Create ML completion event pool.
 
odp_ml_compl_t odp_ml_compl_alloc (odp_pool_t pool)
 Allocate ML completion event.
 
void odp_ml_compl_free (odp_ml_compl_t ml_compl)
 Free ML completion event.
 
int odp_ml_compl_run_result (odp_ml_compl_t ml_compl, odp_ml_run_result_t *result)
 Check ML model run results from completion event.
 
int odp_ml_compl_load_result (odp_ml_compl_t ml_compl, odp_ml_load_result_t *result)
 Check ML model load / unload results from completion event.
 
void * odp_ml_compl_user_area (odp_ml_compl_t ml_compl)
 ML completion event user area.
 
odp_ml_compl_t odp_ml_compl_from_event (odp_event_t event)
 Convert event to ML completion event.
 
odp_event_t odp_ml_compl_to_event (odp_ml_compl_t ml_compl)
 Convert ML completion event to event.
 
uint64_t odp_ml_compl_to_u64 (odp_ml_compl_t ml_compl)
 Convert ML completion event handle to a uint64_t value for debugging.
 
void odp_ml_compl_param_init (odp_ml_compl_param_t *param)
 Initialize ML completion parameters.
 
int odp_ml_model_info (odp_ml_model_t model, odp_ml_model_info_t *info)
 Retrieve model information.
 
uint32_t odp_ml_model_input_info (odp_ml_model_t model, odp_ml_input_info_t info[], uint32_t num)
 Retrieve model input information.
 
uint32_t odp_ml_model_output_info (odp_ml_model_t model, odp_ml_output_info_t info[], uint32_t num)
 Retrieve model output information.
 
uint64_t odp_ml_model_to_u64 (odp_ml_model_t model)
 Convert ML model handle to a uint64_t value for debugging.
 
void odp_ml_model_print (odp_ml_model_t model)
 Print debug information about the model.
 
void odp_ml_print (void)
 Print ML debug information.
 
int odp_ml_model_extra_stat_info (odp_ml_model_t model, odp_ml_extra_stat_info_t info[], int num)
 Extra statistics counter information.
 
int odp_ml_model_extra_stats (odp_ml_model_t model, uint64_t stats[], int num)
 Read extra statistics counter values.
 

Detailed Description

ODP Machine Learning (ML) offload.

Definition in file spec/ml.h.