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 Source File
onnx-mlir
OMTensorList.h
Go to the documentation of this file.
1 /*
2  * SPDX-License-Identifier: Apache-2.0
3  */
4 
5 //===-------- OMTensorList.h - OMTensorList Declaration header-------------===//
6 //
7 // Copyright 2019-2023 The IBM Research Authors.
8 //
9 // =============================================================================
10 //
11 // This file contains declaration of OMTensorList data structures and
12 // API functions.
13 //
14 //===----------------------------------------------------------------------===//
15 
16 #ifndef ONNX_MLIR_OMTENSORLIST_H
17 #define ONNX_MLIR_OMTENSORLIST_H
18 
19 #include "onnx-mlir/Runtime/OMTensor.h"
20 
21 struct OMTensorList;
22 
23 #ifndef __cplusplus
24 typedef struct OMTensorList OMTensorList;
25 #endif
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30 
44 OM_EXTERNAL_VISIBILITY OMTensorList *omTensorListCreate(
45  OMTensor **tensors, int64_t n);
46 
57 OM_EXTERNAL_VISIBILITY void omTensorListDestroy(OMTensorList *list);
58 
69 OM_EXTERNAL_VISIBILITY void omTensorListDestroyShallow(OMTensorList *list);
70 
80 OM_EXTERNAL_VISIBILITY OMTensor **omTensorListGetOmtArray(const OMTensorList *list);
81 
89 OM_EXTERNAL_VISIBILITY int64_t omTensorListGetSize(const OMTensorList *list);
90 
98 OM_EXTERNAL_VISIBILITY OMTensor *omTensorListGetOmtByIndex(
99  const OMTensorList *list, int64_t index);
100 
101 #ifdef __cplusplus
102 }
103 #endif
104 
105 #endif // ONNX_MLIR_OMTENSORLIST_H
OM_EXTERNAL_VISIBILITY void omTensorListDestroy(OMTensorList *list)
OMTensorList destroyer.
OM_EXTERNAL_VISIBILITY OMTensor * omTensorListGetOmtByIndex(const OMTensorList *list, int64_t index)
OMTensorList OMTensor getter by index.
struct OMTensorList OMTensorList
Definition: OMTensorList.h:24
OM_EXTERNAL_VISIBILITY OMTensor ** omTensorListGetOmtArray(const OMTensorList *list)
OMTensorList OMTensor array getter.
OM_EXTERNAL_VISIBILITY OMTensorList * omTensorListCreate(OMTensor **tensors, int64_t n)
OMTensorList creator.
OM_EXTERNAL_VISIBILITY int64_t omTensorListGetSize(const OMTensorList *list)
OMTensorList size getter.
OM_EXTERNAL_VISIBILITY void omTensorListDestroyShallow(OMTensorList *list)
OMTensorList shallow destroyer which does not destroy the tensors.