/external/tensorflow/tensorflow/c/ |
D | c_test_util.h | 31 typedef std::unique_ptr<TF_Tensor, decltype(&TF_DeleteTensor)> 34 TF_Tensor* BoolTensor(int32_t v); 37 TF_Tensor* Int8Tensor(const int64_t* dims, int num_dims, const char* values); 40 TF_Tensor* Int32Tensor(const int64_t* dims, int num_dims, 44 TF_Tensor* Int32Tensor(const std::vector<int32_t>& values); 46 TF_Tensor* Int32Tensor(int32_t v); 48 TF_Tensor* DoubleTensor(double v); 50 TF_Tensor* FloatTensor(float v); 57 TF_Operation* Const(TF_Tensor* t, TF_Graph* graph, TF_Status* s, 140 void SetInputs(std::vector<std::pair<TF_Operation*, TF_Tensor*>> inputs); [all …]
|
D | c_api.h | 222 typedef struct TF_Tensor TF_Tensor; typedef 234 TF_CAPI_EXPORT extern TF_Tensor* TF_NewTensor( 248 TF_CAPI_EXPORT extern TF_Tensor* TF_AllocateTensor(TF_DataType, 254 TF_CAPI_EXPORT extern TF_Tensor* TF_TensorMaybeMove(TF_Tensor* tensor); 257 TF_CAPI_EXPORT extern void TF_DeleteTensor(TF_Tensor*); 260 TF_CAPI_EXPORT extern TF_DataType TF_TensorType(const TF_Tensor*); 263 TF_CAPI_EXPORT extern int TF_NumDims(const TF_Tensor*); 267 TF_CAPI_EXPORT extern int64_t TF_Dim(const TF_Tensor* tensor, int dim_index); 270 TF_CAPI_EXPORT extern size_t TF_TensorByteSize(const TF_Tensor*); 273 TF_CAPI_EXPORT extern void* TF_TensorData(const TF_Tensor*); [all …]
|
D | c_test_util.cc | 45 TF_Tensor* BoolTensor(bool v) { in BoolTensor() 53 TF_Tensor* Int8Tensor(const int64_t* dims, int num_dims, const char* values) { in Int8Tensor() 58 TF_Tensor* t = in Int8Tensor() 64 TF_Tensor* Int32Tensor(const int64_t* dims, int num_dims, in Int32Tensor() 70 TF_Tensor* t = in Int32Tensor() 76 TF_Tensor* Int32Tensor(const std::vector<int32_t>& values) { in Int32Tensor() 81 TF_Tensor* Int32Tensor(int32_t v) { in Int32Tensor() 89 TF_Tensor* DoubleTensor(double v) { in DoubleTensor() 97 TF_Tensor* FloatTensor(float v) { in FloatTensor() 128 void ConstHelper(TF_Tensor* t, TF_Graph* graph, TF_Status* s, const char* name, in ConstHelper() [all …]
|
D | c_api_internal.h | 57 struct TF_Tensor { struct 58 ~TF_Tensor(); 206 Status TF_TensorToTensor(const TF_Tensor* src, Tensor* dst); 208 TF_Tensor* TF_TensorFromTensor(const Tensor& src, TF_Status* status);
|
D | c_api.cc | 195 TF_Tensor::~TF_Tensor() { buffer->Unref(); } in ~TF_Tensor() 197 TF_Tensor* TF_AllocateTensor(TF_DataType dtype, const int64_t* dims, in TF_AllocateTensor() 204 TF_Tensor* TF_NewTensor(TF_DataType dtype, const int64_t* dims, int num_dims, in TF_NewTensor() 234 TF_Tensor* ret = new TF_Tensor{dtype, TensorShape(dimvec), buf}; in TF_NewTensor() 243 TF_Tensor* TF_TensorMaybeMove(TF_Tensor* tensor) { in TF_TensorMaybeMove() 255 void TF_DeleteTensor(TF_Tensor* t) { delete t; } in TF_DeleteTensor() 257 TF_DataType TF_TensorType(const TF_Tensor* t) { return t->dtype; } in TF_TensorType() 258 int TF_NumDims(const TF_Tensor* t) { return t->shape.dims(); } in TF_NumDims() 259 int64_t TF_Dim(const TF_Tensor* t, int dim_index) { in TF_Dim() 262 size_t TF_TensorByteSize(const TF_Tensor* t) { return t->buffer->size(); } in TF_TensorByteSize() [all …]
|
D | c_api_test.cc | 53 TF_Tensor* TF_TensorFromTensor(const Tensor& src, TF_Status* status); 54 Status TF_TensorToTensor(const TF_Tensor* src, Tensor* dst); 133 TF_Tensor* t = TF_NewTensor(TF_FLOAT, dims, 2, values, num_bytes, in TEST() 152 TF_Tensor* t = in TEST() 160 TF_Tensor* t = TF_AllocateTensor(TF_FLOAT, dims, 2, num_bytes); in TEST() 177 TF_Tensor* t = TF_NewTensor(TF_FLOAT, dims, 2, values, num_bytes, in TEST() 180 TF_Tensor* o = TF_TensorMaybeMove(t); in TEST() 238 TF_Tensor* dst = TF_TensorFromTensor(src, status); in TestEncodeDecode() 965 TF_Tensor* out = csession.output_tensor(0); in TEST() 1026 TF_Tensor* out = csession.output_tensor(0); in RunMinTest() [all …]
|
D | kernels.h | 104 TF_Tensor** tensor, TF_Status* status); 111 const TF_Tensor* tensor,
|
D | kernels.cc | 133 void TF_GetInput(TF_OpKernelContext* ctx, int i, TF_Tensor** tensor, in TF_GetInput() 141 TF_Tensor* result = ::tensorflow::TF_TensorFromTensor(cc_tensor, status); in TF_GetInput() 147 void TF_SetOutput(TF_OpKernelContext* ctx, int i, const TF_Tensor* tensor, in TF_SetOutput()
|
D | c_api_experimental_test.cc | 46 TF_Tensor* out = csession.output_tensor(0); in TestFakeIteratorStack() 94 TF_Tensor* image = csession.output_tensor(0); in TEST() 108 TF_Tensor* label = csession.output_tensor(1); in TEST() 199 TF_Tensor* t = TFE_TensorHandleResolve(retvals[0], status); in TEST() 279 TF_Tensor* t = TFE_TensorHandleResolve(recv_retvals[0], status); in TEST()
|
D | c_api_experimental.h | 125 TF_CAPI_EXPORT extern TF_Tensor* TF_DequeueNamedTensor(TF_Session* session, 142 TF_Tensor* tensor,
|
D | c_test.c | 41 TF_Tensor* input; in compute()
|
D | c_api_function_test.cc | 80 void Run(const std::vector<std::pair<TF_Operation*, TF_Tensor*>>& inputs, in Run() 88 void RunT(const std::vector<std::pair<TF_Operation*, TF_Tensor*>>& inputs, in RunT() 103 TF_Tensor* out = csession.output_tensor(i); in RunT() 113 void Run(const std::vector<std::pair<TF_Operation*, TF_Tensor*>>& inputs, in Run() 126 TF_Tensor* out = csession.output_tensor(i); in Run() 136 void CompareInt32Tensor(const std::vector<int32_t>& expected, TF_Tensor* t) { in CompareInt32Tensor() 884 TF_Tensor* tensor_123 = Int32Tensor({1, 2, 3}); in TEST_F() 1561 TF_Tensor* tensor_shape = Int32Tensor({37, 1}); in DefineStatefulFunction() 1715 TF_Tensor* out = csession.output_tensor(0); in TEST_F()
|
/external/tensorflow/tensorflow/c/eager/ |
D | c_api_test_util.cc | 26 TF_Tensor* t = TF_AllocateTensor(TF_FLOAT, nullptr, 0, sizeof(float)); in TestScalarTensorHandle() 38 TF_Tensor* t = TF_AllocateTensor(TF_INT32, nullptr, 0, sizeof(int)); in TestScalarTensorHandle() 50 TF_Tensor* t = TF_AllocateTensor(TF_BOOL, nullptr, 0, sizeof(bool)); in TestScalarTensorHandle() 63 TF_Tensor* t = TF_AllocateTensor( in DoubleTestMatrixTensorHandle() 77 TF_Tensor* t = TF_AllocateTensor( in TestMatrixTensorHandle() 91 TF_Tensor* t = TF_AllocateTensor( in DoubleTestMatrixTensorHandle3X2() 105 TF_Tensor* t = TF_AllocateTensor( in TestMatrixTensorHandle3X2() 147 TF_Tensor* t = TF_AllocateTensor( in TestAxisTensorHandle()
|
D | c_api_test.cc | 179 TF_Tensor* t = TFE_TensorHandleResolve(retvals[0], status); in TestRemoteExecute() 265 TF_Tensor* t = TFE_TensorHandleResolve(retval_task0, status); in TestRemoteExecuteSilentCopies() 304 TF_Tensor* t = TFE_TensorHandleResolve(handle, status.get()); in CheckTFE_TensorHandleHasFloats() 447 TF_Tensor* t = TFE_TensorHandleResolve(h, status.get()); in TEST() 469 TF_Tensor* t = TFE_TensorHandleResolve(hcpu, status.get()); in TensorHandleCopyBetweenDevices() 509 TF_Tensor* tcopy = TFE_TensorHandleResolve(hcopy, status.get()); in TensorHandleCopyBetweenDevices() 583 TF_Tensor* t = TFE_TensorHandleResolve(hcpu, status.get()); in TensorHandleCopyBetweenTwoGPUDevices() 630 TF_Tensor* tcopy = TFE_TensorHandleResolve(hcopy, status.get()); in TensorHandleCopyBetweenTwoGPUDevices() 663 TF_Tensor* t = TFE_TensorHandleResolve(hcpu, status.get()); in TensorHandleSilentCopy() 709 TF_Tensor* t = TFE_TensorHandleResolve(hcpu, status.get()); in TensorHandleSilentCopyLocal() [all …]
|
D | c_api.h | 159 TF_CAPI_EXPORT extern TFE_TensorHandle* TFE_NewTensorHandle(TF_Tensor* t, 199 TF_CAPI_EXPORT extern TF_Tensor* TFE_TensorHandleResolve(TFE_TensorHandle* h, 338 TF_Tensor* tensor,
|
/external/tensorflow/tensorflow/java/src/main/native/ |
D | tensor_jni.cc | 29 TF_Tensor* requireHandle(JNIEnv* env, jlong handle) { in requireHandle() 35 return reinterpret_cast<TF_Tensor*>(handle); in requireHandle() 240 StringTensorWriter(TF_Tensor* t, int num_elements) in StringTensorWriter() 272 StringTensorReader(const TF_Tensor* t, int num_elements) in StringTensorReader() 351 TF_Tensor* t = TF_AllocateTensor(static_cast<TF_DataType>(dtype), dims_copy, in Java_org_tensorflow_Tensor_allocate() 371 TF_Tensor* t = TF_AllocateTensor(TF_STRING, nullptr, 0, 8 + dst_len); in Java_org_tensorflow_Tensor_allocateScalarBytes() 454 TF_Tensor* t = TF_AllocateTensor(TF_STRING, dims, num_dims, in Java_org_tensorflow_Tensor_allocateNonScalarBytes() 480 TF_DeleteTensor(reinterpret_cast<TF_Tensor*>(handle)); in Java_org_tensorflow_Tensor_delete() 486 TF_Tensor* t = requireHandle(env, handle); in Java_org_tensorflow_Tensor_buffer() 499 TF_Tensor* t = requireHandle(env, handle); in Java_org_tensorflow_Tensor_dtype() [all …]
|
D | session_jni.cc | 146 std::unique_ptr<TF_Tensor* []> input_values(new TF_Tensor*[ninputs]); in Java_org_tensorflow_Session_run() 148 std::unique_ptr<TF_Tensor* []> output_values(new TF_Tensor*[noutputs]); in Java_org_tensorflow_Session_run()
|
D | operation_builder_jni.cc | 44 TF_Tensor* requireTensor(JNIEnv* env, jlong handle) { in requireTensor() 50 return reinterpret_cast<TF_Tensor*>(handle); in requireTensor() 211 TF_Tensor* t = requireTensor(env, tensor_handle); in Java_org_tensorflow_OperationBuilder_setAttrTensor() 227 std::unique_ptr<TF_Tensor* []> tensors(new TF_Tensor*[n]); in Java_org_tensorflow_OperationBuilder_setAttrTensorList()
|
/external/tensorflow/tensorflow/python/lib/core/ |
D | safe_ptr.h | 34 void operator()(TF_Tensor* p) const { TF_DeleteTensor(p); } in operator() 54 using Safe_TF_TensorPtr = std::unique_ptr<TF_Tensor, detail::TFTensorDeleter>; 55 Safe_TF_TensorPtr make_safe(TF_Tensor* tensor);
|
D | ndarray_tensor.cc | 220 Status CopyTF_TensorStringsToPyArray(const TF_Tensor* src, uint64 nelems, in CopyTF_TensorStringsToPyArray() 273 const TF_Tensor* tensor, tensorflow::int64* nelems) { in GetPyArrayDimensionsForTensor() 293 Status GetPyArrayDescrForTensor(const TF_Tensor* tensor, in GetPyArrayDescrForTensor() 373 TF_Tensor* original = tensor.get(); in TF_TensorToPyArray() 374 TF_Tensor* moved = TF_TensorMaybeMove(tensor.release()); in TF_TensorToPyArray() 466 Status TF_TensorToTensor(const TF_Tensor* src, Tensor* dst); 467 TF_Tensor* TF_TensorFromTensor(const tensorflow::Tensor& src, 471 Safe_TF_TensorPtr tf_tensor = make_safe(static_cast<TF_Tensor*>(nullptr)); in NdarrayToTensor()
|
D | safe_ptr.cc | 24 Safe_TF_TensorPtr make_safe(TF_Tensor* tensor) { in make_safe()
|
/external/tensorflow/tensorflow/go/ |
D | session.go | 356 feedTensors []*C.TF_Tensor 358 fetchTensors []*C.TF_Tensor 365 fetchTensors: make([]*C.TF_Tensor, len(fetches)), 396 func ptrTensor(l []*C.TF_Tensor) **C.TF_Tensor { argument
|
D | attrs.go | 141 list := make([]*C.TF_Tensor, meta.list_size) 220 var v *C.TF_Tensor
|
/external/tensorflow/tensorflow/c/kernels/ |
D | bitcast_op.cc | 93 TF_Tensor* tensor; in BitcastOp_Compute() 120 TF_Tensor* output = TF_AllocateTensor(k->output_data_type, dims, 0, in BitcastOp_Compute()
|
/external/tensorflow/tensorflow/python/client/ |
D | tf_session_helper.cc | 91 inputs_safe.emplace_back(make_safe(static_cast<TF_Tensor*>(nullptr))); in TF_Run_wrapper_helper() 389 input_vals_safe.emplace_back(make_safe(static_cast<TF_Tensor*>(nullptr))); in TF_SessionRun_wrapper_helper() 420 for (TF_Tensor* output : output_vals) { in TF_SessionRun_wrapper_helper() 672 TF_Tensor* result_tensor; in TF_TryEvaluateConstant_wrapper()
|