Open Deep Learning API
Loading...
Searching...
No Matches
Data Structures | Typedefs | Enumerations | Functions
odla_compute.h File Reference

Go to the source code of this file.

Data Structures

struct  odla_resource_location
 Resource location. More...
 

Typedefs

typedef struct _odla_computation * odla_computation
 Computation object. More...
 
typedef struct _odla_executable * odla_executable
 Executable object. More...
 
typedef struct _odla_context * odla_context
 Context object. More...
 
typedef struct _odla_item_value * odla_item_value
 Property item value object. More...
 
typedef struct _odla_constants_array * odla_constants_array
 Constants array object. More...
 

Enumerations

enum  odla_compute_mode { ODLA_COMPUTE_DEFAULT , ODLA_COMPUTE_INFERENCE , ODLA_COMPUTE_TRAINING }
 Compute mode. More...
 
enum  odla_item_type {
  ODLA_DYNAMIC_BATCH , ODLA_MIN_BATCH_SIZE , ODLA_MAX_BATCH_SIZE , ODLA_OPT_BATCH_SIZE ,
  ODLA_RUN_BATCH_SIZE , ODLA_DYNAMIC_SHAPE , ODLA_MIN_SHAPE , ODLA_MAX_SHAPE ,
  ODLA_OPT_SHAPE , ODLA_DYNAMIC_VALUE , ODLA_MIN_VALUE , ODLA_MAX_VALUE ,
  ODLA_OPT_VALUE , ODLA_BF16_MODE , ODLA_FP16_MODE , ODLA_USE_SIM_MODE ,
  ODLA_PROCESSOR_NUM , ODLA_BATCHES_PER_STEP , ODLA_USE_DATA_TYPE , ODLA_LOAD_ENGINE_MODE ,
  ODLA_USE_DLA_CORE , ODLA_QUANT_TABLE , ODLA_QUANT_TABLE_SIZE , ODLA_AGGREGATE_OPS ,
  ODLA_ENABLE_ENGINE_CACHE , ODLA_CACHE_DIR , ODLA_ASYNC_CALLBACK_FUNC , ODLA_ASYNC_CALLBACK_ARG
}
 Property item type. More...
 
enum  odla_bf16_mode { BF16_DISABLE , BF16_ACCURACY_MODE , BF16_PERFORMACE_MODE , BF16_AUTO_MODE }
 BF16 mode. More...
 
enum  odla_resource_location_type { ODLA_LOCATION_PATH , ODLA_LOCATION_MEMORY , ODLA_LOCATION_URI }
 Type of resource location. More...
 

Functions

ODLA_API_EXPORT odla_status ODLA_API_CALL odla_CreateComputation (odla_computation *computation)
 Create a computation object. More...
 
ODLA_API_EXPORT odla_status ODLA_API_CALL odla_CompileComputation (const odla_computation computation, const odla_device device, odla_executable *executable)
 Compile a computation object into executable. More...
 
ODLA_API_EXPORT odla_status ODLA_API_CALL odla_LoadComputation (odla_resource_location location, odla_computation *computation)
 Load a computation from the file system. More...
 
ODLA_API_EXPORT odla_status ODLA_API_CALL odla_StoreComputation (odla_resource_location location, odla_computation computation)
 Store a computation object into the file system. More...
 
ODLA_API_EXPORT odla_status ODLA_API_CALL odla_DifferentiateComputation (odla_computation computation)
 Differentiate a computation. More...
 
ODLA_API_EXPORT odla_status ODLA_API_CALL odla_ExecuteComputation (const odla_computation computation, const odla_context context, const odla_compute_mode mode, odla_device device)
 Execute a computation. More...
 
ODLA_API_EXPORT odla_status ODLA_API_CALL odla_AsyncExecuteComputation (const odla_computation computation, const odla_context context, const odla_compute_mode mode, odla_device device)
 Asynchronously execute a computation. More...
 
ODLA_API_EXPORT odla_status ODLA_API_CALL odla_GetNumOfArgsFromComputation (const odla_computation computation, odla_uint32 *num_args)
 Get the number of arguments from a computation. More...
 
