#include <dlpack/dlpack.h>
#include <mxnet/c_api.h>
#include <stdint.h>
#include <stddef.h>
Go to the source code of this file.
|
| union | MXNetValue |
| | Union type of values being passed through API and function calls. More...
|
| |
| struct | MXNetByteArray |
| | Byte array type used to pass in byte array When kBytes is used as data type. More...
|
| |
|
| enum | MXNetTypeCode {
kHandle = 3U,
kNull = 4U,
kMXNetType = 5U,
kMXNetContext = 6U,
kArrayHandle = 7U,
kObjectHandle = 8U,
kModuleHandle = 9U,
kFuncHandle = 10U,
kStr = 11U,
kBytes = 12U,
kNDArrayContainer = 13U,
kNDArrayHandle = 14U,
kExtBegin = 15U,
kNNVMFirst = 16U,
kNNVMLast = 20U,
kExtReserveEnd = 64U,
kExtEnd = 128U,
kCustomBegin = 129U
} |
| | The type code in MXNetType. More...
|
| |
◆ MXNetFunctionHandle
Handle to packed function handle.
◆ MXNetObjectHandle
◆ MXNetTypeCode
The type code in MXNetType.
- Note
- MXNetType is used in two places.
| Enumerator |
|---|
| kHandle | |
| kNull | |
| kMXNetType | |
| kMXNetContext | |
| kArrayHandle | |
| kObjectHandle | |
| kModuleHandle | |
| kFuncHandle | |
| kStr | |
| kBytes | |
| kNDArrayContainer | |
| kNDArrayHandle | |
| kExtBegin | |
| kNNVMFirst | |
| kNNVMLast | |
| kExtReserveEnd | |
| kExtEnd | |
| kCustomBegin | |
◆ MXNetFuncCall()
Call a Packed MXNet Function.
- Parameters
-
| func | node handle of the function. |
| arg_values | The arguments |
| type_codes | The type codes of the arguments |
| num_args | Number of arguments. |
| ret_val | The return value. |
| ret_type_code | the type code of return value. |
- Returns
- 0 when success, -1 when failure happens
- Note
- MXNet calls always exchanges with type bits=64, lanes=1
-
API calls always exchanges with type bits=64, lanes=1 If API call returns container handles (e.g. FunctionHandle) these handles should be managed by the front-end. The front-end need to call free function (e.g. MXNetFuncFree) to free these handles.
◆ MXNetFuncFree()
Free the function when it is no longer needed.
- Parameters
-
- Returns
- 0 when success, -1 when failure happens
◆ MXNetFuncGetGlobal()
Get a global function.
- Parameters
-
| name | The name of the function. |
| out | the result function pointer, NULL if it does not exist. |
- Note
- The function handle of global function is managed by MXNet runtime, So MXNetFuncFree is should not be called when it get deleted.
◆ MXNetFuncListGlobalNames()
| MXNET_DLL int MXNetFuncListGlobalNames |
( |
int * |
out_size, |
|
|
const char *** |
out_array |
|
) |
| |
List all the globally registered function name.
- Parameters
-
| out_size | The number of functions |
| out_array | The array of function names. |
- Returns
- 0 when success, -1 when failure happens
◆ MXNetObjectFree()
Free the object.
- Parameters
-
- Note
- Internally we decrease the reference counter of the object. The object will be freed when every reference to the object are removed.
- Returns
- 0 when success, -1 when failure happens