MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / DummyReadResourceCC

Class DummyReadResourceCC

tensorflow/compiler/tf2xla/xla_compiler_test.cc:117–137  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

115};
116
117class 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
139REGISTER_OP("DummyReadResource")
140 .Input("input: int32")

Callers 1

TEST_FFunction · 0.85

Calls

no outgoing calls

Tested by 1

TEST_FFunction · 0.68