17#ifndef __NNFW_EXPERIMENTAL_H__
18#define __NNFW_EXPERIMENTAL_H__
56 size_t userdata_size);
345 void *buffer,
size_t length);
572 int minmax_records_count);
volatile const char info[]
This file describes runtime API.
NNFW_STATUS nnfw_prepare_pipeline(nnfw_session *session, const char *map_file_path=nullptr)
Prepare session to be ready for inference.
NNFW_STATUS nnfw_set_prepare_config(nnfw_session *session, NNFW_PREPARE_CONFIG key, const char *value)
Set prepare configuration.
NNFW_STATUS nnfw_train_get_loss(nnfw_session *session, uint32_t index, float *loss)
Get loss value for expected output.
NNFW_STATUS nnfw_register_custom_op_info(nnfw_session *session, const char *id, custom_kernel_registration_info *info)
NNFW_STATUS nnfw_run_with_auto_compilation(nnfw_session *session, const char *target, NNFW_CODEGEN_PREF pref)
Run inference with auto compilation.
NNFW_STATUS nnfw_train_export_checkpoint(nnfw_session *session, const char *path)
Export circle checkpoint.
NNFW_TRAIN_LOSS_REDUCTION
@ NNFW_TRAIN_LOSS_REDUCTION_UNDEFINED
@ NNFW_TRAIN_LOSS_REDUCTION_SUM
@ NNFW_TRAIN_LOSS_REDUCTION_SUM_OVER_BATCH_SIZE
NNFW_STATUS nnfw_train_set_expected(nnfw_session *session, uint32_t index, const void *expected, const nnfw_tensorinfo *expected_info)
Set training expected output.
void(* nnfw_custom_eval)(nnfw_custom_kernel_params *params, char *userdata, size_t userdata_size)
NNFW_STATUS nnfw_output_tensorindex(nnfw_session *session, const char *tensorname, uint32_t *index)
Get the input tensor index by name.
@ NNFW_TRAIN_OPTIMIZER_ADAM
@ NNFW_TRAIN_OPTIMIZER_SGD
@ NNFW_TRAIN_OPTIMIZER_UNDEFINED
NNFW_CODEGEN_PREF
Preference for target-dependent code generation.
@ NNFW_CODEGEN_PREF_DEFAULT
@ NNFW_CODEGEN_PREF_MEMORY_FIRST
@ NNFW_CODEGEN_PREF_COMPILE_TIME_FIRST
@ NNFW_CODEGEN_PREF_PERFORMANCE_FIRST
NNFW_STATUS nnfw_train_prepare(nnfw_session *session)
Prepare session to be ready for training.
NNFW_STATUS nnfw_train(nnfw_session *session, bool update_weights)
Train the model.
NNFW_TRAIN_NUM_OF_TRAINABLE_OPS_SPECIAL_VALUES
Special values of num_of_trainable_ops. Positive values are used to indicate layers to be trained fro...
@ NNFW_TRAIN_TRAINABLE_NONE
@ NNFW_TRAIN_TRAINABLE_ALL
@ NNFW_TRAIN_TRAINABLE_INCORRECT_STATE
NNFW_STATUS nnfw_set_quantization_type(nnfw_session *session, NNFW_QUANTIZE_TYPE qtype)
Set quantization type.
NNFW_STATUS nnfw_train_set_traininfo(nnfw_session *session, const nnfw_train_info *info)
Set training information.
NNFW_STATUS nnfw_train_get_traininfo(nnfw_session *session, nnfw_train_info *info)
Get training information.
NNFW_STATUS nnfw_input_tensorindex(nnfw_session *session, const char *tensorname, uint32_t *index)
Get the input tensor index by name.
NNFW_STATUS nnfw_set_odc_param_minmax_records_count(nnfw_session *session, int minmax_records_count)
Set MinMax records count in auto compilation mode with on-device compiler.
NNFW_STATUS nnfw_codegen(nnfw_session *session, const char *target, NNFW_CODEGEN_PREF pref)
Generate target-dependent code.
NNFW_QUANTIZE_TYPE
Convert between training mode and inference mode.
@ NNFW_QUANTIZE_TYPE_WO_I16_SYM
@ NNFW_QUANTIZE_TYPE_U8_ASYM
@ NNFW_QUANTIZE_TYPE_I16_SYM
@ NNFW_QUANTIZE_TYPE_NOT_SET
@ NNFW_QUANTIZE_TYPE_WO_I8_SYM
NNFW_RUN_CONFIG
Configuration key for execution.
@ NNFW_RUN_CONFIG_PROFILE
@ NNFW_RUN_CONFIG_DUMP_MINMAX
NNFW_STATUS nnfw_quantize(nnfw_session *session)
Quantize circle model.
NNFW_STATUS nnfw_train_set_input(nnfw_session *session, uint32_t index, const void *input, const nnfw_tensorinfo *input_info)
Set training input.
NNFW_STATUS nnfw_reset_prepare_config(nnfw_session *session)
Reset prepare configurations.
NNFW_STATUS nnfw_reset_execute_config(nnfw_session *session)
Reset execution (run or train) configurations.
NNFW_STATUS nnfw_train_set_output(nnfw_session *session, uint32_t index, NNFW_TYPE type, void *buffer, size_t length)
Set training output buffer.
NNFW_STATUS nnfw_set_execute_config(nnfw_session *session, const NNFW_RUN_CONFIG key, const char *value)
Set execution (run or train) configuration.
NNFW_STATUS nnfw_train_import_checkpoint(nnfw_session *session, const char *path)
Import circle checkpoint.
NNFW_STATUS nnfw_push_pipeline_input(nnfw_session *session, void *inputs, void *lengths)
Set input buffer.
NNFW_STATUS nnfw_set_backends_per_operation(nnfw_session *session, const char *backend_settings)
Set the backend for each operation in the session.
NNFW_STATUS nnfw_odc_delete_minmax_file(nnfw_session *session)
Delete MinMax file for on-device compiler.
NNFW_STATUS nnfw_pop_pipeline_output(nnfw_session *session, void *outputs)
Get last outputs of partitioned model in session.
@ NNFW_TRAIN_LOSS_MEAN_SQUARED_ERROR
@ NNFW_TRAIN_LOSS_UNDEFINED
@ NNFW_TRAIN_LOSS_CATEGORICAL_CROSSENTROPY
NNFW_STATUS nnfw_set_codegen_model_path(nnfw_session *session, const char *path)
Set exported codegen model path.
NNFW_STATUS nnfw_set_quantized_model_path(nnfw_session *session, const char *path)
Set exported quantized model path.
NNFW_STATUS nnfw_train_input_tensorinfo(nnfw_session *session, uint32_t index, nnfw_tensorinfo *info)
Get the training model input information.
NNFW_PREPARE_CONFIG
Configuration key for prepare (compile and schedule)
@ NNFW_PREPARE_CONFIG_PROFILE
NNFW_STATUS nnfw_train_expected_tensorinfo(nnfw_session *session, uint32_t index, nnfw_tensorinfo *info)
Get the training model expected output information.
NNFW_STATUS nnfw_train_export_circle(nnfw_session *session, const char *path)
Export circle model.
NNFW_STATUS
Result values returned from a call to an API function.
NNFW_TRAIN_LOSS_REDUCTION
nnfw_custom_eval eval_function
NNFW_TRAIN_LOSS_REDUCTION reduction_type
tensor info describes the type and shape of tensors
Training information to prepare training.
int32_t num_of_trainable_ops