cpetig / tflite_micro_compiler

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

Don't assign nullptr to custom_initial_data #65

Open Alex-EEE opened 2 years ago

Alex-EEE commented 2 years ago

Although most custom ops don't use this field, some now do, see https://github.com/tensorflow/tflite-micro/blob/main/tensorflow/lite/micro/kernels/ethos_u/ethosu.cc for example.

I think this is the correct way to fix this, do you see any issues with this patch? The pointer and size were already being saved off, just not used till this PR

rafzi commented 2 years ago

Thank you for your fix. This looks good to me.

However, you've sent the PR to the default branch r2.3, where you'd have to say ->init, see CI failure. Or maybe you meant to send this to another branch? The master is tracking the upstream tensorflow and has not been updated or pending some changes from here: https://github.com/cpetig/tflite_micro_compiler/pull/63