OnnxRuntime
|
#include <onnxruntime_cxx_api.h>
Public Member Functions | |
CustomOpApi (const OrtApi &api) | |
template<typename T > | |
T | KernelInfoGetAttribute (const OrtKernelInfo *info, const char *name) |
OrtTensorTypeAndShapeInfo * | GetTensorTypeAndShape (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 OrtMemoryInfo * | GetTensorMemoryInfo (const OrtValue *value) |
std::vector< int64_t > | GetTensorShape (const OrtTensorTypeAndShapeInfo *info) |
void | ReleaseTensorTypeAndShapeInfo (OrtTensorTypeAndShapeInfo *input) |
size_t | KernelContext_GetInputCount (const OrtKernelContext *context) |
const OrtValue * | KernelContext_GetInput (const OrtKernelContext *context, size_t index) |
size_t | KernelContext_GetOutputCount (const OrtKernelContext *context) |
OrtValue * | KernelContext_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) |
OrtOpAttr * | CreateOpAttr (const char *name, const void *data, int len, OrtOpAttrType type) |
void | ReleaseOpAttr (OrtOpAttr *op_attr) |
OrtOp * | 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) |
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) |
OrtKernelInfo * | CopyKernelInfo (const OrtKernelInfo *info) |
void | ReleaseKernelInfo (OrtKernelInfo *info_copy) |
|
inline |
OrtKernelInfo * Ort::CustomOpApi::CopyKernelInfo | ( | const OrtKernelInfo * | info | ) |
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 | ||
) |
OrtOpAttr * Ort::CustomOpApi::CreateOpAttr | ( | const char * | name, |
const void * | data, | ||
int | len, | ||
OrtOpAttrType | type | ||
) |
void Ort::CustomOpApi::GetDimensions | ( | const OrtTensorTypeAndShapeInfo * | info, |
int64_t * | dim_values, | ||
size_t | dim_values_length | ||
) |
size_t Ort::CustomOpApi::GetDimensionsCount | ( | const OrtTensorTypeAndShapeInfo * | info | ) |
const T * Ort::CustomOpApi::GetTensorData | ( | const OrtValue * | value | ) |
ONNXTensorElementDataType Ort::CustomOpApi::GetTensorElementType | ( | const OrtTensorTypeAndShapeInfo * | info | ) |
const OrtMemoryInfo * Ort::CustomOpApi::GetTensorMemoryInfo | ( | const OrtValue * | value | ) |
T * Ort::CustomOpApi::GetTensorMutableData | ( | OrtValue * | value | ) |
std::vector< int64_t > Ort::CustomOpApi::GetTensorShape | ( | const OrtTensorTypeAndShapeInfo * | info | ) |
size_t Ort::CustomOpApi::GetTensorShapeElementCount | ( | const OrtTensorTypeAndShapeInfo * | info | ) |
OrtTensorTypeAndShapeInfo * Ort::CustomOpApi::GetTensorTypeAndShape | ( | const OrtValue * | value | ) |
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 | ||
) |
void * Ort::CustomOpApi::KernelContext_GetGPUComputeStream | ( | const OrtKernelContext * | context | ) |
const OrtValue * Ort::CustomOpApi::KernelContext_GetInput | ( | const OrtKernelContext * | context, |
size_t | index | ||
) |
size_t Ort::CustomOpApi::KernelContext_GetInputCount | ( | const OrtKernelContext * | context | ) |
OrtValue * Ort::CustomOpApi::KernelContext_GetOutput | ( | OrtKernelContext * | context, |
size_t | index, | ||
const int64_t * | dim_values, | ||
size_t | dim_count | ||
) |
size_t Ort::CustomOpApi::KernelContext_GetOutputCount | ( | const OrtKernelContext * | context | ) |
T Ort::CustomOpApi::KernelInfoGetAttribute | ( | const OrtKernelInfo * | info, |
const char * | name | ||
) |
void Ort::CustomOpApi::ReleaseKernelInfo | ( | OrtKernelInfo * | info_copy | ) |
void Ort::CustomOpApi::ReleaseOp | ( | OrtOp * | ort_op | ) |
void Ort::CustomOpApi::ReleaseOpAttr | ( | OrtOpAttr * | op_attr | ) |
void Ort::CustomOpApi::ReleaseTensorTypeAndShapeInfo | ( | OrtTensorTypeAndShapeInfo * | input | ) |
void Ort::CustomOpApi::SetDimensions | ( | OrtTensorTypeAndShapeInfo * | info, |
const int64_t * | dim_values, | ||
size_t | dim_count | ||
) |
void Ort::CustomOpApi::ThrowOnError | ( | OrtStatus * | result | ) |