`nnpackage-run` (in short, `nnpkg-run`) uses `nnfw_session` from nnfw APIs.
It uses GeneralConfigSource. It means we need to set configuration using nnfw APIs.
Thus, it reads from environment var and set default backends.
Signed-off-by: Sanggyu Lee <sg5.lee@samsung.com>
nnfw_session *session = nullptr;
NNPR_ENSURE_STATUS(nnfw_create_session(&session));
+ char *default_backend = std::getenv("OP_BACKEND_ALLOPS");
+ if (default_backend)
+ NNPR_ENSURE_STATUS(nnfw_set_default_backend(session, default_backend));
NNPR_ENSURE_STATUS(nnfw_load_model_from_file(session, nnpackage_path.c_str()));
uint32_t num_inputs;