tvm
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Classes | Typedefs | Functions
aot_executor.h File Reference

AoT Executor. More...

#include <dlpack/dlpack.h>
#include <tvm/runtime/crt/internal/common/ndarray.h>
#include <tvm/runtime/metadata_types.h>
Include dependency graph for aot_executor.h:

Go to the source code of this file.

Classes

struct  TVMAotExecutor
 

Typedefs

typedef struct TVMMetadata TVMMetadata
 
typedef struct TVMAotExecutor TVMAotExecutor
 

Functions

int TVMAotExecutor_Create (TVMModuleHandle module_handle, const DLDevice device, TVMAotExecutor **executor, const char *module_name)
 Allocate a new AotExecutor with TVMPlatformMemoryAllocate and initialize it. More...
 
int TVMAotExecutor_Release (TVMAotExecutor *executor, const DLDevice device)
 Release the AoT executor created by TVMAotExecutor_Create(). More...
 
int TVMAotExecutor_GetNumInputs (TVMAotExecutor *executor)
 Return the number of inputs. More...
 
int TVMAotExecutor_GetNumOutputs (TVMAotExecutor *executor)
 Return the number of outputs. More...
 
int TVMAotExecutor_GetInputIndex (TVMAotExecutor *executor, const char *name)
 Return the input index of the specified input name. More...
 
int TVMAotExecutor_GetInputName (TVMAotExecutor *executor, int index, const char **name)
 Return a pointer to name of input with the specified input index. More...
 
int TVMAotExecutor_Run (TVMAotExecutor *executor)
 Run the generated program. More...
 

Detailed Description

AoT Executor.

Typedef Documentation

◆ TVMAotExecutor

◆ TVMMetadata

typedef struct TVMMetadata TVMMetadata

Function Documentation

◆ TVMAotExecutor_Create()

int TVMAotExecutor_Create ( TVMModuleHandle  module_handle,
const DLDevice  device,
TVMAotExecutor **  executor,
const char *  module_name 
)

Allocate a new AotExecutor with TVMPlatformMemoryAllocate and initialize it.

Parameters
module_handleTVM Module that exposes the functions to call.
deviceRuntime execution device, only supports device type kDLCPU, index 0.
executorPointer which receives a pointer to the newly-created instance.
module_nameTVM 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
executorPointer to executor instance, created by TVMAotExecutor_Create().
nameInput name for retrieving index.
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
executorPointer to executor instance, created by TVMAotExecutor_Create().
indexInput index for retrieving name.
nameOutput for retrieving name.
Returns
Pointer to input name in name.

◆ TVMAotExecutor_GetNumInputs()

int TVMAotExecutor_GetNumInputs ( TVMAotExecutor executor)

Return the number of inputs.

Parameters
executorPointer to executor instance, created by TVMAotExecutor_Create().
Returns
Number of inputs.

◆ TVMAotExecutor_GetNumOutputs()

int TVMAotExecutor_GetNumOutputs ( TVMAotExecutor executor)

Return the number of outputs.

Parameters
executorPointer to executor instance, created by TVMAotExecutor_Create().
Returns
Number of outputs.

◆ TVMAotExecutor_Release()

int TVMAotExecutor_Release ( TVMAotExecutor executor,
const DLDevice  device 
)

Release the AoT executor created by TVMAotExecutor_Create().

Parameters
executorPointer to executor instance, created by TVMAotExecutor_Create().
deviceRuntime execution device, only supports device type kDLCPU, index 0.
Returns
0 if successful.

◆ TVMAotExecutor_Run()

int TVMAotExecutor_Run ( TVMAotExecutor executor)

Run the generated program.

Parameters
executorPointer to executor instance, created by TVMAotExecutor_Create().
Returns
0 if successful.