Tizen HAL API  1.0
Machine Learning

The Machine Learning provides functions for ml.

Required Header

#include <hal-ml.h>

Overview

Tizen ML API may require a hardware device to accelerate its job. This HAL ML provides an interface for Tizen ML API (NNStreamer's tensor_filter subplugin) to use such hardware acceleration devices (NPU, ...) if available.

Typedefs

typedef struct
_hal_backend_ml_funcs 
hal_backend_ml_funcs
 The HAL backend structure for ML. This should be implemented by each HAL backend.
typedef enum hal_ml_error hal_ml_error_e
 Enumeration for the error codes of hal-ml.

Data Structure Documentation

struct _hal_backend_ml_funcs

The HAL backend structure for ML. This should be implemented by each HAL backend.

Since:
HAL_MODULE_ML 1.0

Data Fields

int(* init )(void **backend_private)
int(* deinit )(void *backend_private)
int(* configure_instance )(void *backend_private, const void *prop)
int(* invoke )(void *backend_private, const void *input, void *output)
int(* invoke_dynamic )(void *backend_private, void *prop, const void *input, void *output)
int(* get_framework_info )(void *backend_private, void *framework_info)
int(* get_model_info )(void *backend_private, int ops, void *in_info, void *out_info)

Field Documentation

int(* _hal_backend_ml_funcs::configure_instance)(void *backend_private, const void *prop)

Invoke

int(* _hal_backend_ml_funcs::deinit)(void *backend_private)

Configure ml framework

int(* _hal_backend_ml_funcs::get_framework_info)(void *backend_private, void *framework_info)

Get model info

int(* _hal_backend_ml_funcs::get_model_info)(void *backend_private, int ops, void *in_info, void *out_info)

Handle event

int(* _hal_backend_ml_funcs::init)(void **backend_private)

< Initialize HL backend handle Deinitialize HL backend handle

int(* _hal_backend_ml_funcs::invoke)(void *backend_private, const void *input, void *output)

Invoke dynamic

int(* _hal_backend_ml_funcs::invoke_dynamic)(void *backend_private, void *prop, const void *input, void *output)

Get framework info


Typedef Documentation

The HAL backend structure for ML. This should be implemented by each HAL backend.

Since:
HAL_MODULE_ML 1.0

Enumeration for the error codes of hal-ml.

Since:
HAL_MODULE_ML 1.0

Enumeration Type Documentation

Enumeration for the error codes of hal-ml.

Since:
HAL_MODULE_ML 1.0
Enumerator:
HAL_ML_ERROR_NONE 

Success!

HAL_ML_ERROR_INVALID_PARAMETER 

Invalid parameter

HAL_ML_ERROR_NOT_SUPPORTED 

The feature is not supported

HAL_ML_ERROR_UNKNOWN 

Unknown error

HAL_ML_ERROR_OUT_OF_MEMORY 

Out of memory

HAL_ML_ERROR_PERMISSION_DENIED 

Permission denied

HAL_ML_ERROR_IO_ERROR 

I/O error

HAL_ML_ERROR_RUNTIME_ERROR 

Runtime error