OnnxRuntime
Ort::CustomOpApi Struct Reference

#include <onnxruntime_cxx_api.h>

Public Member Functions

 CustomOpApi (const OrtApi &api)
 
template<typename T >
KernelInfoGetAttribute (const OrtKernelInfo *info, const char *name)
 
OrtTensorTypeAndShapeInfoGetTensorTypeAndShape (const OrtValue *value)
 
size_t GetTensorShapeElementCount (const OrtTensorTypeAndShapeInfo *info)
 
ONNXTensorElementDataType GetTensorElementType (const OrtTensorTypeAndShapeInfo *info)
 
size_t GetDimensionsCount (const OrtTensorTypeAndShapeInfo *info)
 
void GetDimensions (const OrtTensorTypeAndShapeInfo *info, int64_t *dim_values, size_t dim_values_length)
 
void SetDimensions (OrtTensorTypeAndShapeInfo *info, const int64_t *dim_values, size_t dim_count)
 
template<typename T >
T * GetTensorMutableData (OrtValue *value)
 
template<typename T >
const T * GetTensorData (const OrtValue *value)
 
const OrtMemoryInfoGetTensorMemoryInfo (const OrtValue *value)
 
std::vector< int64_t > GetTensorShape (const OrtTensorTypeAndShapeInfo *info)
 
void ReleaseTensorTypeAndShapeInfo (OrtTensorTypeAndShapeInfo *input)
 
size_t KernelContext_GetInputCount (const OrtKernelContext *context)
 
const OrtValueKernelContext_GetInput (const OrtKernelContext *context, size_t index)
 
size_t KernelContext_GetOutputCount (const OrtKernelContext *context)
 
OrtValueKernelContext_GetOutput (OrtKernelContext *context, size_t index, const int64_t *dim_values, size_t dim_count)
 
void * KernelContext_GetGPUComputeStream (const OrtKernelContext *context)
 
void ThrowOnError (OrtStatus *result)
 
OrtOpAttrCreateOpAttr (const char *name, const void *data, int len, OrtOpAttrType type)
 
void ReleaseOpAttr (OrtOpAttr *op_attr)
 
OrtOpCreateOp (const OrtKernelInfo *info, const char *op_name, const char *domain, int version, const char **type_constraint_names, const ONNXTensorElementDataType *type_constraint_values, int type_constraint_count, const OrtOpAttr *const *attr_values, int attr_count, int input_count, int output_count)
 
void InvokeOp (const OrtKernelContext *context, const OrtOp *ort_op, const OrtValue *const *input_values, int input_count, OrtValue *const *output_values, int output_count)
 
void ReleaseOp (OrtOp *ort_op)
 
OrtKernelInfoCopyKernelInfo (const OrtKernelInfo *info)
 
void ReleaseKernelInfo (OrtKernelInfo *info_copy)
 

Constructor & Destructor Documentation

◆ CustomOpApi()

Ort::CustomOpApi::CustomOpApi ( const OrtApi api)
inline

Member Function Documentation

◆ CopyKernelInfo()

OrtKernelInfo * Ort::CustomOpApi::CopyKernelInfo ( const OrtKernelInfo info)

◆ CreateOp()

OrtOp * Ort::CustomOpApi::CreateOp ( const OrtKernelInfo info,
const char *  op_name,
const char *  domain,
int  version,
const char **  type_constraint_names,
const ONNXTensorElementDataType type_constraint_values,
int  type_constraint_count,
const OrtOpAttr *const *  attr_values,
int  attr_count,
int  input_count,
int  output_count 
)

◆ CreateOpAttr()

OrtOpAttr * Ort::CustomOpApi::CreateOpAttr ( const char *  name,
const void *  data,
int  len,
OrtOpAttrType  type 
)

◆ GetDimensions()

void Ort::CustomOpApi::GetDimensions ( const OrtTensorTypeAndShapeInfo info,
int64_t *  dim_values,
size_t  dim_values_length 
)

◆ GetDimensionsCount()

size_t Ort::CustomOpApi::GetDimensionsCount ( const OrtTensorTypeAndShapeInfo info)

◆ GetTensorData()

template<typename T >
const T * Ort::CustomOpApi::GetTensorData ( const OrtValue value)

◆ GetTensorElementType()

ONNXTensorElementDataType Ort::CustomOpApi::GetTensorElementType ( const OrtTensorTypeAndShapeInfo info)

◆ GetTensorMemoryInfo()

const OrtMemoryInfo * Ort::CustomOpApi::GetTensorMemoryInfo ( const OrtValue value)

◆ GetTensorMutableData()

template<typename T >
T * Ort::CustomOpApi::GetTensorMutableData ( OrtValue value)

◆ GetTensorShape()

std::vector< int64_t > Ort::CustomOpApi::GetTensorShape ( const OrtTensorTypeAndShapeInfo info)

◆ GetTensorShapeElementCount()

size_t Ort::CustomOpApi::GetTensorShapeElementCount ( const OrtTensorTypeAndShapeInfo info)

◆ GetTensorTypeAndShape()

OrtTensorTypeAndShapeInfo * Ort::CustomOpApi::GetTensorTypeAndShape ( const OrtValue value)

◆ InvokeOp()

void Ort::CustomOpApi::InvokeOp ( const OrtKernelContext context,
const OrtOp ort_op,
const OrtValue *const *  input_values,
int  input_count,
OrtValue *const *  output_values,
int  output_count 
)

◆ KernelContext_GetGPUComputeStream()

void * Ort::CustomOpApi::KernelContext_GetGPUComputeStream ( const OrtKernelContext context)

◆ KernelContext_GetInput()

const OrtValue * Ort::CustomOpApi::KernelContext_GetInput ( const OrtKernelContext context,
size_t  index 
)

◆ KernelContext_GetInputCount()

size_t Ort::CustomOpApi::KernelContext_GetInputCount ( const OrtKernelContext context)

◆ KernelContext_GetOutput()

OrtValue * Ort::CustomOpApi::KernelContext_GetOutput ( OrtKernelContext context,
size_t  index,
const int64_t *  dim_values,
size_t  dim_count 
)

◆ KernelContext_GetOutputCount()

size_t Ort::CustomOpApi::KernelContext_GetOutputCount ( const OrtKernelContext context)

◆ KernelInfoGetAttribute()

template<typename T >
T Ort::CustomOpApi::KernelInfoGetAttribute ( const OrtKernelInfo info,
const char *  name 
)

◆ ReleaseKernelInfo()

void Ort::CustomOpApi::ReleaseKernelInfo ( OrtKernelInfo info_copy)

◆ ReleaseOp()

void Ort::CustomOpApi::ReleaseOp ( OrtOp ort_op)

◆ ReleaseOpAttr()

void Ort::CustomOpApi::ReleaseOpAttr ( OrtOpAttr op_attr)

◆ ReleaseTensorTypeAndShapeInfo()

void Ort::CustomOpApi::ReleaseTensorTypeAndShapeInfo ( OrtTensorTypeAndShapeInfo input)

◆ SetDimensions()

void Ort::CustomOpApi::SetDimensions ( OrtTensorTypeAndShapeInfo info,
const int64_t *  dim_values,
size_t  dim_count 
)

◆ ThrowOnError()

void Ort::CustomOpApi::ThrowOnError ( OrtStatus result)