ONNX Runtime
Loading...
Searching...
No Matches
Ort::CustomOpBase< TOp, TKernel, WithStatus > Struct Template Reference

#include <onnxruntime_cxx_api.h>

Inheritance diagram for Ort::CustomOpBase< TOp, TKernel, WithStatus >:
OrtCustomOp

Public Member Functions

 CustomOpBase ()
 
const char * GetExecutionProviderType () const
 
OrtCustomOpInputOutputCharacteristic GetInputCharacteristic (size_t) const
 
OrtCustomOpInputOutputCharacteristic GetOutputCharacteristic (size_t) const
 
OrtMemType GetInputMemoryType (size_t) const
 
int GetVariadicInputMinArity () const
 
bool GetVariadicInputHomogeneity () const
 
int GetVariadicOutputMinArity () const
 
bool GetVariadicOutputHomogeneity () const
 
std::vector< std::string > GetSessionConfigKeys () const
 
template<typename C >
void SetShapeInferFn (...)
 

Public Attributes

template<typename C >
decltype(&C::InferOutputShape) SetShapeInferFn (decltype(&C::InferOutputShape))
 
- Public Attributes inherited from OrtCustomOp
uint32_t version
 
void *(* CreateKernel )(const struct OrtCustomOp *op, const OrtApi *api, const OrtKernelInfo *info)
 
const char *(* GetName )(const struct OrtCustomOp *op)
 
const char *(* GetExecutionProviderType )(const struct OrtCustomOp *op)
 
ONNXTensorElementDataType(* GetInputType )(const struct OrtCustomOp *op, size_t index)
 
size_t(* GetInputTypeCount )(const struct OrtCustomOp *op)
 
ONNXTensorElementDataType(* GetOutputType )(const struct OrtCustomOp *op, size_t index)
 
size_t(* GetOutputTypeCount )(const struct OrtCustomOp *op)
 
void(* KernelCompute )(void *op_kernel, OrtKernelContext *context)
 
void(* KernelDestroy )(void *op_kernel)
 
OrtCustomOpInputOutputCharacteristic(* GetInputCharacteristic )(const struct OrtCustomOp *op, size_t index)
 
OrtCustomOpInputOutputCharacteristic(* GetOutputCharacteristic )(const struct OrtCustomOp *op, size_t index)
 
OrtMemType(* GetInputMemoryType )(const struct OrtCustomOp *op, size_t index)
 
int(* GetVariadicInputMinArity )(const struct OrtCustomOp *op)
 
int(* GetVariadicInputHomogeneity )(const struct OrtCustomOp *op)
 
int(* GetVariadicOutputMinArity )(const struct OrtCustomOp *op)
 
int(* GetVariadicOutputHomogeneity )(const struct OrtCustomOp *op)
 
OrtStatusPtr(* CreateKernelV2 )(const struct OrtCustomOp *op, const OrtApi *api, const OrtKernelInfo *info, void **kernel)
 
OrtStatusPtr(* KernelComputeV2 )(void *op_kernel, OrtKernelContext *context)
 
OrtStatusPtr(* InferOutputShapeFn )(const struct OrtCustomOp *op, OrtShapeInferContext *)
 
int(* GetStartVersion )(const struct OrtCustomOp *op)
 
int(* GetEndVersion )(const struct OrtCustomOp *op)
 

Protected Member Functions

void GetSessionConfigs (std::unordered_map< std::string, std::string > &out, ConstSessionOptions options) const
 

Protected Attributes

int start_ver_ = 1
 
int end_ver_ = (1UL << 31) - 1
 

Constructor & Destructor Documentation

◆ CustomOpBase()

template<typename TOp , typename TKernel , bool WithStatus = false>
Ort::CustomOpBase< TOp, TKernel, WithStatus >::CustomOpBase ( )
inline

Member Function Documentation

◆ GetExecutionProviderType()

template<typename TOp , typename TKernel , bool WithStatus = false>
const char * Ort::CustomOpBase< TOp, TKernel, WithStatus >::GetExecutionProviderType ( ) const
inline

◆ GetInputCharacteristic()

template<typename TOp , typename TKernel , bool WithStatus = false>
OrtCustomOpInputOutputCharacteristic Ort::CustomOpBase< TOp, TKernel, WithStatus >::GetInputCharacteristic ( size_t  ) const
inline

◆ GetInputMemoryType()

template<typename TOp , typename TKernel , bool WithStatus = false>
OrtMemType Ort::CustomOpBase< TOp, TKernel, WithStatus >::GetInputMemoryType ( size_t  ) const
inline

◆ GetOutputCharacteristic()

template<typename TOp , typename TKernel , bool WithStatus = false>
OrtCustomOpInputOutputCharacteristic Ort::CustomOpBase< TOp, TKernel, WithStatus >::GetOutputCharacteristic ( size_t  ) const
inline

◆ GetSessionConfigKeys()

template<typename TOp , typename TKernel , bool WithStatus = false>
std::vector< std::string > Ort::CustomOpBase< TOp, TKernel, WithStatus >::GetSessionConfigKeys ( ) const
inline

◆ GetSessionConfigs()

template<typename TOp , typename TKernel , bool WithStatus = false>
void Ort::CustomOpBase< TOp, TKernel, WithStatus >::GetSessionConfigs ( std::unordered_map< std::string, std::string > &  out,
ConstSessionOptions  options 
) const
protected

◆ GetVariadicInputHomogeneity()

template<typename TOp , typename TKernel , bool WithStatus = false>
bool Ort::CustomOpBase< TOp, TKernel, WithStatus >::GetVariadicInputHomogeneity ( ) const
inline

◆ GetVariadicInputMinArity()

template<typename TOp , typename TKernel , bool WithStatus = false>
int Ort::CustomOpBase< TOp, TKernel, WithStatus >::GetVariadicInputMinArity ( ) const
inline

◆ GetVariadicOutputHomogeneity()

template<typename TOp , typename TKernel , bool WithStatus = false>
bool Ort::CustomOpBase< TOp, TKernel, WithStatus >::GetVariadicOutputHomogeneity ( ) const
inline

◆ GetVariadicOutputMinArity()

template<typename TOp , typename TKernel , bool WithStatus = false>
int Ort::CustomOpBase< TOp, TKernel, WithStatus >::GetVariadicOutputMinArity ( ) const
inline

◆ SetShapeInferFn()

template<typename TOp , typename TKernel , bool WithStatus = false>
template<typename C >
void Ort::CustomOpBase< TOp, TKernel, WithStatus >::SetShapeInferFn (   ...)
inline

Member Data Documentation

◆ end_ver_

template<typename TOp , typename TKernel , bool WithStatus = false>
int Ort::CustomOpBase< TOp, TKernel, WithStatus >::end_ver_ = (1UL << 31) - 1
protected

◆ SetShapeInferFn

template<typename TOp , typename TKernel , bool WithStatus = false>
template<typename C >
decltype(&C::InferOutputShape) Ort::CustomOpBase< TOp, TKernel, WithStatus >::SetShapeInferFn(decltype(&C::InferOutputShape))
inline

◆ start_ver_

template<typename TOp , typename TKernel , bool WithStatus = false>
int Ort::CustomOpBase< TOp, TKernel, WithStatus >::start_ver_ = 1
protected