diff --git a/lib/utils/include/utils/graph/query_set.h b/lib/utils/include/utils/graph/query_set.h index ee54f07446..957f73cb1a 100644 --- a/lib/utils/include/utils/graph/query_set.h +++ b/lib/utils/include/utils/graph/query_set.h @@ -11,14 +11,12 @@ namespace FlexFlow { template struct query_set { query_set() = delete; - query_set(T const &) { - NOT_IMPLEMENTED(); + query_set(T const & query) : query({query}) { + std::cout<<"1"< const &query) : query(query) {} - query_set(optional> const &) { - NOT_IMPLEMENTED(); - } + query_set(optional> const & query): query(query) {} friend bool operator==(query_set const &lhs, query_set const &rhs) { return lhs.value == rhs.value; @@ -72,13 +70,15 @@ template std::unordered_map query_keys(query_set const &q, C const &m) { + std::cout<<"3"< std::unordered_map query_values(query_set const &q, C const &m) { + std::cout<<"4"< const &nodes) const { MultiDiEdgeQuery e = *this; - if (is_matchall(e.srcs)) { - throw mk_runtime_error("Expected matchall previous value"); - } + // if (is_matchall(e.srcs)) { + // throw mk_runtime_error("Expected matchall previous value"); + // } e.srcs = nodes; return e; } @@ -32,9 +32,9 @@ MultiDiEdgeQuery MultiDiEdgeQuery::with_src_node(Node const &n) const { MultiDiEdgeQuery MultiDiEdgeQuery::with_dst_nodes(query_set const &nodes) const { MultiDiEdgeQuery e = *this; - if (is_matchall(e.dsts)) { - throw mk_runtime_error("Expected matchall previous value"); - } + // if (is_matchall(e.dsts)) { + // throw mk_runtime_error("Expected matchall previous value"); + // } e.dsts = nodes; return e; } @@ -76,9 +76,9 @@ MultiDiEdgeQuery MultiDiEdgeQuery::with_dst_idx(NodePort const &p) const { MultiDiEdgeQuery MultiDiEdgeQuery::with_src_idxs(query_set const &idxs) const { MultiDiEdgeQuery e{*this}; - if (is_matchall(e.srcIdxs)) { - throw mk_runtime_error("Expected matchall previous value"); - } + // if (is_matchall(e.srcIdxs)) { + // throw mk_runtime_error("Expected matchall previous value"); + // } e.srcIdxs = idxs; return e; } @@ -86,9 +86,9 @@ MultiDiEdgeQuery MultiDiEdgeQuery MultiDiEdgeQuery::with_dst_idxs(query_set const &idxs) const { MultiDiEdgeQuery e = *this; - if (is_matchall(e.dstIdxs)) { - throw mk_runtime_error("Expected matchall previous value"); - } + // if (is_matchall(e.dstIdxs)) { + // throw mk_runtime_error("Expected matchall previous value"); + // } e.dstIdxs = idxs; return e; } diff --git a/lib/utils/src/graph/views.cc b/lib/utils/src/graph/views.cc index 8c0da05971..98f2ab7271 100644 --- a/lib/utils/src/graph/views.cc +++ b/lib/utils/src/graph/views.cc @@ -55,6 +55,7 @@ std::unordered_set ViewOpenMultiDiGraphAsMultiDiGraph::query_edges( // } // return result; + std::cout<<"5"<