onnx-mlir

Logo

Representation and Reference Lowering of ONNX Models in MLIR Compiler Infrastructure

View the Project on GitHub onnx/onnx-mlir

How-Tos

Inference Using Python
Inference Using C/C++
Inference Using Java

References

ONNX Dialect
OMTensor C99 Runtime API
OMTensorList C99 Runtime API
OMTensor Java Runtime API
OMTensorList Java Runtime API
Generate ONNX Dialect
About Documentation

Development

Add an Operation
Testing Guidelines
Error Handling
Command-line Options
Instrumentation
Constant Propagation
Add an Accelerator

Tools

Tools

RunONNXModel.py
DocCheck

This project is maintained by onnx

Hosted on GitHub Pages — Theme by orderedlist

onnx-mlir: onnx-mlir/include/onnx-mlir/Runtime/OMTensorList.h File Reference
onnx-mlir
OMTensorList.h File Reference
#include "onnx-mlir/Runtime/OMTensor.h"

Go to the source code of this file.

Typedefs

typedef struct OMTensorList OMTensorList
 

Functions

OM_EXTERNAL_VISIBILITY OMTensorListomTensorListCreate (OMTensor **tensors, int64_t n)
 OMTensorList creator. More...
 
OM_EXTERNAL_VISIBILITY void omTensorListDestroy (OMTensorList *list)
 OMTensorList destroyer. More...
 
OM_EXTERNAL_VISIBILITY void omTensorListDestroyShallow (OMTensorList *list)
 OMTensorList shallow destroyer which does not destroy the tensors. More...
 
OM_EXTERNAL_VISIBILITY OMTensor ** omTensorListGetOmtArray (const OMTensorList *list)
 OMTensorList OMTensor array getter. More...
 
OM_EXTERNAL_VISIBILITY int64_t omTensorListGetSize (const OMTensorList *list)
 OMTensorList size getter. More...
 
OM_EXTERNAL_VISIBILITY OMTensor * omTensorListGetOmtByIndex (const OMTensorList *list, int64_t index)
 OMTensorList OMTensor getter by index. More...
 

Typedef Documentation

◆ OMTensorList

typedef struct OMTensorList OMTensorList

Function Documentation

◆ omTensorListCreate()

OM_EXTERNAL_VISIBILITY OMTensorList* omTensorListCreate ( OMTensor **  tensors,
int64_t  n 
)

OMTensorList creator.

Create an OMTensorList with specified OMTensor array.

Internally OMTensorList creates its own copy of the passed-in tensor pointer array. This copy is freed when the OMTensorList is destroyed.

Parameters
tensorsarray of pointers to OMTensor
nnumber of elements in tensors array
Returns
pointer to the OMTensorList created, NULL if creation failed.

◆ omTensorListDestroy()

OM_EXTERNAL_VISIBILITY void omTensorListDestroy ( OMTensorList list)

OMTensorList destroyer.

Destroy the OMTensorList struct recursively. That is to say, both the OMTensorList and OMTensors it contains are freed.

Parameters
listpointer to the OMTensorList to be destroyed. The function simply returns when pointer is null.

◆ omTensorListDestroyShallow()

OM_EXTERNAL_VISIBILITY void omTensorListDestroyShallow ( OMTensorList list)

OMTensorList shallow destroyer which does not destroy the tensors.

Destroys the OMTensorList and its internal array of pointers. The OMTensors inside the OMTensorList are not destroyed.

Parameters
listpointer to the OMTensorList to be freed. The function simply returns when pointer is null.

◆ omTensorListGetOmtArray()

OM_EXTERNAL_VISIBILITY OMTensor** omTensorListGetOmtArray ( const OMTensorList list)

OMTensorList OMTensor array getter.

The pointer to OMTensor pointers are returned without copying, so caller should not free the returned pointer.

Parameters
listpointer to the OMTensorList
Returns
pointer to the array of OMTensor pointers.

◆ omTensorListGetOmtByIndex()

OM_EXTERNAL_VISIBILITY OMTensor* omTensorListGetOmtByIndex ( const OMTensorList list,
int64_t  index 
)

OMTensorList OMTensor getter by index.

Parameters
listpointer to the OMTensorList
indexindex of the OMTensor
Returns
pointer to the OMTensor, NULL if not found.

◆ omTensorListGetSize()

OM_EXTERNAL_VISIBILITY int64_t omTensorListGetSize ( const OMTensorList list)

OMTensorList size getter.

Parameters
listpointer to the OMTensorList
Returns
number of elements in the OMTensor array.