| 74 | namespace tensorflow { |
| 75 | |
| 76 | static std::unique_ptr<OpKernel> GetFakeKernel(const char* device_name, |
| 77 | const char* op_name, |
| 78 | Status* status) { |
| 79 | NodeDef def; |
| 80 | def.set_op(op_name); |
| 81 | def.set_device(device_name); |
| 82 | def.add_input("input1"); |
| 83 | def.add_input("input2"); |
| 84 | |
| 85 | AttrValue v; |
| 86 | v.set_type(DataType::DT_FLOAT); |
| 87 | (*def.mutable_attr())["SomeDataTypeAttr"] = v; |
| 88 | |
| 89 | return CreateOpKernel(DeviceType(device_name), nullptr, nullptr, def, 1, |
| 90 | status); |
| 91 | } |
| 92 | |
| 93 | // Tests registration of a single C kernel and checks that calls through the |
| 94 | // C/C++ boundary are being made. |
no test coverage detected