How to use the XNNPackDelegate
I am having trouble getting the XNNPackDelegate working.
I build the binary according to the docs.
and try to use the interpreter like:
Interpreter interpreter;
final options = InterpreterOptions()..addDelegate(
XNNPackDelegate(
options: XNNPackDelegateOptions(
numThreads: 4
)
)
);
interpreter = await Interpreter.fromAsset(
_interpreterAssetPath,
options: options
);
However I always encounter the errror:
ArgumentError (Invalid argument(s): Failed to lookup symbol 'TfLiteXNNPackDelegateCreate': error code 2138089832)
Does anybody know how to solve this?
Did you check if the TfLiteXNNPackDelegateCreate symbols is being exported correctly?
You may refer to these answers to check that:
- https://stackoverflow.com/questions/1237575/how-do-i-find-out-what-all-symbols-are-exported-from-a-shared-object
- https://stackoverflow.com/questions/34732/how-do-i-list-the-symbols-in-a-so-file
I copied the binaries from the example. Are the binaries from there supposed to work?
Maybe you could also add the binaries for desktop platforms to the release section?
I don't remember if these binaries were built with delegate support, you may refer to stackoverflow links to check exported symbols.