Skip to content

External Context in Prepare Stage #3101

Open
@JulianPortmann-synthara

Description

@JulianPortmann-synthara

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.

  1. The solution recommended in this comment using the metadata does not seem (directly) possible because the method GetModelMetadata is not implemented.
  2. 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?

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions