| 1237 | .SetShapeFn(tensorflow::shape_inference::UnknownShape); |
| 1238 | |
| 1239 | void NodeWithPlaceholderAttrHelper(TF_Graph* graph, TF_Status* s, |
| 1240 | const char* name, const char* placeholder, |
| 1241 | TF_Operation** op) { |
| 1242 | TF_OperationDescription* desc = TF_NewOperation(graph, "CustomOp", name); |
| 1243 | TF_SetAttrPlaceholder(desc, "index", placeholder); |
| 1244 | *op = TF_FinishOperation(desc, s); |
| 1245 | ASSERT_EQ(TF_OK, TF_GetCode(s)) << TF_Message(s); |
| 1246 | ASSERT_NE(*op, nullptr); |
| 1247 | } |
| 1248 | |
| 1249 | TEST_F(CApiFunctionTest, GraphToFunctionDefWithPlaceholderAttr) { |
| 1250 | std::unique_ptr<TF_Graph, decltype(&TF_DeleteGraph)> func_graph( |
no test coverage detected