/external/tensorflow/tensorflow/c/eager/ |
D | c_api_test_util.h | 24 TFE_TensorHandle* TestScalarTensorHandle(TFE_Context* ctx, float value); 27 TFE_TensorHandle* TestScalarTensorHandle(TFE_Context* ctx, int value); 30 TFE_TensorHandle* TestScalarTensorHandle(TFE_Context* ctx, bool value); 33 TFE_TensorHandle* TestScalarTensorHandle(TFE_Context* ctx, 37 TFE_TensorHandle* DoubleTestMatrixTensorHandle(TFE_Context* ctx); 40 TFE_TensorHandle* TestMatrixTensorHandle(TFE_Context* ctx); 44 TFE_TensorHandle* TestMatrixTensorHandleWithInput(TFE_Context* ctx, 49 TFE_TensorHandle* TestTensorHandleWithDimsFloat(TFE_Context* ctx, float data[], 53 TFE_TensorHandle* TestTensorHandleWithDimsInt(TFE_Context* ctx, int data[], 57 TFE_TensorHandle* TestMatrixTensorHandle100x100(TFE_Context* ctx); [all …]
|
D | c_api.h | 138 typedef struct TFE_TensorHandle TFE_TensorHandle; typedef 140 TF_CAPI_EXPORT extern TFE_TensorHandle* TFE_NewTensorHandle(const TF_Tensor* t, 143 TF_CAPI_EXPORT extern void TFE_DeleteTensorHandle(TFE_TensorHandle* h); 144 TF_CAPI_EXPORT extern TF_DataType TFE_TensorHandleDataType(TFE_TensorHandle* h); 146 TF_CAPI_EXPORT extern int TFE_TensorHandleNumDims(TFE_TensorHandle* h, 148 TF_CAPI_EXPORT extern int64_t TFE_TensorHandleNumElements(TFE_TensorHandle* h, 151 TF_CAPI_EXPORT extern int64_t TFE_TensorHandleDim(TFE_TensorHandle* h, 161 TFE_TensorHandle* h, TF_Status* status); 167 TFE_TensorHandle* h, TF_Status* status); 172 TF_CAPI_EXPORT extern TFE_TensorHandle* TFE_TensorHandleCopySharingTensor( [all …]
|
D | c_api_test_util.cc | 31 TFE_TensorHandle* TestScalarTensorHandle(TFE_Context* ctx, float value) { in TestScalarTensorHandle() 36 TFE_TensorHandle* th = TFE_NewTensorHandleFromTensor(ctx, t, status); in TestScalarTensorHandle() 43 TFE_TensorHandle* TestScalarTensorHandle(TFE_Context* ctx, in TestScalarTensorHandle() 49 TFE_TensorHandle* th = TFE_NewTensorHandleFromTensor(ctx, t, status); in TestScalarTensorHandle() 56 TFE_TensorHandle* TestScalarTensorHandle(TFE_Context* ctx, int value) { in TestScalarTensorHandle() 61 TFE_TensorHandle* th = TFE_NewTensorHandleFromTensor(ctx, t, status); in TestScalarTensorHandle() 68 TFE_TensorHandle* TestScalarTensorHandle(TFE_Context* ctx, bool value) { in TestScalarTensorHandle() 73 TFE_TensorHandle* th = TFE_NewTensorHandleFromTensor(ctx, t, status); in TestScalarTensorHandle() 80 TFE_TensorHandle* DoubleTestMatrixTensorHandle(TFE_Context* ctx) { in DoubleTestMatrixTensorHandle() 87 TFE_TensorHandle* th = TFE_NewTensorHandleFromTensor(ctx, t, status); in DoubleTestMatrixTensorHandle() [all …]
|
D | custom_device_testutil.cc | 42 TFE_TensorHandle* tensor; 44 explicit LoggedTensor(TFE_TensorHandle* tensor) : tensor(tensor) {} in LoggedTensor() 52 TFE_TensorHandle* MakeLoggedTensorHandle( in MakeLoggedTensorHandle() 67 TFE_TensorHandle* CopyToLoggingDevice(TFE_Context* context, in CopyToLoggingDevice() 68 TFE_TensorHandle* tensor, in CopyToLoggingDevice() 71 TFE_TensorHandle* t = TFE_TensorHandleCopyToDevice( in CopyToLoggingDevice() 80 TFE_TensorHandle* CopyTensorFromLoggingDevice(TFE_Context* context, in CopyTensorFromLoggingDevice() 81 TFE_TensorHandle* tensor, in CopyTensorFromLoggingDevice() 91 TFE_TensorHandle** outputs, TF_Status* s, in LoggingDeviceExecute() 117 TFE_TensorHandle* input = TFE_OpGetFlatInput(original_op, j, s); in LoggingDeviceExecute() [all …]
|
D | c_api_test.cc | 60 TFE_TensorHandle* m = TestMatrixTensorHandle(ctx); in BM_InitOp() 84 TFE_TensorHandle* m = TestMatrixTensorHandle(ctx); in BM_Execute() 87 TFE_TensorHandle* retvals[1]; in BM_Execute() 126 TFE_TensorHandle* m = TestMatrixTensorHandle(ctx); in BM_Execute_Identity() 128 TFE_TensorHandle* retvals[1]; in BM_Execute_Identity() 184 TFE_TensorHandle* h = TestMatrixTensorHandle(ctx); in TEST() 209 TFE_TensorHandle* hcpu = TestMatrixTensorHandle(ctx); in TensorHandleCopyBetweenDevices() 226 TFE_TensorHandle* hdevice = in TensorHandleCopyBetweenDevices() 233 TFE_TensorHandle* hdevice2 = in TensorHandleCopyBetweenDevices() 241 TFE_TensorHandle* hcopy = in TensorHandleCopyBetweenDevices() [all …]
|
D | c_api_experimental.h | 378 TF_CAPI_EXPORT extern void* TFE_TensorHandleDevicePointer(TFE_TensorHandle*, 384 TF_CAPI_EXPORT extern size_t TFE_TensorHandleDeviceMemorySize(TFE_TensorHandle*, 390 TF_CAPI_EXPORT extern TFE_TensorHandle* TFE_NewTensorHandleFromDeviceMemory( 444 TFE_TensorHandle* (*copy_tensor_to_device)(TFE_Context* context, 445 TFE_TensorHandle* tensor, 450 TFE_TensorHandle* (*copy_tensor_from_device)(TFE_Context* context, 451 TFE_TensorHandle* tensor, 467 TFE_TensorHandle** outputs, TF_Status* s, void* device_info); 478 TFE_TensorHandle* (*pack)(TFE_Context* context, TFE_TensorHandle** handles, 536 TF_CAPI_EXPORT extern TFE_TensorHandle* TFE_NewCustomDeviceTensorHandle( [all …]
|
D | tfe_tensorhandle_internal.h | 27 typedef struct TFE_TensorHandle TFE_TensorHandle; typedef 32 TFE_TensorHandle); 34 TFE_TensorHandle*);
|
D | c_api_remote_test_util.cc | 104 TFE_TensorHandle* h0_task0 = TestMatrixTensorHandle(ctx); in TestRemoteExecuteSilentCopies() 105 TFE_TensorHandle* h1_task0 = TestMatrixTensorHandle(ctx); in TestRemoteExecuteSilentCopies() 106 std::vector<TFE_TensorHandle*> handles_task0; in TestRemoteExecuteSilentCopies() 117 std::vector<TFE_TensorHandle*> handles_task2; in TestRemoteExecuteSilentCopies() 128 TFE_TensorHandle* packed_handle = nullptr; in TestRemoteExecuteSilentCopies() 131 std::vector<TFE_TensorHandle*> packed_handles = {h1_task2}; in TestRemoteExecuteSilentCopies() 170 TFE_TensorHandle* retvals[1]; in TestRemoteExecuteSilentCopies()
|
D | c_api_distributed_test.cc | 160 TFE_TensorHandle* h0 = TestVariable(ctx, 1.0, task1_name); in TestFunctionWithPackedInput() 161 TFE_TensorHandle* h1 = TestVariable(ctx, 2.0, task2_name); in TestFunctionWithPackedInput() 162 TFE_TensorHandle* h2 = TestVariable(ctx, 3.0, task0_name); in TestFunctionWithPackedInput() 174 std::vector<TFE_TensorHandle*> handles = {h0, h1, h2}; in TestFunctionWithPackedInput() 175 TFE_TensorHandle* packed_handle = in TestFunctionWithPackedInput() 205 TFE_TensorHandle* retvals[1] = {nullptr}; in TestFunctionWithPackedInput() 377 TFE_TensorHandle* var_handle = TestVariable(ctx, 2.0, dev2_name); in TEST() 391 TFE_TensorHandle* retvals[1] = {nullptr}; in TEST() 500 TFE_TensorHandle* var_handle = TestVariable(ctx, 2.0, dev2_name); in TestDistributedFunctionCancellation() 515 TFE_TensorHandle* retvals[1] = {nullptr}; in TestDistributedFunctionCancellation() [all …]
|
D | c_api.cc | 266 TFE_TensorHandle* TFE_NewTensorHandle(const TF_Tensor* t, TF_Status* status) { in TFE_NewTensorHandle() 274 void TFE_DeleteTensorHandle(TFE_TensorHandle* h) { in TFE_DeleteTensorHandle() 284 TF_DataType TFE_TensorHandleDataType(TFE_TensorHandle* h) { in TFE_TensorHandleDataType() 288 int TFE_TensorHandleNumDims(TFE_TensorHandle* h, TF_Status* status) { in TFE_TensorHandleNumDims() 299 int64_t TFE_TensorHandleNumElements(TFE_TensorHandle* h, TF_Status* status) { in TFE_TensorHandleNumElements() 310 int64_t TFE_TensorHandleDim(TFE_TensorHandle* h, int dim_index, in TFE_TensorHandleDim() 322 const char* TFE_TensorHandleDeviceName(TFE_TensorHandle* h, TF_Status* status) { in TFE_TensorHandleDeviceName() 330 const char* TFE_TensorHandleBackingDeviceName(TFE_TensorHandle* h, in TFE_TensorHandleBackingDeviceName() 339 TF_CAPI_EXPORT extern TFE_TensorHandle* TFE_TensorHandleCopySharingTensor( in TFE_TensorHandleCopySharingTensor() 340 TFE_TensorHandle* h, TF_Status* status) { in TFE_TensorHandleCopySharingTensor() [all …]
|
D | gradients_util.cc | 41 TFE_TensorHandle** result) { in ScalarTensorHandleHelper() 48 TFE_TensorHandle* th = TFE_NewTensorHandleFromTensor(ctx, t, status.get()); in ScalarTensorHandleHelper() 56 TFE_TensorHandle** result) { in TensorHandleWithDimsFloatHelper() 62 TFE_TensorHandle* th = TFE_NewTensorHandleFromTensor(ctx, t, status.get()); in TensorHandleWithDimsFloatHelper() 70 TFE_TensorHandle** result) { in TensorHandleWithDimsIntHelper() 76 TFE_TensorHandle* th = TFE_NewTensorHandleFromTensor(ctx, t, status.get()); in TensorHandleWithDimsIntHelper() 90 TFE_TensorHandle* input_eager; in ScalarTensorHandle() 106 TFE_TensorHandle* input_eager; in TensorHandleWithDimsFloat() 122 TFE_TensorHandle* input_eager; in TensorHandleWithDimsInt() 133 TFE_TensorHandle* result_t = in GetValue()
|
D | c_api_cluster_test.cc | 40 void CheckTFE_TensorHandleHasFloats(TFE_TensorHandle* handle, in CheckTFE_TensorHandleHasFloats() 61 TFE_TensorHandle* h0_task0 = TestMatrixTensorHandle(ctx); in CheckRemoteMatMulExecutesOK() 67 TFE_TensorHandle* retvals[1]; in CheckRemoteMatMulExecutesOK() 92 void ReadVariable(TFE_Context* ctx, TFE_TensorHandle* var, in ReadVariable() 93 TFE_TensorHandle** out_value) { in ReadVariable() 160 TFE_TensorHandle* h0_task0_new = TestMatrixTensorHandle(ctx); in TestRemoteExecuteChangeServerDef() 274 TFE_TensorHandle* var_handle0 = TestVariable(ctx, 1.0, dev0_name); in TestRemoteExecuteUpdateServerDefResourceAccess() 276 TFE_TensorHandle* var_handle1 = TestVariable(ctx, 2.0, dev1_name); in TestRemoteExecuteUpdateServerDefResourceAccess() 279 TFE_TensorHandle* value_handle = nullptr; in TestRemoteExecuteUpdateServerDefResourceAccess() 430 TFE_TensorHandle* var_handle0 = TestVariable(ctx, 1.0, dev0_name); in TestConnectToCluster() [all …]
|
D | custom_device_test.cc | 42 TFE_TensorHandle* hcpu = TestMatrixTensorHandle(context); in TEST() 44 TFE_TensorHandle* hdevice = in TEST() 53 TFE_TensorHandle* retval; in TEST() 122 TFE_TensorHandle* var_handle = nullptr; in TEST() 132 std::unique_ptr<TFE_TensorHandle, decltype(&TFE_DeleteTensorHandle)> one( in TEST() 154 TFE_TensorHandle* var_value = nullptr; in TEST() 163 TFE_TensorHandle* var_value_unpacked = in TEST() 207 TFE_TensorHandle* var_handle = nullptr; in TEST() 217 std::unique_ptr<TFE_TensorHandle, decltype(&TFE_DeleteTensorHandle)> one( in TEST() 239 TFE_TensorHandle* var_value = nullptr; in TEST() [all …]
|
D | c_api_experimental_test.cc | 283 TFE_TensorHandle* h = TFE_NewTensorHandle(t, status); in TEST() 292 std::vector<TFE_TensorHandle*> result; in TEST() 330 TFE_TensorHandle* m = TestMatrixTensorHandle(ctx); in Executor_MatMul_CPU() 332 TFE_TensorHandle* retvals[2] = {nullptr, nullptr}; in Executor_MatMul_CPU() 365 TFE_DeleteTensorHandle(static_cast<TFE_TensorHandle*>(tensor_handle)); in Deleter() 375 TFE_TensorHandle* m = TestMatrixTensorHandle(ctx); in TEST() 385 TFE_TensorHandle* copy = TFE_TensorHandleCopyToDevice(m, ctx, name, status); in TEST() 392 TFE_TensorHandle* copy_aliased = TFE_NewTensorHandleFromDeviceMemory( in TEST() 395 TFE_TensorHandle* on_host = in TEST() 415 TFE_TensorHandle* h = nullptr; in TEST() [all …]
|
/external/tensorflow/tensorflow/c/eager/parallel_device/ |
D | parallel_device_testlib.h | 41 Variable(TFE_TensorHandle* handle, TF_DataType type) in Variable() 57 void Assign(TFE_Context* context, TFE_TensorHandle* value, TF_Status* status); 59 void AssignAdd(TFE_Context* context, TFE_TensorHandle* value, 66 TFE_TensorHandle* value, TF_Status* status); 70 TFE_TensorHandle* handle_; 86 TFE_Context* context, TFE_TensorHandle* input, 93 const std::array<TFE_TensorHandle*, num_replicas>& components, 96 TensorHandlePtr Multiply(TFE_Context* context, TFE_TensorHandle* first, 97 TFE_TensorHandle* second, TF_Status* status); 101 void ExpectScalarEq(TFE_TensorHandle* handle, value_type expected_value); [all …]
|
D | parallel_device.cc | 45 absl::variant<ParallelTensor*, TFE_TensorHandle*>; 98 absl::get<TFE_TensorHandle*>(inputs[i]), status)); in ExecuteWithSpecialOps() 122 if (absl::holds_alternative<TFE_TensorHandle*>(inputs[0])) { in ExecuteWithSpecialOps() 146 if (absl::holds_alternative<TFE_TensorHandle*>(input)) { in ExecuteWithSpecialOps() 156 context, absl::get<TFE_TensorHandle*>(input), status)); in ExecuteWithSpecialOps() 236 TFE_TensorHandle* CopyToParallelDevice(TFE_Context* context, in CopyToParallelDevice() 237 TFE_TensorHandle* tensor, in CopyToParallelDevice() 259 TFE_TensorHandle* CopyTensorFromParallelDevice(TFE_Context* context, in CopyTensorFromParallelDevice() 260 TFE_TensorHandle* tensor, in CopyTensorFromParallelDevice() 277 TFE_TensorHandle** outputs, TF_Status* status, in ParallelDeviceExecute() [all …]
|
D | parallel_device_testlib.cc | 53 TFE_TensorHandle* var_handle = nullptr; in Create() 90 TFE_TensorHandle* var_value = nullptr; in Read() 97 TFE_TensorHandle* value, TF_Status* status) { in GeneralAssignment() 115 void Variable::AssignAdd(TFE_Context* context, TFE_TensorHandle* value, in AssignAdd() 120 void Variable::Assign(TFE_Context* context, TFE_TensorHandle* value, in Assign() 160 TFE_Context* context, TFE_TensorHandle* input, in ExtractPerDeviceValues() 173 TFE_TensorHandle* result_handles[num_replicas]; in ExtractPerDeviceValues() 182 TensorHandlePtr Multiply(TFE_Context* context, TFE_TensorHandle* first, in Multiply() 183 TFE_TensorHandle* second, TF_Status* status) { in Multiply() 195 TFE_TensorHandle* result_handle; in Multiply() [all …]
|
D | parallel_device_lib.cc | 89 std::vector<TFE_TensorHandle*> inputs, 100 std::vector<TFE_TensorHandle*> inputs, 128 std::vector<TFE_TensorHandle*> op_inputs_ TF_GUARDED_BY(execution_mutex_); 177 std::vector<TFE_TensorHandle*> inputs, in StartExecute() 222 std::vector<TFE_TensorHandle*> inputs, in Execute() 242 std::vector<TFE_TensorHandle*> unwrapped_results(expected_max_outputs); in Execute() 253 for (TFE_TensorHandle* unwrapped_result : unwrapped_results) { in Execute() 273 TFE_Context* context, TFE_TensorHandle* tensor, TF_Status* status) const { in CopyToParallelDevice() 277 TFE_TensorHandle* t = TFE_TensorHandleCopyToDevice( in CopyToParallelDevice() 327 std::vector<TFE_TensorHandle*> device_inputs; in StartExecute()
|
/external/tensorflow/tensorflow/cc/experimental/base/public/ |
D | tensorhandle.h | 54 explicit TensorHandle(TFE_TensorHandle* handle) : handle_(handle) {} in TensorHandle() 62 TFE_TensorHandle* GetTFETensorHandle() const { return handle_.get(); } in GetTFETensorHandle() 66 void Reset(TFE_TensorHandle* handle) { handle_.reset(handle); } in Reset() 69 void operator()(TFE_TensorHandle* p) const { TFE_DeleteTensorHandle(p); } in operator() 71 std::unique_ptr<TFE_TensorHandle, TFETensorHandleDeleter> handle_; 86 TFE_TensorHandle* tensor_handle = TFE_NewTensorHandleFromTensor( in FromTensor()
|
/external/tensorflow/tensorflow/c/experimental/saved_model/internal/ |
D | saved_model_api_test.cc | 117 std::vector<TFE_TensorHandle*> compute_fn_inputs; in TEST_P() 118 TFE_TensorHandle* input_a = TestScalarTensorHandle(ctx, 2.0f); in TEST_P() 119 TFE_TensorHandle* input_b = TestScalarTensorHandle(ctx, 1.0f); in TEST_P() 129 TFE_TensorHandle* compute_fn_outputs[1] = {nullptr}; in TEST_P() 256 std::vector<TFE_TensorHandle*> compute_fn_inputs; in TEST_P() 257 TFE_TensorHandle* input_a = TestScalarTensorHandle(ctx, 2.0f); in TEST_P() 258 TFE_TensorHandle* input_b = TestScalarTensorHandle(ctx, 1.0f); in TEST_P() 267 std::vector<TFE_TensorHandle*> compute_fn_outputs( in TEST_P() 325 TFE_TensorHandle* read_file_fn_outputs[1] = {nullptr}; in TEST_P() 384 std::vector<TFE_TensorHandle*> lookup_fn_inputs; in TEST_P() [all …]
|
/external/tensorflow/tensorflow/java/src/main/native/ |
D | eager_operation_jni.cc | 39 TFE_TensorHandle* requireTensorHandle(JNIEnv* env, jlong handle) { in requireTensorHandle() 44 return reinterpret_cast<TFE_TensorHandle*>(handle); in requireTensorHandle() 59 TFE_DeleteTensorHandle(reinterpret_cast<TFE_TensorHandle*>(handle)); in Java_org_tensorflow_EagerOperation_deleteTensorHandle() 64 TFE_TensorHandle* tensor_handle = requireTensorHandle(env, handle); in Java_org_tensorflow_EagerOperation_resolveTensorHandle() 112 TFE_TensorHandle* tensor_handle = requireTensorHandle(env, handle); in Java_org_tensorflow_EagerOperation_dataType() 120 TFE_TensorHandle* tensor_handle = requireTensorHandle(env, handle); in Java_org_tensorflow_EagerOperation_numDims() 136 TFE_TensorHandle* tensor_handle = requireTensorHandle(env, handle); in Java_org_tensorflow_EagerOperation_dim()
|
/external/tensorflow/tensorflow/python/eager/ |
D | pywrap_tensor.h | 27 TFE_TensorHandle* EagerTensor_Handle(const PyObject* o); 37 TFE_TensorHandle* ConvertToEagerTensor(TFE_Context* ctx, PyObject* value, 41 PyObject* TFE_TensorHandleToNumpy(TFE_TensorHandle* handle, TF_Status* status);
|
D | pywrap_tensor_conversion.h | 75 TFE_TensorHandle* Lookup(PyObject* value, tensorflow::DataType dtype, 80 absl::string_view device_name, TFE_TensorHandle* h); 100 absl::flat_hash_map<Key, TFE_TensorHandle*> cache;
|
/external/tensorflow/tensorflow/python/lib/core/ |
D | safe_ptr.h | 35 void operator()(TFE_TensorHandle* p) const { TFE_DeleteTensorHandle(p); } in operator() 56 std::unique_ptr<TFE_TensorHandle, detail::TFETensorHandleDeleter>; 57 Safe_TFE_TensorHandlePtr make_safe(TFE_TensorHandle* handle);
|
/external/tensorflow/tensorflow/security/advisory/ |
D | tfsa-2020-023.md | 12 TFE_TensorHandle* thandle = EagerTensor_Handle(eager_tensor_pyobject_ptr); 19 …#0 0x55b0ba5c410a in tensorflow::(anonymous namespace)::GetTensorFromHandle(TFE_TensorHandle*, TF_… 20 …#1 0x55b0ba5c38f4 in tensorflow::TFE_HandleToDLPack(TFE_TensorHandle*, TF_Status*) third_party/ten… 27 TFE_TensorHandle* EagerTensor_Handle(const PyObject* o) {
|