Skip to content

Latest commit

 

History

History
60 lines (42 loc) · 1.6 KB

USAGE.md

File metadata and controls

60 lines (42 loc) · 1.6 KB

Usage

NNabla C Runtime depends File Format Converter that is included in NNabla.

Use with C source code converted from NNP file.

$ nnabla_cli convert input.nnp output.nnb

Use with NNB file converted from NNP file.

$ nnabla_cli -O CSRC convert input.nnp output

Add your own implementation.

To use user defined functions, use @ref rt_add_callback.

The function that the user should prepare is

  • allocate
  • exec
  • free

that 3 types.

Please see (examples/callback/callback.c) for details.

Meaning of nn_function_implement_t

  • 0 to 99
    • Callback allocator will called when initialize context if it was registered, impl number is used by user.
  • NN_FUNCTION_IMPLEMENT_AUTO(100)
    • Implementation is automatically selected.
  • NN_FUNCTION_IMPLEMENT_FLOAT(101)
    • NOT IMPLEMENTED: force use float function.
  • NN_FUNCTION_IMPLEMENT_FIXED16(102)
    • NOT IMPLEMENTED: force use fixed16 function.
  • NN_FUNCTION_IMPLEMENT_FIXED8(103)
    • NOT IMPLEMENTED: force use fixed8 function.