From d4b92ac65c441806e577f33dbd550f1fa098ed04 Mon Sep 17 00:00:00 2001 From: Pedro Larroy Date: Fri, 12 Apr 2019 12:43:35 -0700 Subject: [PATCH 1/6] Add additional ctors to NodeEntry --- nnvm/include/nnvm/node.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/nnvm/include/nnvm/node.h b/nnvm/include/nnvm/node.h index 4f0cb523729b..e4bf8f32ed95 100644 --- a/nnvm/include/nnvm/node.h +++ b/nnvm/include/nnvm/node.h @@ -56,8 +56,14 @@ struct NodeEntry { version(version) {} + NodeEntry(NodePtr node): + node(std::move(node)), + index(), + version() + {} + NodeEntry(): - node(), + node(std::make_shared()), index(), version() {} From 82584af14188234b6dabef5484a02fbb4b205019 Mon Sep 17 00:00:00 2001 From: Pedro Larroy Date: Sat, 13 Apr 2019 01:58:33 +0000 Subject: [PATCH 2/6] Fix --- nnvm/include/nnvm/node.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nnvm/include/nnvm/node.h b/nnvm/include/nnvm/node.h index e4bf8f32ed95..0c41c005e189 100644 --- a/nnvm/include/nnvm/node.h +++ b/nnvm/include/nnvm/node.h @@ -63,7 +63,7 @@ struct NodeEntry { {} NodeEntry(): - node(std::make_shared()), + node(nullptr), index(), version() {} From 3e244d496689b8a96dfb7fea30b5242492aacd8f Mon Sep 17 00:00:00 2001 From: Pedro Larroy Date: Sat, 13 Apr 2019 02:01:18 +0000 Subject: [PATCH 3/6] update dmlc-core --- 3rdparty/dmlc-core | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/3rdparty/dmlc-core b/3rdparty/dmlc-core index 2b5b1ba9c110..82bf4c2e2af3 160000 --- a/3rdparty/dmlc-core +++ b/3rdparty/dmlc-core @@ -1 +1 @@ -Subproject commit 2b5b1ba9c1103f438d164aca32da7cffd8cd48e8 +Subproject commit 82bf4c2e2af312b3d52513aa727483803a2f8734 From 275161e04443da011f4078bf76b5d87c0e0c8917 Mon Sep 17 00:00:00 2001 From: Pedro Larroy Date: Mon, 15 Apr 2019 22:59:28 +0000 Subject: [PATCH 4/6] update dmlc-core --- 3rdparty/dmlc-core | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/3rdparty/dmlc-core b/3rdparty/dmlc-core index 82bf4c2e2af3..3ffea8694adf 160000 --- a/3rdparty/dmlc-core +++ b/3rdparty/dmlc-core @@ -1 +1 @@ -Subproject commit 82bf4c2e2af312b3d52513aa727483803a2f8734 +Subproject commit 3ffea8694adf9c0363f9abbf162dc0e4a45b22c5 From f4ca10c231953f13a8cef82d9855e5d9bf043b9f Mon Sep 17 00:00:00 2001 From: Pedro Larroy Date: Mon, 15 Apr 2019 23:00:30 +0000 Subject: [PATCH 5/6] Add note about empty gradients and NodeEntry default ctor --- nnvm/include/nnvm/node.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nnvm/include/nnvm/node.h b/nnvm/include/nnvm/node.h index 0c41c005e189..f98d6bf99c4d 100644 --- a/nnvm/include/nnvm/node.h +++ b/nnvm/include/nnvm/node.h @@ -62,6 +62,10 @@ struct NodeEntry { version() {} + /** + * MXNet assumes that a node with a null ptr doesn't have a gradient attached. Don't change this + * constructor. + */ NodeEntry(): node(nullptr), index(), From 1acf86bbd0809ebfe736ed045345719c24b7acb0 Mon Sep 17 00:00:00 2001 From: Pedro Larroy Date: Tue, 16 Apr 2019 15:29:56 -0700 Subject: [PATCH 6/6] Mark NodeEntry ctor as explicit --- nnvm/include/nnvm/node.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nnvm/include/nnvm/node.h b/nnvm/include/nnvm/node.h index f98d6bf99c4d..deac193c5fe9 100644 --- a/nnvm/include/nnvm/node.h +++ b/nnvm/include/nnvm/node.h @@ -56,7 +56,7 @@ struct NodeEntry { version(version) {} - NodeEntry(NodePtr node): + explicit NodeEntry(NodePtr node): node(std::move(node)), index(), version()