Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 10 of 12 for TensorHandle (0.17 seconds)

  1. tensorflow/c/eager/immediate_execution_tensor_handle.h

    #include "tensorflow/core/platform/status.h"
    
    namespace tensorflow {
    
    // Abstract interface to a TensorHandle.
    //
    // A TensorHandle is management class around a Tensor which may track additional
    // metadata and synchronization.
    //
    // This allows us to hide concrete implementations of TensorHandle from header
    // files. The interface lists the common functionality that must be provided by
    Created: Tue Apr 07 12:39:13 GMT 2026
    - Last Modified: Sat Oct 12 05:11:17 GMT 2024
    - 4.3K bytes
    - Click Count (0)
  2. tensorflow/c/eager/c_api_debug.cc

    #include "tensorflow/core/common_runtime/eager/tensor_handle.h"
    #include "tensorflow/core/platform/status.h"
    
    using tensorflow::string;
    
    namespace {
    
    std::vector<int64_t> TensorShapeAsVector(const tensorflow::TensorHandle& handle,
                                             absl::Status* status) {
      std::vector<int64_t> shape;
      int rank = -1;
      *status = handle.NumDims(&rank);
      if (!status->ok()) {
        return shape;
      }
    Created: Tue Apr 07 12:39:13 GMT 2026
    - Last Modified: Sat Oct 12 05:11:17 GMT 2024
    - 2.5K bytes
    - Click Count (0)
  3. tensorflow/c/eager/c_api.cc

      if (!tensorflow::TensorHandle::classof(unwrapped_handle)) {
        status->status = tensorflow::errors::InvalidArgument("Invalid handle");
        return nullptr;
      }
      tensorflow::TensorHandle* handle =
          tensorflow::TensorHandleFromInterface(unwrapped_handle);
    
      if (handle->Type() != tensorflow::TensorHandle::LOCAL) {
        status->status = tensorflow::errors::InvalidArgument(
    Created: Tue Apr 07 12:39:13 GMT 2026
    - Last Modified: Fri Nov 07 05:55:21 GMT 2025
    - 43.9K bytes
    - Click Count (0)
  4. tensorflow/c/eager/abstract_tensor_handle.cc

      absl::Status s = Shape(&shape);
      std::string shape_string;
      if (!s.ok()) {
        shape_string = "<error computing shape>";
      } else {
        shape_string = shape.DebugString();
      }
      return absl::StrCat("TensorHandle(shape=", shape_string,
                          ", dtype=", DataType_Name(DataType()),
                          ", type=", FullType().DebugString(), ")");
    }
    
    absl::Status AbstractTensorHandle::TensorHandleStatus() const {
    Created: Tue Apr 07 12:39:13 GMT 2026
    - Last Modified: Sat Oct 12 05:11:17 GMT 2024
    - 1.4K bytes
    - Click Count (0)
  5. tensorflow/c/eager/immediate_execution_tensor_handle.cc

      }
      absl::Status s;
      const char* device_name = DeviceName(&s);
      if (!s.ok()) {
        device_name = "<error fetching device name>";
      }
      return absl::StrCat("TensorHandle(", value_string, ", shape=", shape_string,
                          ", dtype=", DataType_Name(DataType()), ", device=\"",
                          device_name, "\")");
    }
    
    Created: Tue Apr 07 12:39:13 GMT 2026
    - Last Modified: Sat Oct 12 05:24:07 GMT 2024
    - 2.1K bytes
    - Click Count (0)
  6. tensorflow/c/eager/abstract_tensor_handle.h

      ~AbstractTensorHandle() override {}
    
     public:
      // Returns tensor dtype.
      virtual tensorflow::DataType DataType() const = 0;
    
      // Returns the status of the tensor handle. If it is a tfrt::TensorHandle,
      // the tensor handle can be an error and return non-OK status.
      virtual absl::Status TensorHandleStatus() const;
    
      // Returns tensor shape. If tensor has unknown rank, shape remains untouched.
    Created: Tue Apr 07 12:39:13 GMT 2026
    - Last Modified: Sat Oct 12 05:11:17 GMT 2024
    - 3K bytes
    - Click Count (0)
  7. tensorflow/c/eager/immediate_execution_context.h

      virtual ImmediateExecutionTensorHandle* CreateLocalHandleFromTFTensor(
          tensorflow::Tensor& t, const char* d_name) = 0;
    
      // Convert a TFRT TensorHandle to tensorflow::TensorHandle.
      virtual ImmediateExecutionTensorHandle* TFTensorHandleFromInterface(
          ImmediateExecutionTensorHandle* handle) = 0;
    
      virtual std::vector<std::string> GetLoggedOpsTestonly() { return {}; }
    
    Created: Tue Apr 07 12:39:13 GMT 2026
    - Last Modified: Sat Oct 12 05:11:17 GMT 2024
    - 12.3K bytes
    - Click Count (0)
  8. tensorflow/c/eager/c_api_experimental.cc

            tensorflow::TensorHandleFromInterface(unwrapped_handle));
      }
      tensorflow::EagerContext* context =
          tensorflow::ContextFromInterface(tensorflow::unwrap(ctx));
      tensorflow::TensorHandle* handle = nullptr;
      status->status = tensorflow::TensorHandle::CreatePackedHandle(
          std::move(tensor_handles), context, &handle);
      return tensorflow::wrap(handle);
    }
    
    Created: Tue Apr 07 12:39:13 GMT 2026
    - Last Modified: Sat Oct 12 05:11:17 GMT 2024
    - 35.9K bytes
    - Click Count (0)
  9. tensorflow/c/eager/dlpack.cc

      if (h == nullptr) {
        status->status = tensorflow::errors::InvalidArgument("Invalid handle");
        return nullptr;
      }
      tensorflow::TensorHandle* handle =
          tensorflow::TensorHandleFromInterface(tensorflow::unwrap(h));
      if (handle->Type() != TensorHandle::LOCAL) {
        status->status = tensorflow::errors::InvalidArgument(
            "DLPack doesn't support ", handle->TypeString(), " tensor");
        return nullptr;
      }
    Created: Tue Apr 07 12:39:13 GMT 2026
    - Last Modified: Thu Mar 13 23:41:52 GMT 2025
    - 13K bytes
    - Click Count (0)
  10. tensorflow/c/eager/custom_device_testutil.cc

    #include "tensorflow/core/lib/gtl/cleanup.h"
    #include "tensorflow/core/platform/test.h"
    
    namespace {
    
    struct LoggingDevice {
      std::string device_name;
      std::string underlying_device;
      // Set to true whenever a TensorHandle is copied onto the device
      bool* arrived_flag;
      // Set to true whenever an operation is executed
      bool* executed_flag;
      // If true, only explicit op placements are accepted. If false, uses
      // type-based dispatch.
    Created: Tue Apr 07 12:39:13 GMT 2026
    - Last Modified: Sat Dec 20 23:30:21 GMT 2025
    - 8.4K bytes
    - Click Count (0)
Back to Top