ODLA_API_EXPORT odla_status ODLA_API_CALL odla_GetArgFromComputationByIdx (const odla_computation computation, const odla_uint32 arg_idx, odla_value *arg_value)
 Get the #idx argument value from a computation. More...
 
ODLA_API_EXPORT odla_status ODLA_API_CALL odla_GetNumOfOutputsFromComputation (const odla_computation computation, odla_uint32 *num_outputs)
 Get the number of outputs from a computation. More...
 
ODLA_API_EXPORT odla_status ODLA_API_CALL odla_GetOutputFromComputationByIdx (const odla_computation computation, const odla_uint32 output_idx, odla_value *output_value)
 Get the #idx output value from a computation. More...
 
ODLA_API_EXPORT odla_status ODLA_API_CALL odla_DestroyComputation (odla_computation computation)
 Destroy a created computation. More...
 
ODLA_API_EXPORT odla_status ODLA_API_CALL odla_SetComputationItem (odla_computation computation, odla_item_type type, odla_item_value value)
 Set the computation with a property item. More...
 
ODLA_API_EXPORT odla_status ODLA_API_CALL odla_SetValueShapeInfo (odla_value value, odla_item_type type, odla_value_shape value_shape)
 Set the computation arguments shape info with a property item. More...
 
ODLA_API_EXPORT odla_status ODLA_API_CALL odla_SetInputValueInfo (odla_value value, odla_item_type type, odla_item_value value_input)
 Set the computation arguments shape info with a property item. More...
 
ODLA_API_EXPORT odla_status ODLA_API_CALL odla_SetRuntimeShape (odla_context context, odla_value value, odla_value_shape value_shape)
 Set the context runtime shapes to an odla_value. More...
 
ODLA_API_EXPORT odla_status ODLA_API_CALL odla_GetRuntimeShape (odla_context context, odla_value value, odla_value_shape *value_shape_ptr)
 Get the context runtime shapes. More...
 
ODLA_API_EXPORT odla_status ODLA_API_CALL odla_CreateConstantsArray (odla_constants_array *constants_array)
 Create a constants array object. More...
 
ODLA_API_EXPORT odla_status ODLA_API_CALL odla_LoadConstantsArray (const odla_char *file_name, odla_constants_array *constants_array)
 Load a constants array from the file system. More...
 
ODLA_API_EXPORT odla_status ODLA_API_CALL odla_StoreConstantsArray (const odla_char *file_name, const odla_constants_array constants_array)
 Store a constants array into the file system. More...
 
ODLA_API_EXPORT odla_status ODLA_API_CALL odla_DestroyConstantsArray (odla_constants_array constants_array)
 Destroy a created constants array object. More...
 
ODLA_API_EXPORT odla_status ODLA_API_CALL odla_LoadExecutable (odla_resource_location location, odla_device device, odla_executable *executable)
 Load an executable from the file system. More...
 
ODLA_API_EXPORT odla_status ODLA_API_CALL odla_StoreExecutable (odla_resource_location, odla_executable executable)
 Store an executable object into the file system. More...
 
ODLA_API_EXPORT odla_status ODLA_API_CALL odla_LaunchExecutable (odla_executable executable, odla_context context)
 Launch an executable. More...
 
ODLA_API_EXPORT odla_status ODLA_API_CALL odla_AsyncLaunchExecutable (const odla_executable executable, const odla_constants_array constants_array, const odla_context context, const odla_compute_mode mode, odla_device device)
 Asynchronously launch an executable. More...
 
ODLA_API_EXPORT odla_status ODLA_API_CALL odla_GetNumOfArgsFromExecutable (const odla_executable executable, odla_uint32 *num_args)
 Get the number of arguments from an Executable. More...
 
ODLA_API_EXPORT odla_status ODLA_API_CALL odla_GetArgFromExecutableByIdx (const odla_executable executable, const odla_uint32 arg_idx, odla_value *arg_value)
 Get the #idx argument value from an executable. More...
 
ODLA_API_EXPORT odla_status ODLA_API_CALL odla_GetNumOfOutputsFromExecutable (const odla_executable executable, odla_uint32 *num_outputs)
 Get the number of outputs from an executable. More...
 
