/external/tensorflow/tensorflow/lite/micro/ |
D | testing_helpers_test.cc | 24 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/ |
D | greedy_in_order_assignment.h | 77 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 …]
|
D | equality_assignment.h | 57 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()
|
D | greedy_by_size_assignment.cc | 43 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()
|
D | greedy_by_breadth_assignment.cc | 60 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()
|
D | min_cost_flow_assignment.cc | 61 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()
|
D | internal.cc | 30 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()
|
D | types.h | 36 TensorSizeT tensor_size; member 41 : tensor_size(size), first_task(first), last_task(last) {} in TensorUsageRecord()
|
/external/tensorflow/tensorflow/core/distributed_runtime/ |
D | rpcbench_test.cc | 124 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/ |
D | memory-planner.c | 28 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/ |
D | calibration_logger.cc | 26 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()
|
D | calibrator_test.cc | 72 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 …]
|
D | calibration_logger.h | 30 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/ |
D | trivial_test_graph_input_yielder.cc | 31 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()
|
D | trivial_test_graph_input_yielder.h | 31 TrivialTestGraphInputYielder(int num_stages, int width, int tensor_size,
|
/external/tensorflow/tensorflow/core/common_runtime/device/ |
D | device_event_mgr_test.cc | 197 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/ |
D | unary_ops_composition_test.cc | 91 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()
|
D | stack.cc | 167 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/ |
D | memory-planner.h | 26 size_t tensor_size; member 54 uint32_t value_id, size_t tensor_size);
|
/external/tensorflow/tensorflow/lite/python/ |
D | interpreter.py | 415 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/ |
D | debug_fibonacci_v2.py | 50 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/ |
D | debug_fibonacci.py | 39 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/ |
D | collective_ops_xla_test.py | 38 tensor_size = 10 56 tensor_val = [i + 1.] * tensor_size
|
/external/tensorflow/tensorflow/lite/testing/nnapi_tflite_zip_tests/ |
D | tflite_driver.cc | 94 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/ |
D | index_lookup_forward_benchmark.py | 140 for tensor_size in [100, 1000, 10000]: 142 self.bm_adapt_implementation(tensor_size, batch)
|