Home
last modified time | relevance | path

Searched refs:tensor_size (Results 1 – 25 of 49) sorted by relevance

12

/external/tensorflow/tensorflow/lite/micro/
Dtesting_helpers_test.cc24 const int tensor_size = 12; in TF_LITE_MICRO_TEST() local
27 int32_t quantized[tensor_size]; in TF_LITE_MICRO_TEST()
36 TF_LITE_MICRO_EXPECT_EQ(result.bytes, tensor_size * sizeof(int32_t)); in TF_LITE_MICRO_TEST()
40 for (int i = 0; i < tensor_size; i++) { in TF_LITE_MICRO_TEST()
48 const int tensor_size = 12; in TF_LITE_MICRO_TEST() local
52 int32_t quantized[tensor_size]; in TF_LITE_MICRO_TEST()
71 TF_LITE_MICRO_EXPECT_EQ(result.bytes, tensor_size * sizeof(int32_t)); in TF_LITE_MICRO_TEST()
74 for (int i = 0; i < tensor_size; i++) { in TF_LITE_MICRO_TEST()
80 const int tensor_size = 12; in TF_LITE_MICRO_TEST() local
100 TF_LITE_MICRO_EXPECT_EQ(result.bytes, tensor_size * sizeof(int8_t)); in TF_LITE_MICRO_TEST()
[all …]
/external/tensorflow/tensorflow/lite/delegates/gpu/common/memory_management/
Dgreedy_in_order_assignment.h73 TensorSizeT tensor_size = usage_records[i].tensor_size; variable
78 size_t size_diff = AbsDiffInElements(pool_it->object_size, tensor_size);
96 auto pool_it = pool.lower_bound({tensor_size, 0});
100 size_diff = pool_it->object_size - tensor_size;
107 tensor_size - pool_it->object_size < size_diff) {
108 size_diff = tensor_size - pool_it->object_size;
123 assignment->object_sizes.push_back(tensor_size);
132 std::max(assignment->object_sizes[shared_id], tensor_size);
167 const TensorSizeT& tensor_size = usage_records[i].tensor_size; in GreedyInOrderAssignmentMultidimensional() local
177 if (IsCoveringObject(shared_object_size, tensor_size)) { in GreedyInOrderAssignmentMultidimensional()
[all …]
Dequality_assignment.h54 const TensorSizeT tensor_size = usage_records[i].tensor_size; in EqualityAssignmentWithHash() local
55 auto pool_it = pool.find(tensor_size); in EqualityAssignmentWithHash()
60 assignment->object_sizes.push_back(tensor_size); in EqualityAssignmentWithHash()
88 const TensorSizeT tensor_size = usage_records[i].tensor_size; in EqualityAssignment() local
94 assignment->object_sizes[obj] == tensor_size) { in EqualityAssignment()
103 assignment->object_sizes.push_back(tensor_size); in EqualityAssignment()
Dgreedy_by_size_assignment.cc38 tensor_size > other.tensor_size))); in operator >()
54 size_t tensor_size; member
98 if (diff >= rec->tensor_size && diff < best_diff) { in GreedyBySizeAssignment()
104 prev_offset, cur_offset + usage_records[allocated_id].tensor_size); in GreedyBySizeAssignment()
126 std::max(assignment->total_size, best_offset + rec->tensor_size); in GreedyBySizeAssignment()
165 priority_info[rec_id].tensor_size = usage_records[rec_id].tensor_size; in GreedyBySizeDistPriorityAssignment()
174 positional_max[pos] >= priority_info[rec_id].tensor_size) { in GreedyBySizeDistPriorityAssignment()
213 usage_records[best_rec_id].tensor_size); in GreedyBySizeDistPriorityAssignment()
219 usage_records[best_rec_id].tensor_size); in GreedyBySizeDistPriorityAssignment()
Dgreedy_by_breadth_assignment.cc59 breadth += tensor_info.usage_record->tensor_size; in GreedyByBreadthAssignment()
86 if (best_size < rec.tensor_size) { in GreedyByBreadthAssignment()
92 } else if (cur_size < rec.tensor_size || cur_size >= best_size) { in GreedyByBreadthAssignment()
121 assignment->object_sizes.push_back(rec.tensor_size); in GreedyByBreadthAssignment()
128 std::max(assignment->object_sizes[best_object], rec.tensor_size); in GreedyByBreadthAssignment()
Dmin_cost_flow_assignment.cc57 AddEdge(source_, RightPartTwin(i), 1, usage_records[i].tensor_size); in Build()
66 if (usage_records[i].tensor_size > in Build()
67 usage_records[record_id].tensor_size) { in Build()
68 cost = usage_records[i].tensor_size - in Build()
69 usage_records[record_id].tensor_size; in Build()
181 size_t cost = (*usage_records_)[tensor_id].tensor_size; in AssignTensorsToNewSharedObject()
Dinternal.cc25 return first.usage_record->tensor_size > second.usage_record->tensor_size; in CompareBySize()
91 task_profile[i].usage_record->tensor_size); in CalculatePositionalMaximums()
96 positional_max.push_back(task_profile[i].usage_record->tensor_size); in CalculatePositionalMaximums()
Dtypes.h35 TensorSizeT tensor_size; member
40 : tensor_size(size), first_task(first), last_task(last) {} in TensorUsageRecord()
Dnaive_assignment.h41 assignment->object_sizes[i] = record.tensor_size; in NaiveAssignment()
/external/tensorflow/tensorflow/core/distributed_runtime/
Drpcbench_test.cc124 GraphDef CreateGraphDef(int num_stages, int width, int tensor_size, in CreateGraphDef() argument
133 Output x = Const(s.WithOpName("x"), 0.0f, {tensor_size, 1}); in CreateGraphDef()
157 string DebugString(const Tensor& x, const Tensor& y, int tensor_size) { in DebugString() argument
158 CHECK_EQ(x.NumElements(), tensor_size); in DebugString()
159 CHECK_EQ(y.NumElements(), tensor_size); in DebugString()
163 CHECK_GE(tensor_size, 2); in DebugString()
169 static void BM_Helper(int iters, int width, int num_stages, int tensor_size, in BM_Helper() argument
176 GraphDef def = CreateGraphDef(num_stages, width, tensor_size, in BM_Helper()
183 Tensor x(DT_FLOAT, TensorShape({tensor_size, 1})); in BM_Helper()
188 "; tensor bytes/send: ", tensor_size * sizeof(float))); in BM_Helper()
[all …]
/external/tensorflow/tensorflow/lite/tools/optimize/calibration/
Dcalibration_logger.cc26 TfLiteStatus MinMax::Update(const float* values, size_t tensor_size, in Update() argument
28 if (tensor_size <= 0) return kTfLiteOk; in Update()
31 for (size_t i = 0; i < tensor_size; ++i) { in Update()
41 const auto minmax = std::minmax_element(values, values + tensor_size); in Update()
Dcalibrator_test.cc71 const size_t tensor_size = 1 * 8 * 8 * 3; in TEST() local
73 std::vector<float> ones(tensor_size, 1.0f); in TEST()
80 ASSERT_EQ(tensor->bytes, tensor_size * sizeof(float)); in TEST()
81 for (size_t j = 0; j < tensor_size; j++) { in TEST()
91 for (size_t i = 0; i < tensor_size; i++) { in TEST()
95 for (size_t i = 0; i < tensor_size; i++) { in TEST()
134 const size_t tensor_size = 1 * 8 * 8 * 3; in TEST() local
141 ASSERT_EQ(tensor->bytes, tensor_size * sizeof(float)); in TEST()
142 for (size_t j = 0; j < tensor_size; j++) { in TEST()
210 const size_t tensor_size = 1 * 8 * 8 * 3; in TEST() local
[all …]
Dcalibration_logger.h30 TfLiteStatus Update(const float* values, size_t tensor_size,
53 size_t tensor_size, in LogTensorValue() argument
56 tensor_values, tensor_size, error_reporter); in LogTensorValue()
/external/tensorflow/tensorflow/core/grappler/inputs/
Dtrivial_test_graph_input_yielder.cc31 GraphDef CreateGraphDef(int num_stages, int width, int tensor_size, in CreateGraphDef() argument
39 const int batch_size = tensor_size < 0 ? 1 : tensor_size; in CreateGraphDef()
90 int num_stages, int width, int tensor_size, bool insert_queue, in TrivialTestGraphInputYielder() argument
94 tensor_size_(tensor_size), in TrivialTestGraphInputYielder()
Dtrivial_test_graph_input_yielder.h31 TrivialTestGraphInputYielder(int num_stages, int width, int tensor_size,
/external/tensorflow/tensorflow/lite/python/
Dinterpreter.py322 tensor_size = self._interpreter.TensorSize(tensor_index)
335 'shape': tensor_size,
403 def resize_tensor_input(self, input_index, tensor_size): argument
417 tensor_size = np.array(tensor_size, dtype=np.int32)
418 self._interpreter.ResizeInputTensor(input_index, tensor_size)
/external/tensorflow/tensorflow/core/kernels/
Dunary_ops_composition_test.cc91 static Graph* UnaryOpsChain(int tensor_size, int repeat_graph, in UnaryOpsChain() argument
95 Tensor t(DT_FLOAT, TensorShape({tensor_size})); in UnaryOpsChain()
119 static Graph* UnaryOpsCompo(int tensor_size, int repeat_graph, in UnaryOpsCompo() argument
123 Tensor t(DT_FLOAT, TensorShape({tensor_size})); in UnaryOpsCompo()
Dstack.cc166 const Tensor* tensor_size; in Compute() local
167 OP_REQUIRES_OK(ctx, ctx->input("max_size", &tensor_size)); in Compute()
170 ctx, TensorShapeUtils::IsScalar(tensor_size->shape()), in Compute()
172 tensor_size->shape().DebugString())); in Compute()
174 int32 size_value = tensor_size->scalar<int32>()(); in Compute()
/external/tensorflow/tensorflow/core/common_runtime/gpu/
Dgpu_event_mgr_test.cc342 size_t tensor_size() const { in tensor_size() function in tensorflow::__anon160907330511::EMBenchmarkHelper
351 void ReInit(int num_ops, int tensor_size) { in ReInit() argument
355 {tensor_size}, AllocationAttributes())); in ReInit()
360 {tensor_size}, AllocationAttributes())); in ReInit()
366 {tensor_size}, AllocationAttributes())); in ReInit()
367 for (int i = 0; i < tensor_size; ++i) { in ReInit()
375 {tensor_size}, AllocationAttributes())); in ReInit()
376 for (int i = 0; i < tensor_size; ++i) { in ReInit()
625 static void BM_chain_ops(int iters, int tensor_size, int adds_per_round, in BM_chain_ops() argument
628 static void BM_chain_ops(int iters, int tensor_size, int adds_per_round, in BM_chain_ops()
[all …]
/external/tensorflow/tensorflow/python/debug/examples/v2/
Ddebug_fibonacci_v2.py50 n0 = tf.constant(np.ones([FLAGS.tensor_size] * 2), dtype=tf.int32)
51 n1 = tf.constant(np.ones([FLAGS.tensor_size] * 2), dtype=tf.int32)
Dexamples_v2_test.sh55 ${DEBUG_FIBONACCI_BIN} --tensor_size=2
/external/tensorflow/tensorflow/python/debug/examples/v1/
Ddebug_fibonacci.py39 np.ones([FLAGS.tensor_size] * 2), dtype=tf.int32, name="node_00")
41 np.ones([FLAGS.tensor_size] * 2), dtype=tf.int32, name="node_01")
/external/tensorflow/tensorflow/lite/testing/nnapi_tflite_zip_tests/
Dtflite_driver.cc94 size_t tensor_size = tensor.bytes / sizeof(T); in TypedCheck() local
96 if (tensor_size != num_elements_) { in TypedCheck()
98 << " elements, got " << tensor_size << std::endl; in TypedCheck()
104 for (int i = 0; i < tensor_size; ++i) { in TypedCheck()
/external/tensorflow/tensorflow/python/lib/core/
Dndarray_tensor.cc276 const size_t tensor_size = TF_TensorByteSize(src); in CopyTF_TensorStringsToPyArray() local
277 const char* limit = static_cast<const char*>(tensor_data) + tensor_size; in CopyTF_TensorStringsToPyArray()
287 if (expected_tensor_size - tensor_size) { in CopyTF_TensorStringsToPyArray()
291 " strings, but the tensor is encoded in ", tensor_size, " bytes"); in CopyTF_TensorStringsToPyArray()
/external/tensorflow/tensorflow/lite/testing/
Dtflite_driver.cc141 size_t tensor_size = tensor.bytes / sizeof(T); in TypedCheck() local
143 if (tensor_size != num_elements_) { in TypedCheck()
145 << " elements, got " << tensor_size << std::endl; in TypedCheck()
151 for (int i = 0; i < tensor_size; ++i) { in TypedCheck()

12