Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions tensorflow/lite/micro/micro_mutable_op_resolver.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ limitations under the License.
#include <cstdio>
#include <cstring>

#include "signal/micro/kernels/irfft.h"
#include "signal/micro/kernels/rfft.h"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the standard approach here is to add the register functions to

namespace tflm_signal {
TFLMRegistration* Register_DELAY();
TFLMRegistration* Register_FFT_AUTO_SCALE();
TFLMRegistration* Register_FILTER_BANK();
TFLMRegistration* Register_FILTER_BANK_LOG();
TFLMRegistration* Register_FILTER_BANK_SPECTRAL_SUBTRACTION();
TFLMRegistration* Register_FILTER_BANK_SQUARE_ROOT();
TFLMRegistration* Register_ENERGY();
TFLMRegistration* Register_FRAMER();
TFLMRegistration* Register_OVERLAP_ADD();
TFLMRegistration* Register_PCAN();
TFLMRegistration* Register_STACKER();
TFLMRegistration* Register_WINDOW();
} // namespace tflm_signal
instead of including new headers.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reason why I need to include this file, is so that I can do this:
AddRfft(::tflite::tflm_signal::Register_RFFT_INT16());

Should I add ::tflite::tflm_signal::Register_RFFT_INT16() to micro_ops.h?

micro_ops.h doesn't define any other Register_ function for specialized types. And looking at tensorflow/lite/micro/micro_mutable_op_resolver.h, there are multiple kernel headers included there, presumably for the same purpose.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@shlmregev @veblush Ah, I understand now. This is how CONV_2D, FULLY_CONNECTED, MUL, etc. expose their additional registrations as well. So micro_mutable_op_resolver.h is the right place to put the include. I'm thinking that signal/micro/kernels/irfft.h should also be included here, as it also has multiple registrations.

#include "tensorflow/lite/c/common.h"
#include "tensorflow/lite/core/api/flatbuffer_conversions.h"
#include "tensorflow/lite/kernels/internal/compatibility.h"
Expand Down
Loading