ODLA_API_EXPORT odla_status ODLA_API_CALL odla_GetOutputFromExecutableByIdx (const odla_executable executable, const odla_uint32 output_idx, odla_value *output_value)
 Get the #idx output value from an executable. More...
 
ODLA_API_EXPORT odla_status ODLA_API_CALL odla_DestroyExecutable (odla_executable executable)
 Destroy a created executable. More...
 
ODLA_API_EXPORT odla_status ODLA_API_CALL odla_CreateContext (odla_context *context)
 Create a context object. More...
 
ODLA_API_EXPORT odla_status ODLA_API_CALL odla_SetContextItem (odla_context context, odla_item_type type, odla_item_value value)
 Set the context with a property item. More...
 
ODLA_API_EXPORT odla_status ODLA_API_CALL odla_DestroyContext (odla_context context)
 Destroy a created context. More...
 
ODLA_API_EXPORT odla_status ODLA_API_CALL odla_BindToArgument (odla_value value, const odla_void *data_ptr, odla_context context)
 Bind data to an argument. More...
 
ODLA_API_EXPORT odla_status ODLA_API_CALL odla_BindToArgumentById (const odla_value_id value_id, const odla_void *data_ptr, odla_context context)
 Bind data to an argument by id. More...
 
ODLA_API_EXPORT odla_status ODLA_API_CALL odla_BindValueToArgumentById (const odla_value_id value_id, odla_value data, odla_context context)
 
ODLA_API_EXPORT odla_status ODLA_API_CALL odla_BindToOutput (odla_value value, odla_void *data_ptr, odla_context context)
 Bind memory to an output value. More...
 
ODLA_API_EXPORT odla_status ODLA_API_CALL odla_BindToOutputById (const odla_value_id value_id, odla_void *data_ptr, odla_context context)
 Bind memory to an output value by id. More...
 
ODLA_API_EXPORT odla_status ODLA_API_CALL odla_BindValueToOutputById (const odla_value_id value_id, odla_value data, odla_context context)
 
ODLA_API_EXPORT odla_status ODLA_API_CALL odla_SetRuntimeValueType (odla_context context, odla_value value, odla_value_type value_type)
 
ODLA_API_EXPORT odla_status ODLA_API_CALL odla_GetRuntimeValueType (odla_context context, odla_value value, odla_value_type *value_type_ptr)
 Get the context runtime value type to an odla_value. More...
 
ODLA_API_EXPORT odla_status ODLA_API_CALL odla_GetRuntimeNumOfOutputs (odla_context context, odla_uint32 *num_output_ptr)
 Get the context runtime number of outputs. More...
 
ODLA_API_EXPORT odla_status ODLA_API_CALL odla_GetValueData (const odla_value value, odla_void *data_ptr, odla_context context)
 Get a value data. More...
 

Detailed Description

This file defines the ODLA compute related APIs.

Definition in file odla_compute.h.

Typedef Documentation

◆ odla_computation

typedef struct _odla_computation* odla_computation

Computation object.

Definition at line 100 of file odla_compute.h.

◆ odla_constants_array

typedef struct _odla_constants_array* odla_constants_array

Constants array object.

Definition at line 112 of file odla_compute.h.

◆ odla_context

typedef struct _odla_context* odla_context

Context object.

Definition at line 106 of file odla_compute.h.

◆ odla_executable

typedef struct _odla_executable* odla_executable

Executable object.

Definition at line 103 of file odla_compute.h.

◆ odla_item_value

typedef struct _odla_item_value* odla_item_value

Property item value object.

Definition at line 109 of file odla_compute.h.

Enumeration Type Documentation

◆ odla_bf16_mode

BF16 mode.

Definition at line 73 of file odla_compute.h.

