Home
last modified time | relevance | path

Searched refs:tensor_id (Results 1 – 25 of 63) sorted by relevance

123

/external/tensorflow/tensorflow/python/debug/lib/
Ddebug_v2_ops_test.py278 tensor_id = np.power(2, 53)
284 tensor_id=tensor_id,
287 tensor_id += 1
294 tensor_id=tensor_id,
305 tensor_id=x._id,
308 tensor, tensor_id = debug_summary(constant_op.constant([]))
309 self.assertAllEqual(tensor, [tensor_id, 0.0])
311 tensor, tensor_id = debug_summary(constant_op.constant(42.0))
312 self.assertAllEqual(tensor, [tensor_id, 0.0])
314 tensor, tensor_id = debug_summary(constant_op.constant([3.0, 4.0]))
[all …]
/external/tensorflow/tensorflow/lite/experimental/delegates/hexagon/builders/
Dtranspose_builder.cc28 int tensor_id; in PopulateSubGraph() local
31 tensor_id = inputs->data[0]; in PopulateSubGraph()
32 const auto& input_tensor = context->tensors[tensor_id]; in PopulateSubGraph()
33 AddInput(graph_builder_->GetHexagonTensorId(tensor_id)); in PopulateSubGraph()
35 tensor_id = inputs->data[1]; in PopulateSubGraph()
36 const auto& control_tensor = context->tensors[tensor_id]; in PopulateSubGraph()
39 graph_builder_->AddConstNodeWithData(tensor_id, control_tensor); in PopulateSubGraph()
42 AddInput(graph_builder_->GetHexagonTensorId(tensor_id)); in PopulateSubGraph()
Dpad_builder.cc32 int tensor_id; in PopulateSubGraph() local
35 tensor_id = inputs->data[0]; in PopulateSubGraph()
36 const auto& input_tensor = context->tensors[tensor_id]; in PopulateSubGraph()
37 AddInput(graph_builder_->GetHexagonTensorId(tensor_id)); in PopulateSubGraph()
54 tensor_id = inputs->data[1]; in PopulateSubGraph()
55 const auto& padding_tensor = context->tensors[tensor_id]; in PopulateSubGraph()
60 graph_builder_->AddConstNodeWithData(tensor_id, padding_tensor); in PopulateSubGraph()
63 AddInput(graph_builder_->GetHexagonTensorId(tensor_id)); in PopulateSubGraph()
Dresize_nearest_neighbor_builder.cc32 int tensor_id; in PopulateSubGraph() local
35 tensor_id = inputs->data[0]; in PopulateSubGraph()
36 const auto& input_tensor = context->tensors[tensor_id]; in PopulateSubGraph()
37 AddInput(graph_builder_->GetHexagonTensorId(tensor_id)); in PopulateSubGraph()
50 tensor_id = inputs->data[1]; in PopulateSubGraph()
51 const auto& output_dim_tensor = context->tensors[tensor_id]; in PopulateSubGraph()
56 graph_builder_->AddConstNodeWithData(tensor_id, output_dim_tensor); in PopulateSubGraph()
59 AddInput(graph_builder_->GetHexagonTensorId(tensor_id)); in PopulateSubGraph()
Darithmetic_builder.cc32 int tensor_id; in PopulateSubGraph() local
35 tensor_id = inputs->data[0]; in PopulateSubGraph()
36 const auto& input1_tensor = context->tensors[tensor_id]; in PopulateSubGraph()
37 AddInput(graph_builder_->GetHexagonTensorId(tensor_id)); in PopulateSubGraph()
50 tensor_id = inputs->data[1]; in PopulateSubGraph()
51 const auto& input2_tensor = context->tensors[tensor_id]; in PopulateSubGraph()
55 graph_builder_->AddConstNodeWithData(tensor_id, input2_tensor); in PopulateSubGraph()
56 graph_builder_->AddTensorWithID(tensor_id, const_input_node->GetID(), 0); in PopulateSubGraph()
58 AddInput(graph_builder_->GetHexagonTensorId(tensor_id)); in PopulateSubGraph()
Dreduce_builder.cc32 int tensor_id; in PopulateSubGraph() local
35 tensor_id = inputs->data[0]; in PopulateSubGraph()
36 const auto& input_tensor = context->tensors[tensor_id]; in PopulateSubGraph()
37 AddInput(graph_builder_->GetHexagonTensorId(tensor_id)); in PopulateSubGraph()
53 tensor_id = inputs->data[1]; in PopulateSubGraph()
54 const auto& axes_tensor = context->tensors[tensor_id]; in PopulateSubGraph()
59 graph_builder_->AddConstNodeWithData(tensor_id, axes_tensor); in PopulateSubGraph()
Dop_builder.cc109 OpBuilder* GraphBuilder::AddConstNodeWithData(int tensor_id, in AddConstNodeWithData() argument
122 context_, "Failed to add const node for tensor with id: %d", tensor_id); in AddConstNodeWithData()
125 AddTensorWithID(tensor_id, node_id, 0); in AddConstNodeWithData()
137 const int tensor_id = input_tensors->data[i]; in AddInputTensors() local
138 const auto& tensor = context->tensors[tensor_id]; in AddInputTensors()
140 AddTensorWithID(tensor_id, builders_.size(), num_inputs); in AddInputTensors()
152 const int tensor_id = output_tensors->data[i]; in AddOutputTensors() local
153 builders_.back()->AddInput(GetHexagonTensorId(tensor_id)); in AddOutputTensors()
Dtranspose_conv_2d_builder.cc33 int tensor_id; in PopulateSubGraph() local
36 tensor_id = inputs->data[2]; in PopulateSubGraph()
37 const auto& data_tensor = context->tensors[tensor_id]; in PopulateSubGraph()
38 AddInput(graph_builder_->GetHexagonTensorId(tensor_id)); in PopulateSubGraph()
48 tensor_id = inputs->data[1]; in PopulateSubGraph()
49 const auto& weights_tensor = context->tensors[tensor_id]; in PopulateSubGraph()
65 graph_builder_->AddTensorWithID(tensor_id, const_weights_node->GetID(), 0); in PopulateSubGraph()
Dneg_op_builder.cc26 int tensor_id; in PopulateSubGraph() local
29 tensor_id = inputs->data[0]; in PopulateSubGraph()
30 const auto& input_tensor = context->tensors[tensor_id]; in PopulateSubGraph()
31 AddInput(graph_builder_->GetHexagonTensorId(tensor_id)); in PopulateSubGraph()
Dl2_normalization_builder.cc32 int tensor_id; in PopulateSubGraph() local
35 tensor_id = inputs->data[0]; in PopulateSubGraph()
36 const auto& input_tensor = context->tensors[tensor_id]; in PopulateSubGraph()
37 AddInput(graph_builder_->GetHexagonTensorId(tensor_id)); in PopulateSubGraph()
Dactivation_builder.cc32 int tensor_id; in PopulateSubGraph() local
35 tensor_id = inputs->data[0]; in PopulateSubGraph()
36 const auto& input_tensor = context->tensors[tensor_id]; in PopulateSubGraph()
37 AddInput(graph_builder_->GetHexagonTensorId(tensor_id)); in PopulateSubGraph()
Dspace_to_depth_builder.cc32 int tensor_id; in PopulateSubGraph() local
35 tensor_id = inputs->data[0]; in PopulateSubGraph()
36 const auto& input_tensor = context->tensors[tensor_id]; in PopulateSubGraph()
57 AddInput(graph_builder_->GetHexagonTensorId(tensor_id)); in PopulateSubGraph()
Dsoftmax_builder.cc32 int tensor_id; in PopulateSubGraph() local
35 tensor_id = inputs->data[0]; in PopulateSubGraph()
36 const auto& input_tensor = context->tensors[tensor_id]; in PopulateSubGraph()
37 AddInput(graph_builder_->GetHexagonTensorId(tensor_id)); in PopulateSubGraph()
Dconcat_builder.cc41 int tensor_id; in PopulateSubGraph() local
47 tensor_id = inputs->data[i]; in PopulateSubGraph()
49 const auto& data_tensor = context->tensors[tensor_id]; in PopulateSubGraph()
50 AddInput(graph_builder_->GetHexagonTensorId(tensor_id)); in PopulateSubGraph()
/external/tensorflow/tensorflow/core/graph/
Dtensor_id_test.cc95 TensorId tensor_id = ParseTensorName(input); in TEST() local
96 EXPECT_TRUE(IsTensorIdControl(tensor_id)); in TEST()
99 tensor_id = ParseTensorName(input); in TEST()
100 EXPECT_FALSE(IsTensorIdControl(tensor_id)); in TEST()
103 tensor_id = ParseTensorName(input); in TEST()
104 EXPECT_FALSE(IsTensorIdControl(tensor_id)); in TEST()
/external/tensorflow/tensorflow/core/grappler/
Dgraph_view.h159 TensorId tensor_id = ParseTensorName(port.node->input(i)); in GetFanin() local
161 auto it = nodes_.find(tensor_id.node()); in GetFanin()
162 if (it != nodes_.end()) result.emplace(it->second, tensor_id.index()); in GetFanin()
177 TensorId tensor_id = ParseTensorName(port.node->input(port.port_id)); in GetRegularFanin() local
178 return GetOutputPort(tensor_id.node(), tensor_id.index()); in GetRegularFanin()
236 TensorId tensor_id = ParseTensorName(node.input(i)); in GetFanins() local
238 auto it = nodes_.find(tensor_id.node()); in GetFanins()
239 if (it != nodes_.end()) result.emplace(it->second, tensor_id.index()); in GetFanins()
307 TensorId tensor_id = ParseTensorName(node.input(i)); in GetFaninEdges() local
309 auto it = nodes_.find(tensor_id.node()); in GetFaninEdges()
[all …]
Dmutable_graph_view.cc43 bool IsTensorIdPortValid(const TensorId& tensor_id) { in IsTensorIdPortValid() argument
44 return tensor_id.index() >= Graph::kControlSlot; in IsTensorIdPortValid()
47 bool IsTensorIdRegular(const TensorId& tensor_id) { in IsTensorIdRegular() argument
48 return tensor_id.index() > Graph::kControlSlot; in IsTensorIdRegular()
51 bool IsTensorIdControlling(const TensorId& tensor_id) { in IsTensorIdControlling() argument
52 return tensor_id.index() == Graph::kControlSlot; in IsTensorIdControlling()
65 TensorId tensor_id = ParseTensorName(node.input(0)); in IsIdentityConsumingSwitch() local
66 if (IsTensorIdControlling(tensor_id)) { in IsIdentityConsumingSwitch()
70 NodeDef* input_node = graph.GetNode(tensor_id.node()); in IsIdentityConsumingSwitch()
123 TensorId tensor_id = ParseTensorName(control_fanout.node->input(i)); in SwapControlledFanoutInputs() local
[all …]
Dutils.cc163 string TensorIdToString(const TensorId& tensor_id) { in TensorIdToString() argument
164 return tensor_id.index() == 0 ? string(tensor_id.node()) in TensorIdToString()
165 : tensor_id.ToString(); in TensorIdToString()
168 string SafeTensorIdToString(const SafeTensorId& tensor_id) { in SafeTensorIdToString() argument
169 return tensor_id.index() == 0 ? tensor_id.node() : tensor_id.ToString(); in SafeTensorIdToString()
183 bool IsControlInput(const TensorId& tensor_id) { return tensor_id.index() < 0; } in IsControlInput() argument
/external/tensorflow/tensorflow/core/grappler/optimizers/
Dgraph_optimizer_stage.cc52 SafeTensorId tensor_id = ParseTensorName(tensor); in GetTensorProperties() local
54 if (tensor_id.index() < 0) { in GetTensorProperties()
60 ctx.graph_properties->GetOutputProperties(tensor_id.node()); in GetTensorProperties()
63 if (num_outputs == 0 || tensor_id.index() > num_outputs - 1) { in GetTensorProperties()
65 "Node ", tensor_id.node(), in GetTensorProperties()
66 " is missing output properties at position :", tensor_id.index(), in GetTensorProperties()
70 *properties = &output_properties[tensor_id.index()]; in GetTensorProperties()
/external/tensorflow/tensorflow/c/
Dc_api_experimental.h128 int tensor_id,
143 int tensor_id,
167 TF_Session* session, int tensor_id, TF_DataType inputType,
171 TFE_Context* ctx, int tensor_id, TF_DataType inputType, TF_Status* status);
174 int tensor_id,
179 TFE_Context* ctx, int tensor_id, TFE_TensorHandle* tensor,
184 int tensor_id,
189 TF_Session* session, int tensor_id, TF_Status* status);
Dc_api_experimental.cc222 TF_Tensor* TF_DequeueNamedTensor(TF_Session* session, int tensor_id, in TF_DequeueNamedTensor() argument
227 VLOG(1) << "Dequeuing named tensor with id " << tensor_id in TF_DequeueNamedTensor()
234 tensorflow::strings::StrCat("fifo_queue_dequeue_", tensor_id).c_str()); in TF_DequeueNamedTensor()
261 void TF_EnqueueNamedTensor(TF_Session* session, int tensor_id, in TF_EnqueueNamedTensor() argument
267 VLOG(1) << "Enqueuing named tensor with id " << tensor_id in TF_EnqueueNamedTensor()
280 tensorflow::strings::StrCat("fifo_queue_enqueue_", tensor_id).c_str()); in TF_EnqueueNamedTensor()
289 tensorflow::strings::StrCat("arg_tensor_enqueue_", tensor_id).c_str()); in TF_EnqueueNamedTensor()
350 int tensor_id, TF_Status* status) { in createTFEQueue() argument
358 auto shared_name = tensorflow::strings::StrCat("fifo_queue_", tensor_id); in createTFEQueue()
422 TFE_TensorHandle* TFE_DequeueNamedTensor(TF_Session* session, int tensor_id, in TFE_DequeueNamedTensor() argument
[all …]
/external/tensorflow/tensorflow/c/eager/
Dtape.h134 void Watch(int64 tensor_id);
143 void DeleteTrace(int64 tensor_id);
223 void Watch(int64 tensor_id, Gradient* tangent);
227 void DeleteGradient(int64 tensor_id);
277 Gradient* FetchJVP(int64 tensor_id);
373 int64 tensor_id) { in Watch() argument
374 tensor_tape_.emplace(tensor_id, -1); in Watch()
410 int64 tensor_id) { in DeleteTrace() argument
411 auto it = tensor_usage_.find(tensor_id); in DeleteTrace()
420 auto tensor_op_it = tensor_tape_.find(tensor_id); in DeleteTrace()
[all …]
/external/tensorflow/tensorflow/lite/experimental/delegates/hexagon/
Dutils.cc32 bool TensorTypeMatch(int tensor_id, TfLiteContext* context, in TensorTypeMatch() argument
34 const auto& tensor = context->tensors[tensor_id]; in TensorTypeMatch()
65 int tensor_id; in IsNodeSupportedByHexagon() local
67 tensor_id = node->inputs->data[i]; in IsNodeSupportedByHexagon()
68 const auto& tensor = context->tensors[tensor_id]; in IsNodeSupportedByHexagon()
72 tensor_id = node->outputs->data[i]; in IsNodeSupportedByHexagon()
73 const auto& tensor = context->tensors[tensor_id]; in IsNodeSupportedByHexagon()
/external/tensorflow/tensorflow/python/ops/
Dcond_v2.py516 tensor_id = ops.tensor_id(tensor)
517 if tensor_id not in added_inputs:
518 added_inputs.add(tensor_id)
522 input_ids = [ops.tensor_id(t) for t in branch_in]
526 param = branch_input_to_param.get(ops.tensor_id(in_t))
876 tensor_id = ops.tensor_id(tensor)
880 if tensor_id in self._captured_constants:
881 return self._captured_constants[tensor_id]
883 self._captured_constants[tensor_id] = constant_op.constant(
885 return self._captured_constants[tensor_id]
[all …]
/external/tensorflow/tensorflow/lite/delegates/gpu/common/memory_management/
Dmin_cost_flow_assignment.cc179 size_t AssignTensorsToNewSharedObject(size_t tensor_id, in AssignTensorsToNewSharedObject() argument
181 size_t cost = (*usage_records_)[tensor_id].tensor_size; in AssignTensorsToNewSharedObject()
182 is_tensor_assigned_[tensor_id] = true; in AssignTensorsToNewSharedObject()
183 assignment->object_ids[tensor_id] = assignment->object_sizes.size(); in AssignTensorsToNewSharedObject()
184 for (const auto& edge_id : edges_from_[tensor_id]) { in AssignTensorsToNewSharedObject()

123