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

Function ConstructOp

tensorflow/core/graph/graph_partition_test.cc:190–206  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

188 .SetShapeFn(shape_inference::ScalarShape);
189
190Output ConstructOp(const Scope& scope, const string& op_type,
191 const gtl::ArraySlice<Input>& inputs) {
192 if (!scope.ok()) return Output();
193 const string unique_name = scope.GetUniqueNameForOp(op_type);
194 auto builder =
195 NodeBuilder(unique_name, op_type, scope.graph()->op_registry());
196 for (auto const& input : inputs) {
197 builder.Input(ops::NodeOut(input.node(), input.index()));
198 }
199 scope.UpdateBuilder(&builder);
200 Node* ret;
201 scope.UpdateStatus(builder.Finalize(scope.graph(), &ret));
202 if (!scope.ok()) return Output();
203 scope.UpdateStatus(scope.DoShapeInference(ret));
204 if (!scope.ok()) return Output();
205 return Output(ret);
206}
207
208Output ConstructOp(const Scope& scope, const string& op_type,
209 const string &device,

Callers 7

FloatInputFunction · 0.70
BoolInputFunction · 0.70
CombineFunction · 0.70
Scatter1to2Function · 0.70
Scatter1toRef2Function · 0.70
FakeIdentityFunction · 0.70
TEST_FFunction · 0.70

Calls 15

GetUniqueNameForOpMethod · 0.80
UpdateBuilderMethod · 0.80
DoShapeInferenceMethod · 0.80
NodeBuilderClass · 0.70
NodeOutClass · 0.70
OutputClass · 0.50
okMethod · 0.45
op_registryMethod · 0.45
graphMethod · 0.45
InputMethod · 0.45
nodeMethod · 0.45
indexMethod · 0.45

Tested by

no test coverage detected