tvm-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tqc...@apache.org
Subject [incubator-tvm] branch master updated: fix to skip node not in graph. (#5238)
Date Mon, 06 Apr 2020 15:42:12 GMT
This is an automated email from the ASF dual-hosted git repository.

tqchen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-tvm.git


The following commit(s) were added to refs/heads/master by this push:
     new 3e8c7be  fix to skip node not in graph. (#5238)
3e8c7be is described below

commit 3e8c7beb9248606fe6767ef455adb2ccb8f9368b
Author: chinakook <chinakook@msn.com>
AuthorDate: Mon Apr 6 23:42:01 2020 +0800

    fix to skip node not in graph. (#5238)
    
    fix to skip node not in graph because some network cannot be hybridized with some var
unused.
---
 nnvm/src/core/graph.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/nnvm/src/core/graph.cc b/nnvm/src/core/graph.cc
index 8930e49..c3ae60e 100644
--- a/nnvm/src/core/graph.cc
+++ b/nnvm/src/core/graph.cc
@@ -98,7 +98,7 @@ IndexedGraph::IndexedGraph(const Graph &g) {
       // input entries
       for (const auto& e : n->inputs) {
         auto it = node2index_.find(e.node.get());
-        CHECK(it != node2index_.end() && it->first == e.node.get());
+        if (it == node2index_.end() || it->first != e.node.get()) continue;
         input_entries_.emplace_back(NodeEntry{it->second, e.index, e.version});
       }
       inputs_rptr.push_back(input_entries_.size());


Mime
View raw message