#include <typeindex>
#include "logging.h"
-#include "misc/EnvVar.h"
+#include "util/config/ConfigManager.h"
#include "backend/BackendManager.h"
#include "backend/interface/IStageGenerator.h"
{
_backend_manager = std::make_shared<backend::BackendManager>(operands);
- const auto &backend_all_str =
- ::nnfw::misc::EnvVar{std::string("OP_BACKEND_ALLOPS")}.asString("none");
+ const auto backend_all_str =
+ config::ConfigManager::instance().get<std::string>("OP_BACKEND_ALLOPS");
if (backend_all_str.compare("none") != 0)
{
VERBOSE(BackendResolver) << "Use backend for all ops: " << backend_all_str << std::endl;
if (IsNnApi) \
{ \
const auto &backend_str = \
- ::nnfw::misc::EnvVar{std::string("OP_BACKEND_") + #NnApiName}.asString("acl_cl"); \
+ config::ConfigManager::instance().get<std::string>("OP_BACKEND_" #NnApiName); \
auto backend = _backend_manager->get(backend_str); \
VERBOSE(BackendResolver) << "backend for " << #NnApiName << ": " << backend_str << std::endl; \
_gen_map[typeid(graph::operation::InternalName)] = backend; \
#include "dumper/dot/DotDumper.h"
#include "linear/Linear.h"
-#include "misc/EnvVar.h"
+#include "util/config/ConfigManager.h"
namespace neurun
{
// dump graph to .dot
// TODO : These can be moved to another place.
- const auto &dotdump_env = ::nnfw::misc::EnvVar{"GRAPH_DOT_DUMP"}.asInt(0);
+ const auto dotdump_env = config::ConfigManager::instance().get<int>("GRAPH_DOT_DUMP");
if (dotdump_env)
{
neurun::dumper::dot::DotDumper dot_dumper(graph);
// Name | Type | Default
CONFIG(GRAPH_DOT_DUMP , int , "0")
-CONFIG(BACKENDS , std::string , "cpu")
-CONFIG(OP_BACKEND_ALLOPS , std::string , "cpu")
+CONFIG(BACKENDS , std::string , "cpu;acl_cl")
+CONFIG(OP_BACKEND_ALLOPS , std::string , "none")
// Auto-generate all operations
#define OP(InternalName, IsNnApi, NnApiName) \
- CONFIG(OP_BACKEND_ ## NnApiName, std::string, std::string{"cpu"})
+ CONFIG(OP_BACKEND_ ## NnApiName, std::string, "acl_cl")
#include "graph/operation/Op.lst"
#undef OP