| 1991 | } while(0) |
| 1992 | |
| 1993 | Status CreateFakeConstOp(const std::string& name, |
| 1994 | DataType type, Graph* graph, |
| 1995 | Node** fake_const, |
| 1996 | Tensor* content = nullptr) { |
| 1997 | NodeDef def; |
| 1998 | def.set_name(name); |
| 1999 | def.set_op("Const"); |
| 2000 | auto* attr = def.mutable_attr(); |
| 2001 | (*attr)["dtype"].set_type(type); |
| 2002 | if (content != nullptr) { |
| 2003 | content->AsProtoTensorContent((*attr)["value"].mutable_tensor()); |
| 2004 | } else { |
| 2005 | SET_DEFAULT_CONST_ATTR(attr, type); |
| 2006 | } |
| 2007 | Status status; |
| 2008 | *fake_const = graph->AddNode(def, &status); |
| 2009 | return status; |
| 2010 | } |
| 2011 | |
| 2012 | Status CreateStringJoinOp(const std::string& name, |
| 2013 | std::vector<SrcInfo> input_info, |
no test coverage detected