From b7572146626fa8cad2e3b0243b910a10a4ba3eb5 Mon Sep 17 00:00:00 2001 From: Megvii Engine Team Date: Wed, 11 Jan 2023 20:21:16 +0800 Subject: [PATCH] fix(megbrain): make debug env take effect at opt build GitOrigin-RevId: 8066dc77e85702d3966420e839c4b437b9f16308 --- src/core/impl/comp_node_env.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/impl/comp_node_env.cpp b/src/core/impl/comp_node_env.cpp index 748317acb..312011411 100644 --- a/src/core/impl/comp_node_env.cpp +++ b/src/core/impl/comp_node_env.cpp @@ -92,9 +92,9 @@ MegDNNHandle::MegDNNHandle(const CompNodeEnv& env) { mgb_assert(init); int level = sm_default_dbg_level; - if (auto set = MGB_GETENV("MGB_USE_MEGDNN_DBG")) { + if (auto set = ::std::getenv(ssprintf("%cGB_USE_%cEGDNN_DBG", 'M', 'M').c_str())) { level = std::stol(set); - mgb_log_warn("use megdnn handle with debug level: %d", level); + mgb_log_warn("init dnn handle with debug level: %d", level); } // handle may have been implemented when device type is cadence. if (!m_megdnn_handle) { -- GitLab