Home
last modified time | relevance | path

Searched refs:fc_op (Results 1 – 12 of 12) sorted by relevance

/external/tensorflow/tensorflow/compiler/mlir/lite/transforms/
Doptimize.cc501 auto fc_op = builder->create<FullyConnectedOp>( in GetFcOutput() local
505 return fc_op->getResult(0); in GetFcOutput()
564 auto fc_op = in matchAndRewrite() local
566 if (!fc_op) return failure(); in matchAndRewrite()
583 Value filter = fc_op.filter(); in matchAndRewrite()
584 Value bias = fc_op.bias(); in matchAndRewrite()
587 if (fc_op.fused_activation_function() != "NONE") return failure(); in matchAndRewrite()
633 FusedLoc::get(fc_op.getContext(), {fc_op.getLoc(), add_op.getLoc()}), in matchAndRewrite()
635 /*input=*/fc_op.input(), in matchAndRewrite()
640 /*weights_format=*/rewriter.getStringAttr(fc_op.weights_format()), in matchAndRewrite()
[all …]
Dlegalize_tf.cc263 auto fc_op = rewriter.create<FullyConnectedOp>( in matchAndRewrite() local
270 rewriter.replaceOp(op, {fc_op.getResult(0)}); in matchAndRewrite()
/external/tensorflow/tensorflow/lite/toco/graph_transformations/
Dshuffle_fc_weights.cc35 FullyConnectedOperator* fc_op = static_cast<FullyConnectedOperator*>(op); in Run() local
37 if (fc_op->weights_format != FullyConnectedWeightsFormat::kDefault) { in Run()
40 const Array& input_array = model->GetArray(fc_op->inputs[0]); in Run()
41 const std::string& weights_name = fc_op->inputs[1]; in Run()
43 const Array& output_array = model->GetArray(fc_op->outputs[0]); in Run()
141 fc_op->weights_format = FullyConnectedWeightsFormat::kShuffled4x16Int8; in Run()
146 CHECK_EQ(fc_op->outputs.size(), 1); in Run()
148 AvailableArrayName(*model, fc_op->inputs[0] + "_shuffled"); in Run()
149 fc_op->outputs.push_back(shuffled_input_workspace_array_name); in Run()
Dresolve_tensorflow_matmul.cc168 auto* fc_op = new FullyConnectedOperator; in Run() local
169 fc_op->inputs = {input_lhs, input_rhs}; in Run()
170 fc_op->outputs = matmul_op->outputs; in Run()
173 model->operators.emplace(matmul_it, fc_op) + 1; in Run()
207 LogName(*matmul_op), LogName(*fc_op)); in Run()
214 fc_op->inputs = {input_lhs, input_rhs}; in Run()
Densure_uint8_weights_safe_for_fast_int8_kernels.cc125 const auto& fc_op = static_cast<const toco::FullyConnectedOperator&>(op); in Run() local
126 CHECK(fc_op.weights_format == FullyConnectedWeightsFormat::kDefault) in Run()
/external/tensorflow/tensorflow/lite/tools/optimize/
Dmodify_model_interface_test.cc40 auto fc_op = std::make_unique<OperatorT>(); in CreateQuantizedModelSingleInputOutput() local
67 fc_op->opcode_index = 1; in CreateQuantizedModelSingleInputOutput()
68 fc_op->inputs = {1}; in CreateQuantizedModelSingleInputOutput()
69 fc_op->outputs = {2}; in CreateQuantizedModelSingleInputOutput()
76 model->subgraphs[0]->operators.push_back(std::move(fc_op)); in CreateQuantizedModelSingleInputOutput()
136 auto fc_op = std::make_unique<OperatorT>(); in CreateQuantizedModelMultipleInputOutput() local
167 fc_op->opcode_index = 1; in CreateQuantizedModelMultipleInputOutput()
168 fc_op->inputs = {2, 3}; in CreateQuantizedModelMultipleInputOutput()
169 fc_op->outputs = {4, 5}; in CreateQuantizedModelMultipleInputOutput()
180 model->subgraphs[0]->operators.push_back(std::move(fc_op)); in CreateQuantizedModelMultipleInputOutput()
[all …]
/external/tensorflow/tensorflow/lite/toco/graph_transformations/tests/
Dfuse_binary_into_following_affine_test.cc89 auto* fc_op = new FullyConnectedOperator; in TEST_F() local
90 fc_op->inputs = {"MulOutput", "FCWeight", "FCBias"}; in TEST_F()
91 fc_op->outputs = {"Output"}; in TEST_F()
92 model_->operators.push_back(std::unique_ptr<Operator>(fc_op)); in TEST_F()
131 auto* fc_op = new FullyConnectedOperator; in TEST_F() local
132 fc_op->inputs = {"MulOutput", "FCWeight", "FCBias"}; in TEST_F()
133 fc_op->outputs = {"Output"}; in TEST_F()
134 model_->operators.push_back(std::unique_ptr<Operator>(fc_op)); in TEST_F()
/external/tensorflow/tensorflow/compiler/mlir/lite/experimental/tac/transforms/
Ddevice_transform_patterns.cc470 TFL::FullyConnectedOp fc_op, PatternRewriter& rewriter) const { in matchAndRewrite() argument
472 auto input = fc_op.input(); in matchAndRewrite()
477 auto weight = fc_op.filter(); in matchAndRewrite()
482 auto output = fc_op.getResult(0); in matchAndRewrite()
494 InsertReshapeOp(fc_op.getLoc(), input, input_type.getElementType(), in matchAndRewrite()
502 InsertReshapeOp(fc_op.getLoc(), weight, weight_type.getElementType(), in matchAndRewrite()
510 fc_op.getLoc(), conv_output_type, reshaped_input, reshaped_weight, in matchAndRewrite()
511 fc_op.bias(), rewriter.getI32IntegerAttr(1), in matchAndRewrite()
512 rewriter.getI32IntegerAttr(1), fc_op.fused_activation_functionAttr(), in matchAndRewrite()
518 InsertReshapeOp(fc_op.getLoc(), conv, output_type.getElementType(), in matchAndRewrite()
[all …]
Ddevice_transform_patterns.h83 LogicalResult matchAndRewrite(TFL::FullyConnectedOp fc_op,
/external/tensorflow/tensorflow/lite/toco/tflite/
Doperator.cc470 const auto& fc_op = in GetVersion() local
475 fully_connected_params.keep_num_dims = fc_op.keep_num_dims; in GetVersion()
478 GetWeightFormat(fc_op.weights_format)); in GetVersion()
/external/tensorflow/tensorflow/lite/toco/
Dtooling_util.cc2428 const auto& fc_op = static_cast<toco::FullyConnectedOperator&>(*op); in UndoWeightsShuffling() local
2429 if (fc_op.weights_format == FullyConnectedWeightsFormat::kDefault) { in UndoWeightsShuffling()
2432 const std::string& weights_name = fc_op.inputs[1]; in UndoWeightsShuffling()
/external/tensorflow/tensorflow/compiler/mlir/tosa/transforms/
Dlegalize_tfl.cc1562 auto fc_op = CreateOpAndInfer<tosa::FullyConnectedOp>( in matchAndRewrite() local
1569 rewriter, op, fc_op.getResult(), input_type, filter_type, in matchAndRewrite()
1572 fc_output = fc_op.getResult(); in matchAndRewrite()