73 {
74 BF16_DISABLE,
75 BF16_ACCURACY_MODE,
76 BF16_PERFORMACE_MODE,
77 BF16_AUTO_MODE,
odla_bf16_mode
BF16 mode.
Definition: odla_compute.h:73

◆ odla_compute_mode

Compute mode.

Definition at line 34 of file odla_compute.h.

34 {
35 ODLA_COMPUTE_DEFAULT,
36 ODLA_COMPUTE_INFERENCE,
37 ODLA_COMPUTE_TRAINING,
odla_compute_mode
Compute mode.
Definition: odla_compute.h:34

◆ odla_item_type

Property item type.

Definition at line 41 of file odla_compute.h.

41 {
42 ODLA_DYNAMIC_BATCH,
43 ODLA_MIN_BATCH_SIZE,
44 ODLA_MAX_BATCH_SIZE,
45 ODLA_OPT_BATCH_SIZE,
46 ODLA_RUN_BATCH_SIZE,
47 ODLA_DYNAMIC_SHAPE,
48 ODLA_MIN_SHAPE,
49 ODLA_MAX_SHAPE,
50 ODLA_OPT_SHAPE,
51 ODLA_DYNAMIC_VALUE,
52 ODLA_MIN_VALUE,
53 ODLA_MAX_VALUE,
54 ODLA_OPT_VALUE,
55 ODLA_BF16_MODE,
56 ODLA_FP16_MODE,
57 ODLA_USE_SIM_MODE,
58 ODLA_PROCESSOR_NUM,
59 ODLA_BATCHES_PER_STEP,
60 ODLA_USE_DATA_TYPE,
61 ODLA_LOAD_ENGINE_MODE,
62 ODLA_USE_DLA_CORE,
63 ODLA_QUANT_TABLE,
64 ODLA_QUANT_TABLE_SIZE,
65 ODLA_AGGREGATE_OPS,
66 ODLA_ENABLE_ENGINE_CACHE,
67 ODLA_CACHE_DIR,
68 ODLA_ASYNC_CALLBACK_FUNC,
69 ODLA_ASYNC_CALLBACK_ARG,
odla_item_type
Property item type.
Definition: odla_compute.h:41

◆ odla_resource_location_type

Type of resource location.

Definition at line 81 of file odla_compute.h.

81 {
82 ODLA_LOCATION_PATH, // string of file path
83 ODLA_LOCATION_MEMORY, // memory address of a buffer
84 ODLA_LOCATION_URI, // string of URI
odla_resource_location_type
Type of resource location.
Definition: odla_compute.h:81

Function Documentation

◆ odla_AsyncExecuteComputation()

ODLA_API_EXPORT odla_status ODLA_API_CALL odla_AsyncExecuteComputation ( const odla_computation  computation,
const odla_context  context,
const odla_compute_mode  mode,
odla_device  device 
)

Asynchronously execute a computation.

Parameters
computationthe computation object
contextthe context object
modethe compute mode
devicethe device object
Returns
odla_status

◆ odla_AsyncLaunchExecutable()

ODLA_API_EXPORT odla_status ODLA_API_CALL odla_AsyncLaunchExecutable ( const odla_executable  executable,
const odla_constants_array  constants_array,
const odla_context  context,
const odla_compute_mode  mode,
odla_device  device 
)

Asynchronously launch an executable.

Parameters
executablethe executable object
constants_arraythe constants array object (can be NULL)
contextthe context object
modethe compute mode
devicethe device object
Returns
odla_status

◆ odla_BindToArgument()

ODLA_API_EXPORT odla_status ODLA_API_CALL odla_BindToArgument ( odla_value  value,
const odla_void data_ptr,
odla_context  context 
)

Bind data to an argument.

Bind input data to an argument of computation. An error will be returned if value is not an argument.

Parameters
valuethe argument
data_ptrthe pointer to the host memory
contextthe context object
Returns
odla_status

◆ odla_BindToArgumentById()

ODLA_API_EXPORT odla_status ODLA_API_CALL odla_BindToArgumentById ( const odla_value_id  value_id,
const odla_void data_ptr,
odla_context  context 
)

Bind data to an argument by id.

Bind input data to an argument of computation. An error will be returned if the value specified by value_id is not an argument.

Parameters
value_idthe value id for the argument
data_ptrthe pointer to the host memory
contextthe context object
Returns
odla_status

◆ odla_BindToOutput()

ODLA_API_EXPORT odla_status ODLA_API_CALL odla_BindToOutput ( odla_value  value,
odla_void data_ptr,
odla_context  context 
)

Bind memory to an output value.

Bind a memory buffer to an output of computation. An error will be returned if the value specified by value_id is not set as output value.

Parameters
valuethe output value
data_ptrthe pointer to the host data buffer
contextthe context object
Returns
odla_status

◆ odla_BindToOutputById()

ODLA_API_EXPORT odla_status ODLA_API_CALL odla_BindToOutputById ( const odla_value_id  value_id,
odla_void data_ptr,
odla_context  context 
)

Bind memory to an output value by id.

Bind a memory buffer to an output of computation by id. An error will be returned if the value specified by value_id is not set as output value.

Parameters
value_idthe id for the output value
data_ptrthe pointer to the host data buffer
contextthe context object
Returns
odla_status

◆ odla_CompileComputation()

ODLA_API_EXPORT odla_status ODLA_API_CALL odla_CompileComputation ( const odla_computation  computation,
const odla_device  device,
odla_executable executable 
)

Compile a computation object into executable.

Parameters
computationthe computation object
excecutablethe pointer to the compiled excecutable object
Returns
odla_status

◆ odla_CreateComputation()

ODLA_API_EXPORT odla_status ODLA_API_CALL odla_CreateComputation ( odla_computation computation)

Create a computation object.

Parameters
computationthe pointer to the created computation object
Returns
odla_status

◆ odla_CreateConstantsArray()

ODLA_API_EXPORT odla_status ODLA_API_CALL odla_CreateConstantsArray ( odla_constants_array constants_array)

Create a constants array object.

Parameters
constants_arraythe pointer to the created constants array object
Returns
odla_status

◆ odla_CreateContext()

ODLA_API_EXPORT odla_status ODLA_API_CALL odla_CreateContext ( odla_context context)

Create a context object.

Parameters
contextthe pointer to the created context object
Returns
odla_status

◆ odla_DestroyComputation()

ODLA_API_EXPORT odla_status ODLA_API_CALL odla_DestroyComputation ( odla_computation  computation)

Destroy a created computation.

Parameters
computationthe computation object
Returns
odla_status

◆ odla_DestroyConstantsArray()

ODLA_API_EXPORT odla_status ODLA_API_CALL odla_DestroyConstantsArray ( odla_constants_array  constants_array)

Destroy a created constants array object.

Parameters
constants_arraythe constants array object
Returns
odla_status

◆ odla_DestroyContext()

ODLA_API_EXPORT odla_status ODLA_API_CALL odla_DestroyContext ( odla_context  context)

Destroy a created context.

Parameters
contextthe context object
Returns
odla_status

◆ odla_DestroyExecutable()

ODLA_API_EXPORT odla_status ODLA_API_CALL odla_DestroyExecutable ( odla_executable  executable)

Destroy a created executable.

Parameters
executablethe executable object
Returns
odla_status

◆ odla_DifferentiateComputation()

ODLA_API_EXPORT odla_status ODLA_API_CALL odla_DifferentiateComputation ( odla_computation  computation)

Differentiate a computation.

Parameters
computationthe computation object
Returns
odla_status

◆ odla_ExecuteComputation()

ODLA_API_EXPORT odla_status ODLA_API_CALL odla_ExecuteComputation ( const odla_computation  computation,
const odla_context  context,
const odla_compute_mode  mode,
odla_device  device 
)

Execute a computation.

Parameters
computationthe computation object
contextthe context object
modethe compute mode
devicethe device object
Returns
odla_status

◆ odla_GetArgFromComputationByIdx()

ODLA_API_EXPORT odla_status ODLA_API_CALL odla_GetArgFromComputationByIdx ( const odla_computation  computation,
const odla_uint32  arg_idx,
odla_value arg_value 
)

Get the #idx argument value from a computation.

Parameters
computationthe computation object
arg_idxthe index of argument
arg_valuethe pointer to the retrieved argument value
Returns
odla_status

◆ odla_GetArgFromExecutableByIdx()

ODLA_API_EXPORT odla_status ODLA_API_CALL odla_GetArgFromExecutableByIdx ( const odla_executable  executable,
const odla_uint32  arg_idx,
odla_value arg_value 
)

Get the #idx argument value from an executable.

Parameters
executablethe executable object
arg_idxthe index of argument
arg_valuethe pointer to the retrieved argument value
Returns
odla_status

◆ odla_GetNumOfArgsFromComputation()

ODLA_API_EXPORT odla_status ODLA_API_CALL odla_GetNumOfArgsFromComputation ( const odla_computation  computation,
odla_uint32 num_args 
)

Get the number of arguments from a computation.

Parameters
computationthe computation object
num_argsthe pointer to the retrieved number of args
Returns
odla_status

◆ odla_GetNumOfArgsFromExecutable()

ODLA_API_EXPORT odla_status ODLA_API_CALL odla_GetNumOfArgsFromExecutable ( const odla_executable  executable,
odla_uint32 num_args 
)

Get the number of arguments from an Executable.

Parameters
executablethe executable object
num_argsthe pointer to the retrieved number of args
Returns
odla_status

◆ odla_GetNumOfOutputsFromComputation()

ODLA_API_EXPORT odla_status ODLA_API_CALL odla_GetNumOfOutputsFromComputation ( const odla_computation  computation,
odla_uint32 num_outputs 
)

Get the number of outputs from a computation.

Parameters
computationthe computation object
num_outputsthe pointer to the retrieved number of outputs
Returns
odla_status

◆ odla_GetNumOfOutputsFromExecutable()

ODLA_API_EXPORT odla_status ODLA_API_CALL odla_GetNumOfOutputsFromExecutable ( const odla_executable  executable,
odla_uint32 num_outputs 
)

Get the number of outputs from an executable.

Parameters
executablethe executable object
num_outputsthe pointer to the retrieved number of outputs
Returns
odla_status

◆ odla_GetOutputFromComputationByIdx()

ODLA_API_EXPORT odla_status ODLA_API_CALL odla_GetOutputFromComputationByIdx ( const odla_computation  computation,
const odla_uint32  output_idx,
odla_value output_value 
)

Get the #idx output value from a computation.

Parameters
computationthe computation object
output_idxthe index of output
output_valuethe pointer to the retrieved output value
Returns
odla_status

◆ odla_GetOutputFromExecutableByIdx()

ODLA_API_EXPORT odla_status ODLA_API_CALL odla_GetOutputFromExecutableByIdx ( const odla_executable  executable,
const odla_uint32  output_idx,
odla_value output_value 
)

Get the #idx output value from an executable.

Parameters
executablethe executable object
output_idxthe index of output
output_valuethe pointer to the retrieved output value
Returns
odla_status

◆ odla_GetRuntimeNumOfOutputs()

ODLA_API_EXPORT odla_status ODLA_API_CALL odla_GetRuntimeNumOfOutputs ( odla_context  context,
odla_uint32 num_output_ptr 
)

Get the context runtime number of outputs.

Parameters
contextthe context object
num_output_ptrthe pointer to hold the number of outputs
Returns
odla_status

◆ odla_GetRuntimeShape()

ODLA_API_EXPORT odla_status ODLA_API_CALL odla_GetRuntimeShape ( odla_context  context,
odla_value  value,
odla_value_shape value_shape_ptr 
)

Get the context runtime shapes.

Parameters
contextthe context object
valuethe property odla value
value_shape_ptrthe pointer to the value_shape
Returns
odla_status

◆ odla_GetRuntimeValueType()

ODLA_API_EXPORT odla_status ODLA_API_CALL odla_GetRuntimeValueType ( odla_context  context,
odla_value  value,
odla_value_type value_type_ptr 
)

Get the context runtime value type to an odla_value.

Parameters
contextthe context object
valuethe property odla value
value_type_ptrthe odla_value_type object
Returns
odla_status

◆ odla_GetValueData()

ODLA_API_EXPORT odla_status ODLA_API_CALL odla_GetValueData ( const odla_value  value,
odla_void data_ptr,
odla_context  context 
)

Get a value data.

Parameters
valuethe value
data_ptrthe pointer to the retrieved data buffer
contextthe context associated with the value data
Returns
odla_status

◆ odla_LaunchExecutable()

ODLA_API_EXPORT odla_status ODLA_API_CALL odla_LaunchExecutable ( odla_executable  executable,
odla_context  context 
)

Launch an executable.

Parameters
executablethe executable object
contextthe context object
Returns
odla_status

◆ odla_LoadComputation()

ODLA_API_EXPORT odla_status ODLA_API_CALL odla_LoadComputation ( odla_resource_location  location,
odla_computation computation 
)

Load a computation from the file system.

Parameters
locationthe location of the computation file
computationthe pointer to the loaded computation object
Returns
odla_status

◆ odla_LoadConstantsArray()

ODLA_API_EXPORT odla_status ODLA_API_CALL odla_LoadConstantsArray ( const odla_char file_name,
odla_constants_array constants_array 
)

Load a constants array from the file system.

Parameters
file_namethe file name
constants_arraythe pointer to the loaded constants array object
Returns
odla_status

◆ odla_LoadExecutable()

ODLA_API_EXPORT odla_status ODLA_API_CALL odla_LoadExecutable ( odla_resource_location  location,
odla_device  device,
odla_executable executable 
)

Load an executable from the file system.

Parameters
file_namethe file name
devicethe device object
executablethe pointer to the loaded executable object
contextthe pointer to the loaded context object
computationthe pointer to the loaded computation object
Returns
odla_status

◆ odla_SetComputationItem()

ODLA_API_EXPORT odla_status ODLA_API_CALL odla_SetComputationItem ( odla_computation  computation,
odla_item_type  type,
odla_item_value  value 
)

Set the computation with a property item.

Parameters
computationthe computation object
typethe property item type
valuethe property item value
Returns
odla_status

◆ odla_SetContextItem()

ODLA_API_EXPORT odla_status ODLA_API_CALL odla_SetContextItem ( odla_context  context,
odla_item_type  type,
odla_item_value  value 
)

Set the context with a property item.

Parameters
contextthe context object
typethe property item type
valuethe property item value
Returns
odla_status

◆ odla_SetInputValueInfo()

ODLA_API_EXPORT odla_status ODLA_API_CALL odla_SetInputValueInfo ( odla_value  value,
odla_item_type  type,
odla_item_value  value_input 
)

Set the computation arguments shape info with a property item.

Parameters
valuethe odla_value
typethe property item type
value_inputthe property value_shape
Returns
odla_status

◆ odla_SetRuntimeShape()

ODLA_API_EXPORT odla_status ODLA_API_CALL odla_SetRuntimeShape ( odla_context  context,
odla_value  value,
odla_value_shape  value_shape 
)

Set the context runtime shapes to an odla_value.

Parameters
contextthe context object
valuethe property odla value
value_shapethe property value_shape
Returns
odla_status

◆ odla_SetValueShapeInfo()

ODLA_API_EXPORT odla_status ODLA_API_CALL odla_SetValueShapeInfo ( odla_value  value,
odla_item_type  type,
odla_value_shape  value_shape 
)

Set the computation arguments shape info with a property item.

Parameters
valuethe odla_value
typethe property item type
value_shapethe property value_shape
Returns
odla_status

◆ odla_StoreComputation()

ODLA_API_EXPORT odla_status ODLA_API_CALL odla_StoreComputation ( odla_resource_location  location,
odla_computation  computation 
)

Store a computation object into the file system.

Parameters
locationthe location of the computation file
computationthe computation object
Returns
odla_status

◆ odla_StoreConstantsArray()

ODLA_API_EXPORT odla_status ODLA_API_CALL odla_StoreConstantsArray ( const odla_char file_name,
const odla_constants_array  constants_array 
)

Store a constants array into the file system.

Parameters
file_namethe file name
constants_arraythe constants array object
Returns
odla_status

◆ odla_StoreExecutable()

ODLA_API_EXPORT odla_status ODLA_API_CALL odla_StoreExecutable ( odla_resource_location  ,
odla_executable  executable 
)

Store an executable object into the file system.

Parameters
locationthe location of the executable
executablethe executable object
Returns
odla_status