cpetig / tflite_micro_compiler

generate tflite micro code which bypasses the interpreter (directly calls into kernels)
Apache License 2.0
77 stars 26 forks source link

Support custom operators #16

Closed cpetig closed 4 years ago

cpetig commented 4 years ago

Plan: Load a shared library implementing the operators (libtflite_microcustom.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*)).

cpetig commented 4 years ago

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 😉