| 115 | }; |
| 116 | |
| 117 | class DummyReadResourceCC { |
| 118 | public: |
| 119 | DummyReadResourceCC(const Scope& scope, const Input& value) { |
| 120 | if (!scope.ok()) return; |
| 121 | auto _value = ops::AsNodeOut(scope, value); |
| 122 | if (!scope.ok()) return; |
| 123 | Node* ret; |
| 124 | const auto unique_name = scope.GetUniqueNameForOp("DummyReadResource"); |
| 125 | auto builder = NodeBuilder(unique_name, "DummyReadResource").Input(_value); |
| 126 | scope.UpdateBuilder(&builder); |
| 127 | scope.UpdateStatus(builder.Finalize(scope.graph(), &ret)); |
| 128 | if (!scope.ok()) return; |
| 129 | scope.UpdateStatus(scope.DoShapeInference(ret)); |
| 130 | if (!scope.ok()) return; |
| 131 | this->output1_ = Output(ret, 0); |
| 132 | this->output2_ = Output(ret, 1); |
| 133 | } |
| 134 | |
| 135 | Output output1_; |
| 136 | Output output2_; |
| 137 | }; |
| 138 | |
| 139 | REGISTER_OP("DummyReadResource") |
| 140 | .Input("input: int32") |