| 174 | #define C_SHP(x) reinterpret_cast<TF_ShapeHandle*>(x) |
| 175 | |
| 176 | static OpDef MakeOpDef(int num_inputs, int num_outputs) { |
| 177 | OpRegistrationData op_reg_data; |
| 178 | OpDefBuilder b("dummy"); |
| 179 | for (int i = 0; i < num_inputs; ++i) { |
| 180 | b.Input(strings::StrCat("i", i, ": float")); |
| 181 | } |
| 182 | for (int i = 0; i < num_outputs; ++i) { |
| 183 | b.Output(strings::StrCat("o", i, ": float")); |
| 184 | } |
| 185 | CHECK(b.Attr("foo:string").Finalize(&op_reg_data).ok()); |
| 186 | return op_reg_data.op_def; |
| 187 | } |
| 188 | |
| 189 | // Tests for shape inference |
| 190 | |