litert:: CustomOpKernel

This is an abstract class.

#include <litert_custom_op_kernel.h>

Defines the C++ interface for custom operator kernels in LiteRT.

Summary

Constructors and Destructors

Public functions

Destroy ()=0
virtual Expected < void >
LiteRtCustomOpKernel &
GetOutputLayouts (const std::vector< Layout > & input_layouts, std::vector< Layout > & output_layouts)=0
virtual Expected < void >
Init (const void *init_data, size_t init_data_size)=0
virtual Expected < void >
OpName () const =0
virtual const std::string &
OpVersion () const =0
virtual int
Run (const std::vector< TensorBuffer > & inputs, std::vector< TensorBuffer > & outputs)=0
virtual Expected < void >

Protected functions

Public functions

Destroy

virtual Expected 
< void > Destroy()=0

GetLiteRtCustomOpKernel

LiteRtCustomOpKernel & GetLiteRtCustomOpKernel()

GetOutputLayouts

 virtual 
  
  Expected 
 
<  
 void 
 > 
 GetOutputLayouts 
 ( 
  
 const 
  
 std 
 :: 
 vector 
<  
  Layout 
 
 > & 
 input_layouts 
 , 
  
 std 
 :: 
 vector 
<  
  Layout 
 
 > & 
 output_layouts 
 ) 
 = 
 0 

Init

 virtual 
  
  Expected 
 
<  
 void 
 > 
 Init 
 ( 
  
 const 
  
 void 
  
 * 
 init_data 
 , 
  
 size_t 
  
 init_data_size 
 ) 
 = 
 0 

OpName

 virtual 
  
 const 
  
 std 
 :: 
 string 
 & 
 OpName 
 () 
  
 const 
  
 = 
 0 

OpVersion

 virtual 
  
 int 
  
 OpVersion 
 () 
  
 const 
  
 = 
 0 

Run

 virtual 
  
  Expected 
 
<  
 void 
 > 
 Run 
 ( 
  
 const 
  
 std 
 :: 
 vector 
<  
  TensorBuffer 
 
 > & 
 inputs 
 , 
  
 std 
 :: 
 vector 
<  
  TensorBuffer 
 
 > & 
 outputs 
 ) 
 = 
 0 

~CustomOpKernel

virtual  ~CustomOpKernel()=default

Protected functions

CustomOpKernel

CustomOpKernel()
Design a Mobile Site
View Site in Mobile | Classic
Share by: