Attend the Women in ML Symposium on December 7 Register now
Stay organized with collections Save and categorize content based on your preferences.

tflite::OpResolver

This is an abstract class.

#include <op_resolver.h>

Abstract interface that returns TfLiteRegistrations given op codes or custom op names.

Summary

This is the mechanism that ops being referenced in the flatbuffer model are mapped to executable function pointers (TfLiteRegistrations).

Inheritance

Direct Known Subclasses:tflite::MutableOpResolver

Constructors and Destructors

~OpResolver()

Public types

TfLiteDelegateCreator using
std::function< std::unique_ptr< TfLiteDelegate, void(*)(TfLiteDelegate *)>(int)>
TfLiteDelegateCreators using
std::vector< TfLiteDelegateCreator >
TfLiteDelegatePtrVector using
std::vector< std::unique_ptr< TfLiteDelegate, void(*)(TfLiteDelegate *)>>
TfLiteOpaqueDelegateCreator using
std::function< TfLiteOpaqueDelegatePtr(int)>
TfLiteOpaqueDelegateCreators using
std::vector< TfLiteOpaqueDelegateCreator >
TfLiteOpaqueDelegatePtr using
std::unique_ptr< TfLiteOpaqueDelegateStruct, void(*)(TfLiteOpaqueDelegateStruct *)>

Public functions

FindOp(tflite::BuiltinOperator op, int version) const =0
virtual const TfLiteRegistration *
Finds the op registration for a builtin operator by enum code.
FindOp(const char *op, int version) const =0
virtual const TfLiteRegistration *
Finds the op registration of a custom operator by op name.
GetDelegateCreators() const
virtual TfLiteDelegateCreators
GetDelegates(int num_threads) const
virtual TfLiteDelegatePtrVector
GetOpaqueDelegateCreators() const
virtual TfLiteOpaqueDelegateCreators

Public types

TfLiteDelegateCreator

std::function< std::unique_ptr< TfLiteDelegate, void(*)(TfLiteDelegate *)>(int)> TfLiteDelegateCreator

TfLiteDelegateCreators

std::vector< TfLiteDelegateCreator > TfLiteDelegateCreators

TfLiteDelegatePtrVector

std::vector< std::unique_ptr< TfLiteDelegate, void(*)(TfLiteDelegate *)>> TfLiteDelegatePtrVector

TfLiteOpaqueDelegateCreator

std::function< TfLiteOpaqueDelegatePtr(int)> TfLiteOpaqueDelegateCreator

TfLiteOpaqueDelegateCreators

std::vector< TfLiteOpaqueDelegateCreator > TfLiteOpaqueDelegateCreators

TfLiteOpaqueDelegatePtr

std::unique_ptr< TfLiteOpaqueDelegateStruct, void(*)(TfLiteOpaqueDelegateStruct *)> TfLiteOpaqueDelegatePtr

Public functions

FindOp

virtual const TfLiteRegistration * FindOp(
  tflite::BuiltinOperator op,
  int version
) const =0

Finds the op registration for a builtin operator by enum code.

FindOp

virtual const TfLiteRegistration * FindOp(
  const char *op,
  int version
) const =0

Finds the op registration of a custom operator by op name.

GetDelegateCreators

virtual TfLiteDelegateCreators GetDelegateCreators() const 

GetDelegates

virtual TfLiteDelegatePtrVector GetDelegates(
  int num_threads
) const 

GetOpaqueDelegateCreators

virtual TfLiteOpaqueDelegateCreators GetOpaqueDelegateCreators() const 

~OpResolver

virtual  ~OpResolver()