cpetig / tflite_micro_compiler

generate tflite micro code which bypasses the interpreter (directly calls into kernels)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support custom operators

cpetig opened this issue · comments

Plan:
Load a shared library implementing the operators (libtflite_micro_custom.so/.dll by default?).
Standardize on how to register them (which function to call for registering a single one (Register_{custom_name}?) from the compiled code
And which to call to register all for the allocation phase (extern "C" TfLiteStatus register_custom(tflite::ops::micro::AllOpsResolver*)).

Hmmm. which namespace should custom operator registering functions be a part of? The standard tflite::ops::micro? That would be my proposal. E.g. tflite::ops::micro::Register_imag() for https://www.tensorflow.org/api_docs/python/tf/math/imag 😉