Open
Description
Hi,
We are trying to pass external information to an optimised kernel. We are facing a number of issues.
The gist is that we did not find a way to pass external information to the Prepare stage of a kernel. We have tried the following.
- The solution recommended in this comment using the metadata does not seem (directly) possible because the method GetModelMetadata is not implemented.
- In light of 1, we tried passing the metadata through the external context using
SetMicroExternalContext
. However, this seemingly does not allow to pass any information before the Prepare part of the kernel is called, because of this check.
We could just add a check to the Eval part of the kernel and do the initialisation based on the external context there, but it feels like there should be a better way to achieve this.
Are we missing anything? If not, could e.g. TFLite be updated, or the check for the state of the interpreter be removed?