已合并
去除代码中显式的CheckLogLevel调用,改为使用OP_LOGD正式日志接口 #994
liu-wei创建于 6月16日
去除代码中显式的CheckLogLevel调用,改为使用OP_LOGD正式日志接口 #994
已合并
共 2 个文件变更+8-6
| @@ -81,7 +81,7 @@ function(add_opbase_modules) | |||
| 81 | 81 | ||
| 82 | if(OPS_BASE_UTIL_SRC) | 82 | if(OPS_BASE_UTIL_SRC) |
| 83 | add_library(opbase_util_objs OBJECT ${OPS_BASE_UTIL_SRC}) | 83 | add_library(opbase_util_objs OBJECT ${OPS_BASE_UTIL_SRC}) |
| 84 | - target_include_directories(opbase_util_objs PRIVATE ${OP_TILING_INCLUDE}) | 84 | + target_include_directories(opbase_util_objs PRIVATE ${OP_TILING_INCLUDE} ${ASCEND_DIR}/pkg_inc) |
| 85 | target_compile_options(opbase_util_objs | 85 | target_compile_options(opbase_util_objs |
| 86 | PRIVATE | 86 | PRIVATE |
| 87 | $<$<NOT:$<BOOL:${ENABLE_TEST}>>:-DDISABLE_COMPILE_V1> -Dgoogle=ascend_private | 87 | $<$<NOT:$<BOOL:${ENABLE_TEST}>>:-DDISABLE_COMPILE_V1> -Dgoogle=ascend_private |
| @@ -127,10 +127,11 @@ protected: | |||
| 127 | // 8、Dump Tiling数据 | 127 | // 8、Dump Tiling数据 |
| 128 | virtual void DumpTilingInfo() | 128 | virtual void DumpTilingInfo() |
| 129 | { | 129 | { |
| 130 | - int32_t enable = CheckLogLevel(static_cast<int32_t>(OP), DLOG_DEBUG); | 130 | + OP_LOGD(context_, "%ld", DefaultTilingInfoDump()); |
| 131 | - if (enable != 1) { | 131 | + } |
| 132 | - return; | 132 | + |
| 133 | - } | 133 | + int64_t DefaultTilingInfoDump() |
| 134 | + { | ||
| 134 | auto buf = (uint32_t*)context_->GetRawTilingData()->GetData(); | 135 | auto buf = (uint32_t*)context_->GetRawTilingData()->GetData(); |
| 135 | auto bufLen = context_->GetRawTilingData()->GetDataSize(); | 136 | auto bufLen = context_->GetRawTilingData()->GetDataSize(); |
| 136 | std::ostringstream oss; | 137 | std::ostringstream oss; |
| @@ -144,6 +145,7 @@ protected: | |||
| 144 | } | 145 | } |
| 145 | } | 146 | } |
| 146 | OP_LOGD(context_, "%s", oss.str().c_str()); | 147 | OP_LOGD(context_, "%s", oss.str().c_str()); |
| 148 | + return 0; | ||
| 147 | } | 149 | } |
| 148 | 150 | ||
| 149 | static uint32_t CalcTschBlockDim(uint32_t sliceNum, uint32_t aicCoreNum, uint32_t aivCoreNum) | 151 | static uint32_t CalcTschBlockDim(uint32_t sliceNum, uint32_t aicCoreNum, uint32_t aivCoreNum) |
| @@ -228,4 +230,4 @@ protected: | |||
| 228 | 230 | ||
| 229 | } // namespace OpTiling | 231 | } // namespace OpTiling |
| 230 | } // namespace Cv | 232 | } // namespace Cv |
| 231 | -} // namespace Ops | 233 | +} // namespace Ops |