Home
last modified time | relevance | path

Searched refs:cpu_allocator (Results 1 – 25 of 70) sorted by relevance

123

/external/tensorflow/tensorflow/core/common_runtime/
Dcopy_tensor.cc51 void CopyHostToDevice(const Tensor* input, Allocator* cpu_allocator, in CopyHostToDevice() argument
57 Tensor copy(cpu_allocator, DT_VARIANT, input->shape()); in CopyHostToDevice()
66 [dst, recv_dev_context, out_allocator, status_cb, cpu_allocator, in CopyHostToDevice()
71 CopyHostToDevice(&from, cpu_allocator, out_allocator, edge_name, in CopyHostToDevice()
121 Allocator* cpu_allocator, Allocator* out_allocator, in CopyDeviceToDevice() argument
129 Tensor copy(cpu_allocator, DT_VARIANT, input->shape()); in CopyDeviceToDevice()
138 [copy_function, cpu_allocator, src, dst, src_alloc_attr, dst_alloc_attr, in CopyDeviceToDevice()
145 CopyDeviceToDevice(copy_function, cpu_allocator, out_allocator, in CopyDeviceToDevice()
223 Allocator* cpu_allocator = src->GetAllocator(host_alloc_attrs); in ViaDMA() local
234 CopyDeviceToDevice(ri.copy_function, cpu_allocator, out_allocator, in ViaDMA()
[all …]
Dsingle_threaded_cpu_device.cc65 if (!parsed.FromProto(cpu_allocator(), tensor_proto)) { in MakeTensorFromProto()
86 return cpu_allocator(); in GetAllocator()
Dmkl_threadpool_device_test.cc33 options, "/device:CPU:0", Bytes(256), DeviceLocality(), cpu_allocator()); in TEST()
Dcopy_tensor.h72 void CopyDeviceToHost(const Tensor* input, Allocator* cpu_allocator,
Dthreadpool_device_test.cc57 DeviceLocality(), cpu_allocator()); in TEST()
Dmkl_cpu_allocator.h281 return cpu_allocator()->AllocateRaw(kAlignment, size); in MallocHook()
286 cpu_allocator()->DeallocateRaw(ptr); in FreeHook()
/external/tensorflow/tensorflow/lite/delegates/flex/
Dbuffer_map.cc37 proto->set_allocator_name(tensorflow::cpu_allocator()->Name()); in FillAllocationDescription()
49 data(), tensorflow::cpu_allocator()); in LogAllocation()
57 tensorflow::cpu_allocator(), false); in LogDeallocation()
67 : BaseTfLiteTensorBuffer(tensorflow::cpu_allocator()->AllocateRaw( in TfLiteTensorBuffer()
83 tensorflow::cpu_allocator()->DeallocateRaw(data()); in ~TfLiteTensorBuffer()
103 tensorflow::cpu_allocator(), static_cast<tensorflow::tstring*>(data()), in ~StringTfLiteTensorBuffer()
116 tensorflow::cpu_allocator(), num_strings, in StringTfLiteTensorBuffer()
/external/tensorflow/tensorflow/compiler/tests/
Dunary_ops_composition_test.cc79 Allocator* cpu_allocator = device_->GetAllocator(host_alloc_attrs); in RunComposedOp() local
83 Tensor input_on_host(cpu_allocator, dtype, shape); in RunComposedOp()
96 Tensor expected_tensor(cpu_allocator, dtype, shape); in RunComposedOp()
100 Tensor output_on_host(cpu_allocator, output->dtype(), output->shape()); in RunComposedOp()
/external/tensorflow/tensorflow/core/common_runtime/gpu/
Dgpu_device_factory.cc34 Allocator* gpu_allocator, Allocator* cpu_allocator) in GPUDevice() argument
36 physical_device_desc, gpu_allocator, cpu_allocator, in GPUDevice()
68 Allocator* cpu_allocator) override { in CreateGPUDevice() argument
71 gpu_allocator, cpu_allocator); in CreateGPUDevice()
/external/tensorflow/tensorflow/core/framework/
Dallocator_test.cc137 Allocator* a = cpu_allocator(); in TEST()
176 Allocator* a = cpu_allocator(); in TEST()
187 Allocator* a = cpu_allocator(); in TEST()
199 Allocator* a = cpu_allocator(); in TEST()
227 Allocator* a = cpu_allocator(); in BM_Allocation()
Dop_kernel_test.cc169 std::move(device_type), &device_, cpu_allocator(), in ExpectSuccess()
185 CreateOpKernel(std::move(device_type), &device_, cpu_allocator(), in ExpectFailure()
353 return cpu_allocator(); in GetAllocator()
364 CreateOpKernel(DEVICE_CPU, params.device, cpu_allocator(), in TEST_F()
398 return cpu_allocator(); in GetAllocator()
409 return cpu_allocator(); in GetScopedAllocator()
449 DEVICE_CPU, params.device, cpu_allocator(), in TEST_F()
513 cpu_allocator(), def,
547 cpu_allocator(), def, in ExpectFailure()
737 DEVICE_CPU, params.device, cpu_allocator(), in TEST_F()
[all …]
Dcpu_allocator_impl.cc156 explicit CPUSubAllocator(CPUAllocator* cpu_allocator) in CPUSubAllocator() argument
157 : SubAllocator({}, {}), cpu_allocator_(cpu_allocator) {} in CPUSubAllocator()
Dallocator.cc81 Allocator* cpu_allocator(int numa_node) { in cpu_allocator() function
/external/tensorflow/tensorflow/core/kernels/sparse/
Ddense_to_csr_sparse_matrix_op.cc89 Tensor dense_shape(cpu_allocator(), DT_INT64, TensorShape({rank})); in Compute()
103 Tensor batch_ptr(cpu_allocator(), DT_INT32, TensorShape({batch_size + 1})); in Compute()
104 Tensor csr_col_ind(cpu_allocator(), DT_INT32, TensorShape({total_nnz})); in Compute()
105 Tensor csr_row_ptr(cpu_allocator(), DT_INT32, in Compute()
249 Tensor dense_shape_t(cpu_allocator(), DT_INT64, TensorShape({rank})); in ComputeAsync()
256 Tensor batch_ptr_t(cpu_allocator(), DT_INT32, in ComputeAsync()
Dsparse_cholesky_op.cc89 Tensor batch_ptr(cpu_allocator(), DT_INT32, TensorShape({batch_size + 1})); in Compute()
175 Tensor output_row_ptr(cpu_allocator(), DT_INT32, in Compute()
177 Tensor output_col_ind(cpu_allocator(), DT_INT32, TensorShape({total_nnz})); in Compute()
178 Tensor output_values(cpu_allocator(), DataTypeToEnum<T>::value, in Compute()
Dsparse_tensor_to_csr_sparse_matrix_op.cc79 Tensor batch_ptr(cpu_allocator(), DT_INT32, TensorShape({batch_size + 1})); in Compute()
80 Tensor csr_col_ind(cpu_allocator(), DT_INT32, TensorShape({total_nnz})); in Compute()
81 Tensor csr_row_ptr(cpu_allocator(), DT_INT32, in Compute()
188 Tensor batch_ptr_t(cpu_allocator(), DT_INT32, in ComputeAsync()
Dsparse_mat_mul_op.cc154 Tensor output_shape(cpu_allocator(), DT_INT64, TensorShape({rank})); in Compute()
161 Tensor batch_ptr(cpu_allocator(), DT_INT32, TensorShape({batch_size + 1})); in Compute()
215 Tensor output_row_ptr(cpu_allocator(), DT_INT32, in Compute()
217 Tensor output_col_ind(cpu_allocator(), DT_INT32, TensorShape({total_nnz})); in Compute()
218 Tensor output_values(cpu_allocator(), DataTypeToEnum<T>::value, in Compute()
359 Tensor c_dense_shape_t(cpu_allocator(), DT_INT64, TensorShape({rank})); in Compute()
379 Tensor c_batch_ptr_t(cpu_allocator(), DT_INT32, in Compute()
501 Tensor c_t(cpu_allocator(), DT_VARIANT, TensorShape({})); in Compute()
Dsoftmax_op.cc81 Tensor output_t(cpu_allocator(), DT_VARIANT, TensorShape({})); in Compute()
190 Tensor gradient_t(cpu_allocator(), DT_VARIANT, TensorShape({})); in Compute()
Dzeros_op.h54 Tensor batch_ptr_t(cpu_allocator(), DT_INT32, in operator()
/external/tensorflow/tensorflow/core/tpu/
Dvirtual_device.cc76 return cpu_allocator(); in GetAllocator()
83 Allocator* allocator = cpu_allocator(); in MakeTensorFromProto()
/external/tensorflow/tensorflow/c/
Dtf_tensor.cc50 return allocate_tensor(operation, len, cpu_allocator()); in allocate_tensor()
56 allocator = cpu_allocator(); in deallocate_buffer()
93 tensorflow::cpu_allocator()); in TF_AllocateTensor()
96 tensorflow::cpu_allocator(), /*owns_memory=*/true); in TF_AllocateTensor()
/external/tensorflow/tensorflow/compiler/jit/kernels/
Dxla_ops.cc424 Allocator* cpu_allocator = ctx->device()->GetAllocator(host_alloc_attrs); in Compute() local
428 Tensor compilation_key(cpu_allocator, DT_STRING, TensorShape({})); in Compute()
430 Tensor compilation_successful(cpu_allocator, DT_BOOL, TensorShape({})); in Compute()
432 ctx->set_output(0, Tensor(cpu_allocator, DT_STRING, TensorShape({}))); in Compute()
445 Tensor compilation_key(cpu_allocator, DT_STRING, TensorShape({})); in Compute()
448 Tensor compilation_successful(cpu_allocator, DT_BOOL, TensorShape({})); in Compute()
/external/tensorflow/tensorflow/core/grappler/optimizers/
Devaluation_utils.h45 return cpu_allocator(); in GetAllocator()
Devaluation_utils.cc54 if (!parsed.FromProto(cpu_allocator(), tensor_proto)) { in MakeTensorFromProto()
/external/tensorflow/tensorflow/core/kernels/
Dimmutable_constant_op_test.cc44 : memptr_(cpu_allocator()->AllocateRaw(kTestAlignment, length)), in TestReadOnlyMemoryRegion()
47 cpu_allocator()->DeallocateRaw(memptr_); in ~TestReadOnlyMemoryRegion()

123