Full sync of fbcode to fbobjc/fbandroid
Summary:
running ##xplat/caffe2/fb_sync.sh##.
Also add two new core sources to the BUCK file, and add ##createSharedBuffer## to NNPACKConvOp.
Reviewed By: ajtulloch
Differential Revision: D5373061
fbshipit-source-id: c030b2629d2715e1d2776c98715f57e2650922c9
diff --git a/caffe2/core/net.cc b/caffe2/core/net.cc
index e97f167..ea05f63 100644
--- a/caffe2/core/net.cc
+++ b/caffe2/core/net.cc
@@ -81,7 +81,7 @@
}
unique_ptr<NetBase> CreateNet(const NetDef& net_def, Workspace* ws) {
- const auto tmp_net_def = std::make_shared<const NetDef>(net_def);
+ std::shared_ptr<NetDef> tmp_net_def(new NetDef(net_def));
return CreateNet(tmp_net_def, ws);
}
diff --git a/caffe2/core/workspace.cc b/caffe2/core/workspace.cc
index b44b49b..eff10cc 100644
--- a/caffe2/core/workspace.cc
+++ b/caffe2/core/workspace.cc
@@ -136,7 +136,7 @@
}
NetBase* Workspace::CreateNet(const NetDef& net_def, bool overwrite) {
- const auto tmp_net_def = std::make_shared<const NetDef>(net_def);
+ std::shared_ptr<NetDef> tmp_net_def(new NetDef(net_def));
return CreateNet(tmp_net_def, overwrite);
}