API Reference Manual  1.45.0
odp_ml_compl_param_t Struct Reference

ML completion parameters. More...

#include <ml_types.h>

Collaboration diagram for odp_ml_compl_param_t:
[legend]

Data Fields

odp_ml_compl_mode_t mode
 Completion mode. More...
 
odp_event_t event
 Completion event. More...
 
odp_queue_t queue
 Completion queue. More...
 
uint32_t compl_id
 Completion identifier. More...
 
void * user_ptr
 User defined context pointer. More...
 

Detailed Description

ML completion parameters.

Use odp_ml_compl_param_init() to initialize the structure to its default values.

Definition at line 720 of file api/spec/ml_types.h.

Field Documentation

◆ mode

odp_ml_compl_mode_t odp_ml_compl_param_t::mode

Completion mode.

The selected completion mode defines which other parameters are used. When ODP_ML_COMPL_MODE_EVENT mode is selected, 'event' and 'queue' must have valid values but value of 'compl_id' is ignored, or vice versa when ODP_ML_COMPL_MODE_POLL mode is selected.

Definition at line 729 of file api/spec/ml_types.h.

◆ event

odp_event_t odp_ml_compl_param_t::event

Completion event.

Event to be enqueued by ML offload to the completion queue when ML operation is complete. Event type must be ODP_EVENT_ML_COMPL. ML offload sets the subtype of the event to ODP_EVENT_ML_COMPL_LOAD or ODP_EVENT_ML_COMPL_RUN based on the completed operation.

Definition at line 739 of file api/spec/ml_types.h.

◆ queue

odp_queue_t odp_ml_compl_param_t::queue

Completion queue.

Destination queue for the completion event.

Definition at line 746 of file api/spec/ml_types.h.

◆ compl_id

uint32_t odp_ml_compl_param_t::compl_id

Completion identifier.

When completion mode is ODP_ML_COMPL_MODE_POLL, ML operation completion status is reported through this completion identifier. The value passed here is used in a following status call to check model load, unload, or inference completion (see e.g. odp_ml_model_load_status()).

Application selects a value between 0 and max_compl_id defined in model creation parameters (see odp_ml_model_param_t). Only single ML operation (per model) may be started with the same identifier value at a time. A value may be reused for the next ML operation only after the previous operation is complete.

Definition at line 761 of file api/spec/ml_types.h.

◆ user_ptr

void* odp_ml_compl_param_t::user_ptr

User defined context pointer.

ODP implementation does not refer to the pointer, but just copies it to the result. For example, application may use this pointer to link a received completion event to the originating model run request and its input / output data. The default value is NULL.

Definition at line 771 of file api/spec/ml_types.h.


The documentation for this struct was generated from the following file: