提交 b7572146 编写于 作者: M Megvii Engine Team

fix(megbrain): make debug env take effect at opt build

GitOrigin-RevId: 8066dc77e85702d3966420e839c4b437b9f16308
上级 5012d8d9
......@@ -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) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册