Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 30 for tftensor$ (0.13 sec)

  1. tensorflow/c/eager/parallel_device/parallel_device_testlib.cc

    // Creates a TFE_TensorHandle with value `v`.
    TensorHandlePtr FloatTensorHandle(float v, TF_Status* status) {
      const int num_bytes = sizeof(float);
      float* values = new float[1];
      values[0] = v;
      std::unique_ptr<TF_Tensor, decltype(&TF_DeleteTensor)> tensor(
          TF_NewTensor(TF_FLOAT, nullptr, 0, values, num_bytes, &FloatDeallocator,
                       nullptr),
          TF_DeleteTensor);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Jun 15 15:44:44 UTC 2021
    - 12.5K bytes
    - Viewed (0)
  2. 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)
  3. 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)
  4. 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)
  5. 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)
  6. 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)
  7. 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)
  8. tensorflow/c/eager/c_api_cluster_test.cc

                                        const std::vector<float>& expected_values) {
      std::unique_ptr<TF_Status, decltype(&TF_DeleteStatus)> status(
          TF_NewStatus(), TF_DeleteStatus);
      TF_Tensor* t = TFE_TensorHandleResolve(handle, status.get());
      ASSERT_EQ(TF_OK, TF_GetCode(status.get())) << TF_Message(status.get());
      std::unique_ptr<float[]> actual_values(new float[expected_values.size()]);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Apr 14 10:03:59 UTC 2023
    - 19.3K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/lite/stablehlo/transforms/legalize_hlo_patterns.td

    def ExpandedDynamicShape : NativeCodeCall<"ExpandedDynamicShape($_builder, $0, $1, $2)">;
    
    def : Pat<(MHLO_ConstantOp:$output $value), (TF_ConstOp $value),
              [(TF_Tensor $output)]>;
    
    //===----------------------------------------------------------------------===//
    // Binary op patterns.
    // Note that these are legalized from chlo.broadcast_* ops, since those are
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Sat Feb 03 08:58:22 UTC 2024
    - 34K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tensorflow/ir/tf_op_base.td

                                  TF_Bool.predicate,
                                  TF_TFDialectType.predicate]>,
                              "tf.dtype">;
    
    // Any TensorFlow tensor type
    def TF_Tensor : TensorOf<[TF_ElementType]>;
    
    //===----------------------------------------------------------------------===//
    // TensorFlow attribute definitions
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Oct 30 06:52:55 UTC 2023
    - 30.5K bytes
    - Viewed (0)
Back to top