🌐
English
Inference Device API#
The Neural Processing Unit (NPU) module of an edge chipset delivers accelerated AI computing performance. Oasis utilizes model files that have been converted from standard inference model formats (such as TensorFlow, PyTorch, or ONNX) using the SDK provided by the respective chipset manufacturer.
Header File#
OasisInference.h
Functions#
int32_t
createInferenceEngine
(
key_value_map_t &
parameters
)
OasisInference.h
Initializes the inference device. Multiple model files can be loaded depending on the chipset.
Parameters
parameters
The key-value map required for inference device initialization.
Return Value
- 0: Success
- -1: Failure
The key-value map that can be passed as a parameter to the oasis::createInferenceEngine function is as follows:
Key
Default
M
Description
model-path
○
The file path to the inference device model.
void
destroyAllInferenceEngines
(
)
OasisInference.h
Removes all inference devices.
Examples#
The following is an example of creating an inference device after calling oasis::initialize:
oasis::key_value_map_t parameters;
parameters["model-path"] = "/mnt/sd/model.nef";
oasis::createInferenceEngine(parameters);