AoT Executor.
More...
#include <dlpack/dlpack.h>
#include <tvm/runtime/crt/internal/common/ndarray.h>
#include <tvm/runtime/metadata_types.h>
Go to the source code of this file.
◆ TVMAotExecutor
◆ TVMMetadata
◆ TVMAotExecutor_Create()
Allocate a new AotExecutor with TVMPlatformMemoryAllocate and initialize it.
- Parameters
-
module_handle | TVM Module that exposes the functions to call. |
device | Runtime execution device, only supports device type kDLCPU, index 0. |
executor | Pointer which receives a pointer to the newly-created instance. |
module_name | TVM Module name prefix, typically "default". |
- Returns
- 0 if successful.
◆ TVMAotExecutor_GetInputIndex()
int TVMAotExecutor_GetInputIndex |
( |
TVMAotExecutor * |
executor, |
|
|
const char * |
name |
|
) |
| |
Return the input index of the specified input name.
- Parameters
-
- Returns
- Input index.
◆ TVMAotExecutor_GetInputName()
int TVMAotExecutor_GetInputName |
( |
TVMAotExecutor * |
executor, |
|
|
int |
index, |
|
|
const char ** |
name |
|
) |
| |
Return a pointer to name of input with the specified input index.
- Parameters
-
executor | Pointer to executor instance, created by TVMAotExecutor_Create(). |
index | Input index for retrieving name. |
name | Output for retrieving name. |
- Returns
- Pointer to input name in
name
.
◆ TVMAotExecutor_GetNumInputs()
Return the number of inputs.
- Parameters
-
- Returns
- Number of inputs.
◆ TVMAotExecutor_GetNumOutputs()
Return the number of outputs.
- Parameters
-
- Returns
- Number of outputs.
◆ TVMAotExecutor_Release()
int TVMAotExecutor_Release |
( |
TVMAotExecutor * |
executor, |
|
|
const DLDevice |
device |
|
) |
| |
Release the AoT executor created by TVMAotExecutor_Create().
- Parameters
-
executor | Pointer to executor instance, created by TVMAotExecutor_Create(). |
device | Runtime execution device, only supports device type kDLCPU, index 0. |
- Returns
- 0 if successful.
◆ TVMAotExecutor_Run()
Run the generated program.
- Parameters
-
- Returns
- 0 if successful.