Home
last modified time | relevance | path

Searched refs:reshape_op (Results 1 – 25 of 28) sorted by relevance

12

/external/tensorflow/tensorflow/lite/toco/graph_transformations/
Dreorder_reshape_transpose.cc128 TensorFlowReshapeOperator* reshape_op = in Run() local
131 if (reshape_op == nullptr) { in Run()
136 if (!OperatorReady(*model, reshape_op) || reshape_op->shape.empty()) { in Run()
141 const std::string input_name = reshape_op->inputs[0]; in Run()
142 const std::string intermediate_name = reshape_op->outputs[0]; in Run()
177 if (!ReshapeIsEquivalentToTranspose(*model, reshape_op, in Run()
191 reshape_op->inputs[0] = new_intermediate_name; in Run()
192 reshape_op->outputs[0] = output_name; in Run()
206 reshape_op->inputs[0] = output_name; in Run()
228 if (CountOpsWithInput(*model, reshape_op->inputs[1]) != 1) { in Run()
[all …]
Dmerge_reshape_into_preceding_transpose.cc109 auto* reshape_op = ConvertOperator<TensorFlowReshapeOperator*>( in Run() local
112 if (reshape_op == nullptr) { in Run()
116 if (!OperatorReady(*model, reshape_op) || reshape_op->shape.empty()) { in Run()
120 const std::string intermediate_name = reshape_op->inputs[0]; in Run()
121 const std::string output_name = reshape_op->outputs[0]; in Run()
146 if (!ReshapeIsEquivalentToTranspose(*model, reshape_op, in Run()
156 LogName(*transpose_op), LogName(*reshape_op)); in Run()
161 LogName(*reshape_op)); in Run()
166 auto merged_perm = ReshapeToTranspose(*model, reshape_op); in Run()
Dmove_binary_operator_before_reshape.cc121 Operator* reshape_op = reshape_it->get(); in Run() local
122 if (reshape_op->type != OperatorType::kReshape) { in Run()
124 LogName(*binary_op), LogName(*reshape_op)); in Run()
127 const auto& reshape_input_array = model->GetArray(reshape_op->inputs[0]); in Run()
137 model->GetArray(reshape_op->outputs[0]).shape())) { in Run()
148 LogName(*binary_op), LogName(*reshape_op)); in Run()
159 LogName(*binary_op), LogName(*reshape_op)); in Run()
165 LogName(*reshape_op)); in Run()
168 std::iter_swap(reshape_op->inputs.begin(), in Run()
170 std::iter_swap(reshape_op->outputs.begin(), binary_op->outputs.begin()); in Run()
Dresolve_reshape_attributes.cc33 auto* reshape_op = reshape_it->get(); in Run() local
34 if (reshape_op->type != OperatorType::kReshape) { in Run()
38 auto* op = static_cast<TensorFlowReshapeOperator*>(reshape_op); in Run()
42 if (IsConstantParameterArray(*model, reshape_op->inputs[1])) { in Run()
43 const auto& constant_input_array = model->GetArray(reshape_op->inputs[1]); in Run()
Dremove_trivial_reshape.cc89 auto* reshape_op = reshape_it->get(); in Run() local
90 if (reshape_op->type != OperatorType::kReshape) { in Run()
94 if (!IsReshapeTrivial(*model, *reshape_op, this)) { in Run()
95 AddMessageF("%s is not trivial", LogName(*reshape_op)); in Run()
99 AddMessageF("Removing trivial %s", LogName(*reshape_op)); in Run()
101 CHECK_EQ(reshape_op->inputs.size(), 2); in Run()
Dconvert_reorder_axes.cc31 auto* reshape_op = new TensorFlowReshapeOperator; in CreateReshapeFromReorderAxes() local
34 reshape_op->inputs.push_back(reorder_op->inputs[0]); in CreateReshapeFromReorderAxes()
35 reshape_op->outputs = reorder_op->outputs; in CreateReshapeFromReorderAxes()
45 AvailableArrayName(*model, reshape_op->outputs[0]); in CreateReshapeFromReorderAxes()
46 reshape_op->inputs.push_back(reshape_array_name); in CreateReshapeFromReorderAxes()
56 return reshape_op; in CreateReshapeFromReorderAxes()
134 auto* reshape_op = in Run() local
136 model->operators.emplace(reorder_it, reshape_op); in Run()
Dconvert_squeeze_to_reshape.cc68 auto* reshape_op = new TensorFlowReshapeOperator; in Run() local
69 reshape_op->inputs = { in Run()
74 reshape_op->outputs = squeeze_op->outputs; in Run()
77 LogName(*reshape_op)); in Run()
80 model->operators.emplace(squeeze_it, reshape_op); in Run()
Dconvert_trivial_pack_to_reshape.cc57 auto* reshape_op = new TensorFlowReshapeOperator; in Run() local
58 reshape_op->inputs = {pack_op->inputs[0]}; in Run()
59 reshape_op->outputs = pack_op->outputs; in Run()
67 reshape_op->inputs.push_back(shape_array_name); in Run()
80 model->operators.emplace(pack_it, reshape_op); in Run()
Dconvert_expanddims_to_reshape.cc72 auto* reshape_op = new TensorFlowReshapeOperator; in Run() local
75 reshape_op->inputs.push_back(expand_op->inputs[0]); in Run()
76 reshape_op->outputs = expand_op->outputs; in Run()
85 reshape_op->inputs.push_back(shape_array_name); in Run()
98 model->operators.emplace(expand_it, reshape_op); in Run()
Dconvert_trivial_transpose_to_reshape.cc86 auto* reshape_op = new TensorFlowReshapeOperator; in Run() local
89 reshape_op->inputs.push_back(transpose_op->inputs[0]); in Run()
90 reshape_op->outputs = transpose_op->outputs; in Run()
99 reshape_op->inputs.push_back(shape_array_name); in Run()
111 model->operators.emplace(transpose_it, reshape_op); in Run()
Dunroll_batch_matmul.cc46 auto* reshape_op = new TensorFlowReshapeOperator; in SliceInput() local
47 reshape_op->inputs = { in SliceInput()
51 reshape_op->outputs = {AvailableArrayName( in SliceInput()
53 auto& reshape_op_output = model->GetOrCreateArray(reshape_op->outputs[0]); in SliceInput()
55 *tail_it = model->operators.emplace(*tail_it, reshape_op) + 1; in SliceInput()
64 reshape_op->outputs[0], in SliceInput()
Didentify_nearest_upsample.cc187 auto* reshape_op = new TensorFlowReshapeOperator; in Run() local
188 to_be_inserted_ops.push_back(reshape_op); in Run()
191 reshape_op->inputs.push_back(original_array_name); in Run()
195 reshape_op->inputs.push_back(shape_array_name); in Run()
223 reshape_op->outputs.push_back(reshape_output_name); in Run()
/external/tensorflow/tensorflow/lite/delegates/hexagon/builders/
Drsqrt_builder.cc112 auto* reshape_op = graph_builder_->AddNode(GetTFLiteNodeID()); in PopulateSubGraph() local
113 reshape_op->SetOpType(OP_Reshape); in PopulateSubGraph()
114 reshape_op->AddInput(sqrt_output); in PopulateSubGraph()
115 reshape_op->AddInput(TensorID(target_shape_node->GetID(), 0)); in PopulateSubGraph()
116 auto reshape_out = reshape_op->AddOutput(sizeof(uint8_t), 4, flat_shape); in PopulateSubGraph()
158 reshape_op = graph_builder_->AddNode(GetTFLiteNodeID()); in PopulateSubGraph()
159 reshape_op->SetOpType(OP_Reshape); in PopulateSubGraph()
160 reshape_op->AddInput(div_output); in PopulateSubGraph()
161 reshape_op->AddInput(TensorID(target_shape_node->GetID(), 0)); in PopulateSubGraph()
162 node_output_ = reshape_op->AddOutput(sizeof(uint8_t), 4, output_shape); in PopulateSubGraph()
/external/tensorflow/tensorflow/compiler/mlir/tensorflow/transforms/
Doptimize.cc56 auto reshape_op = llvm::dyn_cast_or_null<ReshapeOp>(user); in matchAndRewrite() local
57 if (!reshape_op) return failure(); in matchAndRewrite()
59 auto reshape_type = reshape_op.output().getType().cast<ShapedType>(); in matchAndRewrite()
126 reshape_op, reshape_op.output().getType(), new_reshape, in matchAndRewrite()
Dunroll_batch_matmul.cc89 auto reshape_op = createReshapeOp(value, {batch_size, num_rows, num_cols}, in sliceInput() local
109 /*input=*/reshape_op.output(), in sliceInput()
303 auto reshape_op = createReshapeOp(pack_op.output(), result_shape, in matchAndRewrite() local
305 rewriter.replaceOp(op, reshape_op.output()); in matchAndRewrite()
Dtpu_space_to_depth_pass.cc296 auto reshape_op = in HandleConv2DFilter() local
300 auto transpose_op = GetTransposeOpForConv2DFilter(&builder, reshape_op); in HandleConv2DFilter()
/external/tensorflow/tensorflow/c/
Dc_api_experimental_test.cc205 TFE_Op* reshape_op = TFE_NewOp(tfe_context_, "Reshape", status_); in TEST_F() local
207 TFE_OpSetAttrType(reshape_op, "T", TF_FLOAT); in TEST_F()
208 TFE_OpSetAttrType(reshape_op, "Tshape", TF_INT32); in TEST_F()
209 CheckOutputShapes(reshape_op, in TEST_F()
213 TFE_DeleteOp(reshape_op); in TEST_F()
214 reshape_op = nullptr; in TEST_F()
/external/tensorflow/tensorflow/lite/toco/
Dexport_tensorflow.cc613 tensorflow::NodeDef* reshape_op = tensorflow_graph->add_node(); in ConvertFullyConnectedOperator() local
614 reshape_op->set_op("Reshape"); in ConvertFullyConnectedOperator()
615 reshape_op->set_name(reshape_output); in ConvertFullyConnectedOperator()
616 reshape_op->add_input(src_op.inputs[0]); in ConvertFullyConnectedOperator()
617 reshape_op->add_input(reshape_shape); in ConvertFullyConnectedOperator()
618 (*reshape_op->mutable_attr())["T"].set_type( in ConvertFullyConnectedOperator()
828 tensorflow::NodeDef* reshape_op = tensorflow_graph->add_node(); in ConvertSoftmaxOperator() local
829 reshape_op->set_op("Reshape"); in ConvertSoftmaxOperator()
830 reshape_op->set_name(reshape_output); in ConvertSoftmaxOperator()
831 *reshape_op->add_input() = src_op.inputs[0]; in ConvertSoftmaxOperator()
[all …]
/external/tensorflow/tensorflow/compiler/mlir/hlo/lib/Dialect/mhlo/transforms/
Dlegalize_to_linalg.cc721 OpTy reshape_op, ArrayRef<Value> args, in matchAndRewrite() argument
723 if (!VerifyHloOpBufferOrTensorSemantics<isLHLO>(reshape_op)) in matchAndRewrite()
728 ShapedType result_type = GetHloOpResultType<isLHLO>(reshape_op); in matchAndRewrite()
789 Location loc = reshape_op.getLoc(); in matchAndRewrite()
808 rewriter.replaceOpWithNewOp<linalg::CopyOp>(reshape_op, reshape_buffer, in matchAndRewrite()
815 reshape_op, result_type, collapsed_op, expanding_map); in matchAndRewrite()
822 reshape_op.getLoc(), result_type, args[0], reassociation_map); in matchAndRewrite()
823 rewriter.replaceOpWithNewOp<linalg::CopyOp>(reshape_op, reshape_buffer, in matchAndRewrite()
827 reshape_op, result_type, args[0], reassociation_map); in matchAndRewrite()
/external/tensorflow/tensorflow/core/kernels/hexagon/
DBUILD48 "//tensorflow/core/kernels:reshape_op",
/external/tensorflow/tensorflow/core/kernels/
Deigen_spatial_convolutions_test.cc1515 const auto reshape_op = in PackRhsHelper() local
1519 evaluators.emplace_back(reshape_op, device); in PackRhsHelper()
1688 const auto reshape_op = in PackLhsHelper() local
1691 evaluators.emplace_back(reshape_op, device); in PackLhsHelper()
DBUILD979 ":reshape_op",
1164 name = "reshape_op",
1165 prefix = "reshape_op",
5830 "reshape_op.cc",
5831 "reshape_op.h",
6332 "reshape_op.h",
6509 "reshape_op.h",
/external/tensorflow/tensorflow/compiler/tf2xla/kernels/
DBUILD88 "reshape_op.cc",
/external/tensorflow/tensorflow/compiler/mlir/tosa/transforms/
Dlegalize_common.cc397 auto reshape_op = rewriter.create<tosa::ReshapeOp>( in convertSelectOp() local
404 .create<tosa::SelectOp>(op->getLoc(), result_type, reshape_op, x_value, in convertSelectOp()
2360 auto reshape_op = rewriter.create<tosa::ReshapeOp>( in convertReduceOpCommon() local
2363 val = reshape_op.getResult(); in convertReduceOpCommon()
/external/tensorflow/tensorflow/core/grappler/costs/
Dop_level_cost_estimator_test.cc2073 for (auto reshape_op : reshape_ops) { in TEST_F() local
2074 OpContext op_context = DescribeUnaryOp(reshape_op, kTensorSize); in TEST_F()

12