Search Options

Results per page
Sort
Preferred Languages
Advance

Results 81 - 90 of 95 for tftensor$ (0.14 sec)

  1. tensorflow/c/eager/c_api.cc

        TFE_Context* ctx) {
      return static_cast<TFE_ContextDevicePlacementPolicy>(
          tensorflow::unwrap(ctx)->GetDevicePlacementPolicy());
    }
    
    TFE_TensorHandle* TFE_NewTensorHandle(const TF_Tensor* t, TF_Status* status) {
      tensorflow::Tensor tensor;
      status->status = tensorflow::TF_TensorToTensor(t, &tensor);
      if (!status->status.ok()) return nullptr;
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 09 08:11:23 UTC 2024
    - 44K bytes
    - Viewed (0)
  2. tensorflow/c/eager/c_api_remote_test_util.cc

      }
    
      auto* retval_task0 = TFE_TensorHandleCopyToDevice(
          retvals[0], ctx, "/job:localhost/replica:0/task:0/device:CPU:0", status);
      ASSERT_EQ(TF_GetCode(status), TF_OK) << TF_Message(status);
    
      TF_Tensor* t = TFE_TensorHandleResolve(retval_task0, status);
      ASSERT_EQ(TF_GetCode(status), TF_OK) << TF_Message(status);
      TFE_DeleteTensorHandle(retval_task0);
      float product[4] = {0};
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Dec 11 22:56:03 UTC 2020
    - 9.1K bytes
    - Viewed (0)
  3. tensorflow/c/eager/parallel_device/parallel_device_testlib.h

    template <typename value_type>
    void ExpectScalarEq(TFE_TensorHandle* handle, value_type expected_value) {
      std::unique_ptr<TF_Status, decltype(&TF_DeleteStatus)> status(
          TF_NewStatus(), TF_DeleteStatus);
      std::unique_ptr<TF_Tensor, decltype(&TF_DeleteTensor)> actual_value(
          TFE_TensorHandleResolve(handle, status.get()), TF_DeleteTensor);
      ASSERT_EQ(TF_GetCode(status.get()), TF_OK) << TF_Message(status.get());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Feb 09 01:12:35 UTC 2021
    - 6.9K bytes
    - Viewed (0)
  4. tensorflow/c/eager/c_api_test_util.h

    template <class T, TF_DataType datatype>
    TFE_TensorHandle* TestTensorHandleWithDims(TFE_Context* ctx, const T* data,
                                               const int64_t* dims, int num_dims) {
      TF_Status* status = TF_NewStatus();
      TF_Tensor* t = TFE_AllocateHostTensor(ctx, datatype, dims, num_dims, status);
      memcpy(TF_TensorData(t), data, TF_TensorByteSize(t));
      TFE_TensorHandle* th = TFE_NewTensorHandleFromTensor(ctx, t, status);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Jul 17 23:43:59 UTC 2023
    - 7.7K bytes
    - Viewed (0)
  5. tensorflow/c/eager/c_api_experimental.cc

      if (t == nullptr) {
        status->status =
            tensorflow::errors::InvalidArgument("Unsupported dtype: ", dtype);
        return nullptr;
      }
    
      return new TF_Tensor{t};
    }
    
    TFE_TensorHandle* TFE_NewTensorHandleFromTensor(TFE_Context* ctx, TF_Tensor* t,
                                                    TF_Status* status) {
      return tensorflow::wrap(
          tensorflow::unwrap(ctx)->CreateLocalHandle(t->tensor));
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 11 23:52:39 UTC 2024
    - 35.9K bytes
    - Viewed (0)
  6. tensorflow/c/eager/c_api_experimental.h

      // appended later), but should include any information specific to this custom
      // device which would be useful for debugging.
      //
      // Optional. If null, defaults to resolving the TFE_TensorHandle into a
      // TF_Tensor and summarizing that.
      TF_Buffer* (*summarize)(void* data, TF_Status* status) = nullptr;
    } TFE_CustomDeviceTensorHandle;
    
    // Creates a new TensorHandle from memory residing in a custom device. Takes
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Feb 21 22:37:46 UTC 2024
    - 39.5K bytes
    - Viewed (0)
  7. tensorflow/cc/experimental/libtf/tests/function_test.cc

            /*attr=*/{{"T", tensorflow::DataTypeSlice({DT_FLOAT, DT_FLOAT})}},
            /*dep=*/{},
            /*device=*/""}});
    }
    
    template <typename T>
    void ExpectEquals(AbstractTensorHandle* t, T expected) {
      TF_Tensor* result_t;
      Status s = tensorflow::GetValue(t, &result_t);
      ASSERT_TRUE(s.ok()) << s.message();
      auto value = static_cast<T*>(TF_TensorData(result_t));
      EXPECT_EQ(*value, expected);
      TF_DeleteTensor(result_t);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 19 21:44:52 UTC 2023
    - 11.1K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tfrt/tests/tf_to_corert/fallback.mlir

    // CHECK-LABEL: func @main
    // CHECK-SAME: {{.*}} !tfrt.chain
    // CHECK-SAME: [[serialized:%.*]]: !tfrt_fallback.tf_tensor
    func.func @main(%serialized: tensor<32x!tf_type.string>) -> (tensor<?x2xi64>) attributes {tf.entry_function = {inputs = "input0", outputs = "ParseExample/ParseExampleV2"}} {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 08 00:18:59 UTC 2024
    - 9.1K bytes
    - Viewed (0)
  9. tensorflow/c/eager/custom_device_test.cc

      TFE_TensorHandle* var_value_unpacked =
          UnpackTensorHandle(var_value, status.get());
      ASSERT_TRUE(TF_GetCode(status.get()) == TF_OK) << TF_Message(status.get());
      std::unique_ptr<TF_Tensor, decltype(&TF_DeleteTensor)> resolved_value(
          TFE_TensorHandleResolve(var_value_unpacked, status.get()),
          TF_DeleteTensor);
      ASSERT_TRUE(TF_GetCode(status.get()) == TF_OK) << TF_Message(status.get());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Aug 27 23:39:24 UTC 2020
    - 18.4K bytes
    - Viewed (0)
  10. tensorflow/c/eager/parallel_device/parallel_device_lib.h

      for (int device_index = 0; device_index < num_underlying_devices();
           ++device_index) {
        auto device_value = absl::make_unique<DataType>();
        *device_value = values[device_index];
        std::unique_ptr<TF_Tensor, decltype(&TF_DeleteTensor)> tensor(
            TF_NewTensor(
                datatype_enum, /*dims=*/nullptr, /*num_dims=*/0,
                device_value.release(), sizeof(DataType),
                [](void* data, size_t, void* arg) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Apr 25 15:21:13 UTC 2023
    - 12.9K bytes
    - Viewed (0)
Back to top