Save backend dlopen handle in map member variable
It uses to avoid warning by handle lost without dlclose(), but it will be used to other purpose later
Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
loadObjectFromPlugin(stage_gen, std::string("allocate_StageGenerator"), handle, operands,
tensor_builder);
_gen_map[config->id()] = {config, stage_gen};
+
+ // Save backend handle (avoid warning by handle lost without dlclose())
+ _handle_map.insert({backend, handle});
}
BackendManager::BackendManager(const neurun::model::operand::Set &operands)
private:
std::map<std::string, Backend> _gen_map;
+ std::map<std::string, void *> _handle_map;
/**
* @brief Allocate an object of a class of a plugin by loading a plugin function, that does
* allocation, and calling it