/external/tensorflow/tensorflow/lite/kernels/ |
D | subgraph_test_util.cc | 46 void SetupTensor(Subgraph* subgraph, int tensor_index, TfLiteType type) { in SetupTensor() argument 47 ASSERT_EQ(subgraph->SetTensorParametersReadWrite(tensor_index, type, "", 0, in SetupTensor() 60 void SubgraphBuilder::BuildAddSubgraph(Subgraph* subgraph) { in BuildAddSubgraph() argument 70 ASSERT_EQ(subgraph->AddTensors(kTensorCount, &first_new_tensor_index), in BuildAddSubgraph() 73 ASSERT_EQ(subgraph->SetInputs({kInput1, kInput2}), kTfLiteOk); in BuildAddSubgraph() 74 ASSERT_EQ(subgraph->SetOutputs({kOutput}), kTfLiteOk); in BuildAddSubgraph() 76 SetupTensor(subgraph, kInput1, kTfLiteInt32); in BuildAddSubgraph() 77 SetupTensor(subgraph, kInput2, kTfLiteInt32); in BuildAddSubgraph() 78 SetupTensor(subgraph, kOutput, kTfLiteInt32); in BuildAddSubgraph() 84 subgraph->AddNodeWithParameters( in BuildAddSubgraph() [all …]
|
D | subgraph_test_util.h | 39 void BuildAddSubgraph(Subgraph* subgraph); 43 void BuildMulSubgraph(Subgraph* subgraph); 47 void BuildPadSubgraph(Subgraph* subgraph); 54 void BuildIfSubgraph(Subgraph* subgraph); 63 void BuildLessEqualCondSubgraph(Subgraph* subgraph, int rhs); 68 void BuildAccumulateLoopBodySubgraph(Subgraph* subgraph); 76 void BuildPadLoopBodySubgraph(Subgraph* subgraph, 81 void BuildWhileSubgraph(Subgraph* subgraph); 84 void CreateConstantInt32Tensor(Subgraph* subgraph, int tensor_index,
|
D | if.cc | 71 for (auto* subgraph : {then_subgraph, else_subgraph}) { in Prepare() 72 TF_LITE_ENSURE_EQ(context, num_inputs, subgraph->inputs().size()); in Prepare() 73 TF_LITE_ENSURE_EQ(context, num_outputs, subgraph->outputs().size()); in Prepare() 77 for (auto* subgraph : {then_subgraph, else_subgraph}) { in Prepare() 84 subgraph->ResizeInputTensor(i, dims); in Prepare() 85 TfLiteTensor* subgraph_input = subgraph->tensor(subgraph->inputs()[i]); in Prepare() 91 TF_LITE_ENSURE_OK(context, subgraph->AllocateTensors()); in Prepare() 92 has_dynamic_output_tensors |= subgraph->HasDynamicTensors(); in Prepare()
|
D | while_test.cc | 44 builder_->BuildLessEqualCondSubgraph(interpreter_->subgraph(1), i); in TEST_F() 45 builder_->BuildAccumulateLoopBodySubgraph(interpreter_->subgraph(2)); in TEST_F() 67 builder_->BuildLessEqualCondSubgraph(interpreter_->subgraph(1), 3); in TEST_F() 68 builder_->BuildPadLoopBodySubgraph(interpreter_->subgraph(2), {1, 2}); in TEST_F()
|
D | if_test.cc | 39 builder_->BuildAddSubgraph(interpreter_->subgraph(1)); in SetUp() 40 builder_->BuildMulSubgraph(interpreter_->subgraph(2)); in SetUp() 73 builder_->BuildAddSubgraph(interpreter_->subgraph(1)); in SetUp() 74 builder_->BuildPadSubgraph(interpreter_->subgraph(2)); in SetUp()
|
/external/tensorflow/tensorflow/lite/tools/optimize/ |
D | subgraph_quantizer_test.cc | 71 auto subgraph = model.subgraphs[0].get(); in TEST() local 73 SubgraphQuantizer quantizer(&model, subgraph, &error_reporter); in TEST() 77 auto conv_op = subgraph->operators[0].get(); in TEST() 83 subgraph->tensors[conv_op->inputs[bias_tensor_index]].get(); in TEST() 85 subgraph->tensors[conv_op->inputs[input_tensor_idx]].get(); in TEST() 87 subgraph->tensors[conv_op->inputs[weights_tensor_idx]].get(); in TEST() 89 subgraph->tensors[conv_op->outputs[output_tensor_idx]].get(); in TEST() 170 auto subgraph = model.subgraphs[0].get(); in TEST() local 172 SubgraphQuantizer quantizer(&model, subgraph, &error_reporter); in TEST() 176 auto conv_op = subgraph->operators[0].get(); in TEST() [all …]
|
D | quantize_weights.cc | 50 const SubGraphT* subgraph, in GetTensorConsumers() argument 55 for (size_t op_idx = 0; op_idx < subgraph->operators.size(); ++op_idx) { in GetTensorConsumers() 56 OperatorT* op = subgraph->operators[op_idx].get(); in GetTensorConsumers() 126 bool CheckAllOpInputsQuantized(const SubGraphT* subgraph, const OperatorT* op, in CheckAllOpInputsQuantized() argument 137 TensorT* tensor = subgraph->tensors[tensor_idx].get(); in CheckAllOpInputsQuantized() 151 SubGraphT* subgraph = model->subgraphs.at(0).get(); in InsertQuantizableInputTensorsFromOperator() local 164 TensorT* tensor = subgraph->tensors[tensor_idx].get(); in InsertQuantizableInputTensorsFromOperator() 267 SubGraphT* subgraph = model->subgraphs.at(0).get(); in QuantizeWeightsInternal() local 271 for (size_t i = 0; i < subgraph->operators.size(); ++i) { in QuantizeWeightsInternal() 272 OperatorT* op = subgraph->operators[i].get(); in QuantizeWeightsInternal() [all …]
|
D | quantize_model.cc | 39 SubGraphT* subgraph = model->subgraphs.at(subgraph_idx).get(); in QuantizeModel() local 40 internal::SubgraphQuantizer quantizer(model, subgraph, error_reporter); in QuantizeModel() 41 for (size_t op_idx = 0; op_idx < subgraph->operators.size(); op_idx++) { in QuantizeModel() 44 OperatorT* op = subgraph->operators[op_idx].get(); in QuantizeModel()
|
D | quantize_weights_test.cc | 76 const auto subgraph = model->subgraphs()->Get(subgraph_idx); in IsModelInputOrOutput() local 77 for (size_t i = 0; i < subgraph->inputs()->size(); ++i) { in IsModelInputOrOutput() 78 if (subgraph->inputs()->Get(i) == tensor_idx) { in IsModelInputOrOutput() 82 for (size_t i = 0; i < subgraph->outputs()->size(); ++i) { in IsModelInputOrOutput() 83 if (subgraph->outputs()->Get(i) == tensor_idx) { in IsModelInputOrOutput() 95 const auto subgraph = model->subgraphs()->Get(subgraph_idx); in GetProducerOpCode() local 96 for (size_t op_idx = 0; op_idx < subgraph->operators()->size(); ++op_idx) { in GetProducerOpCode() 97 const auto op = subgraph->operators()->Get(op_idx); in GetProducerOpCode()
|
/external/tensorflow/tensorflow/lite/ |
D | nnapi_delegate.cc | 115 TfLiteStatus addTensorOperands(tflite::Subgraph* subgraph, in addTensorOperands() argument 121 for (size_t i = 0; i < subgraph->tensors_size(); i++) { in addTensorOperands() 131 TfLiteTensor* tensor = subgraph->tensor(i); in addTensorOperands() 215 tflite::Subgraph* subgraph, ANeuralNetworksModel* nn_model, in AddOpsAndParams() argument 220 for (size_t i = 0; i < subgraph->nodes_size(); i++) { in AddOpsAndParams() 221 const auto* node_and_registration = subgraph->node_and_registration(i); in AddOpsAndParams() 267 [nnapi, subgraph, &nn_model, &next_id, &augmented_inputs, in AddOpsAndParams() 269 const TfLiteTensor* tensor = subgraph->tensor(tensor_id); in AddOpsAndParams() 365 auto add_lstm_scratch_tensor_float32 = [nnapi, subgraph, &node, &nn_model, in AddOpsAndParams() 369 const TfLiteTensor* tensor = subgraph->tensor(scratch_buffer_index); in AddOpsAndParams() [all …]
|
D | interpreter.cc | 113 Subgraph* subgraph = in AddSubgraphs() local 115 subgraphs_.emplace_back(subgraph); in AddSubgraphs() 207 for (auto& subgraph : subgraphs_) { in SetNumThreads() local 208 subgraph->context()->recommended_num_threads = num_threads; in SetNumThreads() 220 for (auto& subgraph : subgraphs_) { in SetAllowFp16PrecisionForFp32() local 221 subgraph->context()->allow_fp32_relax_to_fp16 = allow; in SetAllowFp16PrecisionForFp32() 229 for (auto& subgraph : subgraphs_) { in SetCancellationFunction() local 230 subgraph->SetCancellationFunction(data, check_cancelled_func); in SetCancellationFunction() 235 for (auto& subgraph : subgraphs_) { in ModifyGraphWithDelegate() local 236 TF_LITE_ENSURE_OK(context_, subgraph->ModifyGraphWithDelegate(delegate)); in ModifyGraphWithDelegate() [all …]
|
D | model.cc | 249 Subgraph* subgraph) { in ParseNodes() argument 253 subgraph->ReserveNodes(operators->Length()); in ParseNodes() 283 subgraph->AddNodeWithParameters( in ParseNodes() 293 subgraph->AddNodeWithParameters(FlatBufferIntArrayToVector(op->inputs()), in ParseNodes() 355 Subgraph* subgraph) { in ParseTensors() argument 420 if (subgraph->SetTensorParametersReadOnly( in ParseTensors() 428 if (subgraph->SetTensorParametersReadWrite(i, type, get_name(tensor), in ParseTensors() 526 const tflite::SubGraph* subgraph = (*subgraphs)[subgraph_index]; in operator ()() local 528 (*interpreter)->subgraph(subgraph_index); in operator ()() 529 auto operators = subgraph->operators(); in operator ()() [all …]
|
D | nnapi_delegate_disabled.cc | 38 TfLiteStatus NNAPIDelegate::BuildGraph(Subgraph* subgraph) { in BuildGraph() argument 42 TfLiteStatus NNAPIDelegate::Invoke(Subgraph* subgraph) { return kTfLiteError; } in Invoke() argument
|
/external/tensorflow/tensorflow/contrib/graph_editor/ |
D | edit.py | 23 from tensorflow.contrib.graph_editor import subgraph 45 sgv = subgraph.make_view(sgv) 63 sgv = subgraph.make_view(sgv) 86 sgv = subgraph.make_view(sgv) 118 sgv = subgraph.make_view(sgv) 124 consumers_sgv = subgraph.SubGraphView(sgv_.consumers()) 191 sgv0 = subgraph.make_view(sgv0) 192 sgv1 = subgraph.make_view(sgv1) 196 sgv0_outputs = subgraph.SubGraphView(passthrough_ts=sgv0.outputs) 217 sgv = subgraph.make_view(sgv)
|
/external/tensorflow/tensorflow/lite/tools/ |
D | verifier.cc | 195 bool VerifySubGraphConsistency(const Model& model, const SubGraph& subgraph, in VerifySubGraphConsistency() argument 199 for (int i = 0; i < subgraph.tensors()->Length(); ++i) { in VerifySubGraphConsistency() 200 const auto* tensor = subgraph.tensors()->Get(i); in VerifySubGraphConsistency() 207 for (const int tensor_idx : *subgraph.inputs()) { in VerifySubGraphConsistency() 211 for (int op_idx = 0; op_idx < subgraph.operators()->Length(); ++op_idx) { in VerifySubGraphConsistency() 212 const auto* op = subgraph.operators()->Get(op_idx); in VerifySubGraphConsistency() 268 for (const auto& subgraph : *model.subgraphs()) { in VerifySubGraphs() 269 if (!subgraph->operators()) { in VerifySubGraphs() 274 if (!VerifyOperators(*subgraph->operators(), error_reporter)) { in VerifySubGraphs() 278 if (!VerifySubGraphConsistency(model, *subgraph, error_reporter)) { in VerifySubGraphs() [all …]
|
/external/tensorflow/tensorflow/core/graph/ |
D | subgraph_test.cc | 110 Graph* subgraph = new Graph(OpRegistry::Global()); in Subgraph() local 111 CopyGraph(*g_, subgraph); in Subgraph() 119 subgraph::RewriteGraphMetadata metadata; in Subgraph() 120 Status s = subgraph::RewriteGraphForExecution( in Subgraph() 121 subgraph, fed, fetch, targets, device_info_, use_function_convention, in Subgraph() 124 delete subgraph; in Subgraph() 132 g_.reset(subgraph); in Subgraph() 376 Graph* subgraph = new Graph(OpRegistry::Global()); in BM_SubgraphHelper() local 377 CopyGraph(g, subgraph); in BM_SubgraphHelper() 378 subgraph::RewriteGraphMetadata metadata; in BM_SubgraphHelper() [all …]
|
/external/tensorflow/tensorflow/lite/schema/ |
D | upgrade_schema.py | 190 subgraph = {} 192 subgraph[key_to_promote] = data[key_to_promote] 194 data["subgraphs"] = [subgraph] 251 for subgraph in data["subgraphs"]: 252 for ops in subgraph["operators"]: 278 for subgraph in data["subgraphs"]: 279 if "tensors" not in subgraph: 281 for tensor in subgraph["tensors"]:
|
/external/tensorflow/tensorflow/core/common_runtime/ |
D | partitioning_utils.cc | 58 std::unique_ptr<Graph> subgraph( in PartitionFunctionGraph() local 61 TF_CHECK_OK(subgraph->AddFunctionLibrary(global_flib.ToProto())); in PartitionFunctionGraph() 65 TF_RETURN_IF_ERROR(ConvertGraphDefToGraph(opts, graph_def, subgraph.get())); in PartitionFunctionGraph() 66 subgraphs->emplace(device, std::move(subgraph)); in PartitionFunctionGraph() 73 Graph* subgraph, std::vector<int>* arg_indices, in UpdateArgAndRetvalMetadata() argument 83 for (Node* node : subgraph->op_nodes()) { in UpdateArgAndRetvalMetadata()
|
D | graph_execution_state.cc | 251 class TensorConnectionPruneRewrite : public subgraph::PruneRewrite { 255 : subgraph::PruneRewrite(endpoint_name, nullptr /* device_info */), in TensorConnectionPruneRewrite() 443 subgraph::RewriteGraphMetadata* out_rewrite_metadata) { in PruneGraph() 444 std::vector<std::unique_ptr<subgraph::PruneRewrite>> feed_rewrites; in PruneGraph() 446 std::vector<std::unique_ptr<subgraph::PruneRewrite>> fetch_rewrites; in PruneGraph() 459 new subgraph::ArgFeedRewrite(&feed, device_info, i)); in PruneGraph() 479 new subgraph::RetvalFetchRewrite(&fetch, device_info, i)); in PruneGraph() 496 new subgraph::RecvFeedRewrite(&feed, device_info)); in PruneGraph() 500 new subgraph::SendFetchRewrite(&fetch, device_info)); in PruneGraph() 534 TF_RETURN_IF_ERROR(subgraph::RewriteGraphForExecution( in PruneGraph() [all …]
|
D | graph_execution_state.h | 37 namespace subgraph { 188 subgraph::RewriteGraphMetadata* out_rewrite_metadata); 209 std::unique_ptr<subgraph::RewriteGraphMetadata> rewrite_metadata_;
|
/external/tensorflow/tensorflow/compiler/jit/ |
D | encapsulate_subgraphs_pass.cc | 1425 Subgraph& subgraph = subgraphs_[func_id]; in CopySubgraphNodes() local 1426 Node* image = subgraph.MakeNodeImage(graph_in_, node); in CopySubgraphNodes() 1544 Subgraph& subgraph = entry.second; in SplitIntoSubgraphs() local 1545 TF_RETURN_IF_ERROR(subgraph.AddHostComputes(entry.first, node_images)); in SplitIntoSubgraphs() 1551 Subgraph& subgraph = entry.second; in SplitIntoSubgraphs() local 1552 FixupSourceAndSinkEdges(subgraph.GetGraph()); in SplitIntoSubgraphs() 1572 Subgraph& subgraph = subgraph_entry.second; in BuildFunctionDefs() local 1573 TF_RETURN_IF_ERROR(subgraph.BuildFunctionDef( in BuildFunctionDefs() 1613 Subgraph& subgraph = subgraph_entry.second; in AddOutsideCompilationHostIONodes() local 1614 TF_RETURN_IF_ERROR(subgraph.AddOutsideCompilationHostIONodes( in AddOutsideCompilationHostIONodes() [all …]
|
/external/tensorflow/tensorflow/compiler/xla/g3doc/ |
D | tfcompile.md | 25 `tfcompile` takes a subgraph, identified by the TensorFlow concepts of 26 feeds and fetches, and generates a function that implements that subgraph. 29 feeds; the resulting pruned subgraph cannot contain Placeholder or Variable 31 ensures the resulting subgraph no longer contains these nodes. The generated 39 `tfcompile` from a TensorFlow subgraph. The steps are: 41 * Step 1: Configure the subgraph to compile 42 * Step 2: Use the `tf_library` build macro to compile the subgraph 43 * Step 3: Write code to invoke the subgraph 46 ### Step 1: Configure the subgraph to compile 80 ### Step 2: Use tf_library build macro to compile the subgraph [all …]
|
/external/tensorflow/tensorflow/java/src/main/java/org/tensorflow/ |
D | Graph.java | 277 Graph subgraph = new Graph(subgraphHandle); in buildSubgraph() local 285 synchronized (subgraph.nativeHandleLock) { in buildSubgraph() 286 try (Reference ref = subgraph.ref()) { in buildSubgraph() 289 Operation op = new Operation(subgraph, inputHandles[i]); in buildSubgraph() 294 Operation op = new Operation(subgraph, outputHandles[i]); in buildSubgraph() 298 subgraphBuilder.buildSubgraph(subgraph, inputs, outputs); in buildSubgraph()
|
/external/swiftshader/third_party/llvm-7.0/llvm/test/ThinLTO/X86/ |
D | dot-dumper.ll | 19 ; STRUCTURE-DAG: subgraph cluster_0 20 ; STRUCTURE-DAG: subgraph cluster_1 27 ; CLUSTER0-NEXT: subgraph cluster_0 { 35 ; CLUSTER1-NEXT: subgraph cluster_1 {
|
/external/dagger2/compiler/src/main/java/dagger/internal/codegen/ |
D | SubcomponentWriter.java | 58 BindingGraph subgraph) { in SubcomponentWriter() argument 64 parent.name.nestedClassNamed(subcomponentSimpleName(subgraph)), in SubcomponentWriter() 65 subgraph); in SubcomponentWriter() 70 private static String subcomponentSimpleName(BindingGraph subgraph) { in subcomponentSimpleName() argument 71 return subgraph.componentDescriptor().componentDefinitionType().getSimpleName() + "Impl"; in subcomponentSimpleName()
|