/external/tensorflow/tensorflow/lite/micro/ |
D | testing_helpers_test.cc | 24 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/ |
D | greedy_in_order_assignment.h | 73 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 …]
|
D | equality_assignment.h | 54 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()
|
D | greedy_by_size_assignment.cc | 38 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()
|
D | greedy_by_breadth_assignment.cc | 59 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()
|
D | min_cost_flow_assignment.cc | 57 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()
|
D | internal.cc | 25 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()
|
D | types.h | 35 TensorSizeT tensor_size; member 40 : tensor_size(size), first_task(first), last_task(last) {} in TensorUsageRecord()
|
D | naive_assignment.h | 41 assignment->object_sizes[i] = record.tensor_size; in NaiveAssignment()
|
/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() 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/ |
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() 41 const auto minmax = std::minmax_element(values, values + tensor_size); in Update()
|
D | calibrator_test.cc | 71 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 …]
|
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/lite/python/ |
D | interpreter.py | 322 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/ |
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() 119 static Graph* UnaryOpsCompo(int tensor_size, int repeat_graph, in UnaryOpsCompo() argument 123 Tensor t(DT_FLOAT, TensorShape({tensor_size})); in UnaryOpsCompo()
|
D | stack.cc | 166 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/ |
D | gpu_event_mgr_test.cc | 342 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/ |
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)
|
D | examples_v2_test.sh | 55 ${DEBUG_FIBONACCI_BIN} --tensor_size=2
|
/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/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/lib/core/ |
D | ndarray_tensor.cc | 276 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/ |
D | tflite_driver.cc | 141 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()
|