Home
last modified time | relevance | path

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

123

/external/tensorflow/tensorflow/lite/micro/
Dtesting_helpers_test.cc24 constexpr int tensor_size = 12; in TF_LITE_MICRO_TEST() local
26 int32_t quantized[tensor_size]; in TF_LITE_MICRO_TEST()
35 TF_LITE_MICRO_EXPECT_EQ(result.bytes, tensor_size * sizeof(int32_t)); in TF_LITE_MICRO_TEST()
38 for (int i = 0; i < tensor_size; i++) { in TF_LITE_MICRO_TEST()
46 constexpr int tensor_size = 12; in TF_LITE_MICRO_TEST() local
49 int32_t quantized[tensor_size]; in TF_LITE_MICRO_TEST()
68 TF_LITE_MICRO_EXPECT_EQ(result.bytes, tensor_size * sizeof(int32_t)); in TF_LITE_MICRO_TEST()
70 for (int i = 0; i < tensor_size; i++) { in TF_LITE_MICRO_TEST()
76 const int tensor_size = 12; in TF_LITE_MICRO_TEST() local
94 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.h77 TensorSizeT tensor_size = usage_records[i].tensor_size; variable
82 size_t size_diff = AbsDiffInElements(pool_it->object_size, tensor_size);
100 auto pool_it = pool.lower_bound({tensor_size, 0});
104 size_diff = pool_it->object_size - tensor_size;
111 tensor_size - pool_it->object_size < size_diff) {
112 size_diff = tensor_size - pool_it->object_size;
127 assignment->object_sizes.push_back(tensor_size);
136 std::max(assignment->object_sizes[shared_id], tensor_size);
171 const TensorSizeT& tensor_size = usage_records[i].tensor_size; in GreedyInOrderAssignmentMultidimensional() local
181 if (IsCoveringObject(shared_object_size, tensor_size)) { in GreedyInOrderAssignmentMultidimensional()
[all …]
Dequality_assignment.h57 const TensorSizeT tensor_size = usage_records[i].tensor_size; in EqualityAssignmentWithHash() local
58 auto pool_it = pool.find(tensor_size); in EqualityAssignmentWithHash()
63 assignment->object_sizes.push_back(tensor_size); in EqualityAssignmentWithHash()
91 const TensorSizeT tensor_size = usage_records[i].tensor_size; in EqualityAssignment() local
97 assignment->object_sizes[obj] == tensor_size) { in EqualityAssignment()
106 assignment->object_sizes.push_back(tensor_size); in EqualityAssignment()
Dgreedy_by_size_assignment.cc43 tensor_size > other.tensor_size))); in operator >()
59 size_t tensor_size; member
103 if (diff >= rec->tensor_size && diff < best_diff) { in GreedyBySizeAssignment()
109 prev_offset, cur_offset + usage_records[allocated_id].tensor_size); in GreedyBySizeAssignment()
131 std::max(assignment->total_size, best_offset + rec->tensor_size); in GreedyBySizeAssignment()
170 priority_info[rec_id].tensor_size = usage_records[rec_id].tensor_size; in GreedyBySizeDistPriorityAssignment()
179 positional_max[pos] >= priority_info[rec_id].tensor_size) { in GreedyBySizeDistPriorityAssignment()
218 usage_records[best_rec_id].tensor_size); in GreedyBySizeDistPriorityAssignment()
224 usage_records[best_rec_id].tensor_size); in GreedyBySizeDistPriorityAssignment()
Dgreedy_by_breadth_assignment.cc60 breadth += tensor_info.usage_record->tensor_size; in GreedyByBreadthAssignment()
87 if (best_size < rec.tensor_size) { in GreedyByBreadthAssignment()
93 } else if (cur_size < rec.tensor_size || cur_size >= best_size) { in GreedyByBreadthAssignment()
122 assignment->object_sizes.push_back(rec.tensor_size); in GreedyByBreadthAssignment()
129 std::max(assignment->object_sizes[best_object], rec.tensor_size); in GreedyByBreadthAssignment()
Dmin_cost_flow_assignment.cc61 AddEdge(source_, RightPartTwin(i), 1, usage_records[i].tensor_size); in Build()
70 if (usage_records[i].tensor_size > in Build()
71 usage_records[record_id].tensor_size) { in Build()
72 cost = usage_records[i].tensor_size - in Build()
73 usage_records[record_id].tensor_size; in Build()
185 size_t cost = (*usage_records_)[tensor_id].tensor_size; in AssignTensorsToNewSharedObject()
Dinternal.cc30 return first.usage_record->tensor_size > second.usage_record->tensor_size; in CompareBySize()
96 task_profile[i].usage_record->tensor_size); in CalculatePositionalMaximums()
101 positional_max.push_back(task_profile[i].usage_record->tensor_size); in CalculatePositionalMaximums()
Dtypes.h36 TensorSizeT tensor_size; member
41 : tensor_size(size), first_task(first), last_task(last) {} in TensorUsageRecord()
/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()
170 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/XNNPACK/src/
Dmemory-planner.c28 const size_t tensor_size_a = (*(struct xnn_value_usage**)a)->tensor_size; in cmp_value_usage_tensor_size()
29 const size_t tensor_size_b = (*(struct xnn_value_usage**)b)->tensor_size; in cmp_value_usage_tensor_size()
138 size_t tensor_size) { in xnn_add_value_allocation_tracker() argument
139 tracker->usage[value_id].tensor_size = tensor_size; in xnn_add_value_allocation_tracker()
163 if (info->tensor_size != 0) { in xnn_plan_value_allocation_tracker()
181 .end = allocated->alloc_offset + allocated->tensor_size, in xnn_plan_value_allocation_tracker()
185 …fset = find_value_alloc_offset(current_live_mem_blocks, num_live_mem_blocks, current->tensor_size); in xnn_plan_value_allocation_tracker()
186 if (mem_arena_size < current->alloc_offset + current->tensor_size) { in xnn_plan_value_allocation_tracker()
187 mem_arena_size = current->alloc_offset + current->tensor_size; in xnn_plan_value_allocation_tracker()
197 if (tracker->usage[i].tensor_size > 0) { in xnn_plan_value_allocation_tracker()
[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()
42 const auto minmax = std::minmax_element(values, values + tensor_size); in Update()
Dcalibrator_test.cc72 const size_t tensor_size = 1 * 8 * 8 * 3; in TEST() local
74 std::vector<float> ones(tensor_size, 1.0f); in TEST()
81 ASSERT_EQ(tensor->bytes, tensor_size * sizeof(float)); in TEST()
82 for (size_t j = 0; j < tensor_size; j++) { in TEST()
92 for (size_t i = 0; i < tensor_size; i++) { in TEST()
96 for (size_t i = 0; i < tensor_size; i++) { in TEST()
135 const size_t tensor_size = 1 * 8 * 8 * 3; in TEST() local
142 ASSERT_EQ(tensor->bytes, tensor_size * sizeof(float)); in TEST()
143 for (size_t j = 0; j < tensor_size; j++) { in TEST()
211 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/core/common_runtime/device/
Ddevice_event_mgr_test.cc197 size_t tensor_size() const { in tensor_size() function in tensorflow::__anon66d29a500511::EMBenchmarkHelper
206 void ReInit(int num_ops, int tensor_size) { in ReInit() argument
210 {tensor_size}, AllocationAttributes())); in ReInit()
215 {tensor_size}, AllocationAttributes())); in ReInit()
221 {tensor_size}, AllocationAttributes())); in ReInit()
222 for (int i = 0; i < tensor_size; ++i) { in ReInit()
230 {tensor_size}, AllocationAttributes())); in ReInit()
231 for (int i = 0; i < tensor_size; ++i) { in ReInit()
479 static void BM_chain_ops(int iters, int tensor_size, int adds_per_round, in BM_chain_ops() argument
482 static void BM_chain_ops(int iters, int tensor_size, int adds_per_round, in BM_chain_ops()
[all …]
/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()
123 static Graph* UnaryOpsCompo(int tensor_size, int repeat_graph, in UnaryOpsCompo() argument
127 Tensor t(DT_FLOAT, TensorShape({tensor_size})); in UnaryOpsCompo()
Dstack.cc167 const Tensor* tensor_size; in Compute() local
168 OP_REQUIRES_OK(ctx, ctx->input("max_size", &tensor_size)); in Compute()
171 ctx, TensorShapeUtils::IsScalar(tensor_size->shape()), in Compute()
173 tensor_size->shape().DebugString())); in Compute()
175 int32 size_value = tensor_size->scalar<int32>()(); in Compute()
/external/XNNPACK/src/xnnpack/
Dmemory-planner.h26 size_t tensor_size; member
54 uint32_t value_id, size_t tensor_size);
/external/tensorflow/tensorflow/lite/python/
Dinterpreter.py415 tensor_size = self._interpreter.TensorSize(tensor_index)
430 'shape': tensor_size,
501 def resize_tensor_input(self, input_index, tensor_size, strict=False): argument
527 tensor_size = np.array(tensor_size, dtype=np.int32)
528 self._interpreter.ResizeInputTensor(input_index, tensor_size, strict)
/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)
/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/python/ops/
Dcollective_ops_xla_test.py38 tensor_size = 10
56 tensor_val = [i + 1.] * tensor_size
/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/keras/layers/preprocessing/benchmarks/
Dindex_lookup_forward_benchmark.py140 for tensor_size in [100, 1000, 10000]:
142 self.bm_adapt_implementation(tensor_size, batch)

123