提交 71141ac6 编写于 作者: L liuqi

Add more log for locating out of range error of OpenCL.

上级 50cf1737
......@@ -275,6 +275,17 @@ std::string MemoryOptimizer::DebugInfo() const {
sstream << "\n";
}
for (auto tuple : tensor_mem_map_) {
sstream << tuple.first << ": " << tuple.second.mem_id << ", ";
if (mem_blocks_[tuple.second.mem_id].mem_type() == MemoryType::GPU_IMAGE) {
sstream << "[" << mem_blocks_[tuple.second.mem_id].x() << ", "
<< mem_blocks_[tuple.second.mem_id].y() << "]";
} else {
sstream << "[" << mem_blocks_[tuple.second.mem_id].x() << "]";
}
sstream << "\n";
}
return sstream.str();
}
......
......@@ -294,7 +294,7 @@ MaceStatus NetDefAdapter::AdaptNetDef(
}
#endif // MACE_ENABLE_OPENCL
VLOG(1) << DebugString(target_net_def);
VLOG(3) << DebugString(target_net_def);
return MaceStatus::MACE_SUCCESS;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册