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

Method RegisterFlattenNode

tensorflow/core/kernels/hexagon/graph_transferer.cc:802–818  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

800}
801
802void GraphTransferer::RegisterFlattenNode(
803 const IRemoteFusedGraphOpsDefinitions& ops_definitions,
804 const ShapeRefiner& shape_refiner, const Node& node) {
805 VLOG(1) << "Register flatten node: " << node.name();
806 CHECK_EQ(node_name_to_id_cache_map_.count(node.name()), 1);
807 const int id = node_name_to_id_cache_map_[node.name()];
808 // TODO(satok): Remove dependency to specific type
809 const string op_type = "FLATTEN";
810 // TODO(satok): Set correct data type if it's given.
811 const int op_type_id = ops_definitions.GetOpIdFor(op_type, {});
812 CHECK(op_type_id >= 0 && op_type_id < ops_definitions.GetTotalOpsCount());
813
814 AppendNodeParamsWithIoParams(
815 shape_refiner, node, node.name(), id, node.type_string(), op_type_id,
816 PADDING_NA_ID, node.num_inputs(), {}, node.num_outputs(),
817 true /* append_input */, true /* append_output */);
818}
819
820void GraphTransferer::RegisterGenericNode(
821 const IRemoteFusedGraphOpsDefinitions& ops_definitions,

Callers

nothing calls this directly

Calls 6

nameMethod · 0.65
countMethod · 0.45
GetOpIdForMethod · 0.45
GetTotalOpsCountMethod · 0.45
num_inputsMethod · 0.45
num_outputsMethod · 0.45

Tested by

no test coverage detected