提交 7cfbd454 编写于 作者: 李寅

Merge branch 'depthwise-bug' into 'master'

Fix depthwise benchmark bug and add abort logic when there is no op registered.

See merge request !63
......@@ -23,7 +23,9 @@ SimpleNet::SimpleNet(const std::shared_ptr<const NetDef>& net_def,
std::unique_ptr<OperatorBase> op{nullptr};
OperatorDef temp_def(operator_def);
op = CreateOperator(temp_def, ws, type);
operators_.emplace_back(std::move(op));
if (!op) {
operators_.emplace_back(std::move(op));
}
}
}
bool SimpleNet::Run() {
......
......@@ -26,8 +26,7 @@ class Registry {
unique_ptr<ObjectType> Create(const SrcType& key, Args... args) {
if (registry_.count(key) == 0) {
VLOG(2) << "Key not registered: " << key;
return nullptr;
LOG(FATAL) << "Key not registered: " << key;
}
return registry_[key](args...);
}
......
......@@ -25,7 +25,7 @@ static void DepthwiseConv2d(int iters,
mace::testing::StopTiming();
OpsTestNet net;
OpDefBuilder("DepthwiseConv2D", "DepthwiseConv2DTest")
OpDefBuilder("DepthwiseConv2d", "DepthwiseConv2dTest")
.Input("Input")
.Input("Filter")
.Input("Bias")
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册