Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for GetPjRtCBufferFromTensor (0.39 sec)

  1. tensorflow/c/experimental/next_pluggable_device/tensor_pjrt_buffer_util_test.cc

    TEST(TensorPjRtBufferUtilTest, GetPjRtCBufferFromTensorNoBuffer) {
      auto allocator = std::make_unique<AsyncValueAllocator>();
      tensorflow::Tensor tensor(allocator.get(), DT_FLOAT, {1});
    
      EXPECT_THAT(
          GetPjRtCBufferFromTensor(&tensor),
          StatusIs(error::INTERNAL, HasSubstr(absl::StrCat(
                                        "Input tensor does not have PjRtBuffer"))));
    }
    
    C++
    - Registered: Tue Feb 27 12:39:08 GMT 2024
    - Last Modified: Mon Oct 30 19:20:20 GMT 2023
    - 7.2K bytes
    - Viewed (0)
  2. tensorflow/c/experimental/next_pluggable_device/tensor_pjrt_buffer_util.h

    #include "xla/pjrt/c/pjrt_c_api.h"
    #include "xla/pjrt/pjrt_c_api_client.h"
    #include "tensorflow/core/framework/tensor.h"
    
    namespace tensorflow {
    
    StatusOr<PJRT_Buffer*> GetPjRtCBufferFromTensor(const Tensor* tensor);
    
    absl::Status SetPjRtCBufferToTensor(PJRT_Buffer* c_buffer,
                                        xla::PjRtCApiClient* c_api_client,
                                        Tensor* tensor);
    
    C
    - Registered: Tue Feb 27 12:39:08 GMT 2024
    - Last Modified: Mon Oct 09 19:12:59 GMT 2023
    - 1.5K bytes
    - Viewed (0)
  3. tensorflow/c/experimental/next_pluggable_device/tensor_pjrt_buffer_util.cc

    #include "tensorflow/core/tfrt/common/pjrt_util.h"
    #include "tsl/platform/errors.h"
    #include "tsl/platform/statusor.h"
    
    namespace tensorflow {
    
    absl::StatusOr<PJRT_Buffer*> GetPjRtCBufferFromTensor(const Tensor* tensor) {
      tensorflow::AsyncValueTensor* av_tensor =
          tensorflow::AsyncValueTensor::FromTensor(tensor);
      if (av_tensor == nullptr || av_tensor->GetBuffer() == nullptr) {
    C++
    - Registered: Tue Feb 27 12:39:08 GMT 2024
    - Last Modified: Mon Oct 30 19:20:20 GMT 2023
    - 3.7K bytes
    - Viewed (0)
  4. tensorflow/c/experimental/next_pluggable_device/c_api.cc

      auto s = tensorflow::TF_TensorToTensor(c_tensor, &tensor);
      if (!s.ok()) {
        status->status = s;
        return nullptr;
      }
      absl::StatusOr<PJRT_Buffer*> c_buffer =
          tensorflow::GetPjRtCBufferFromTensor(&tensor);
      if (!c_buffer.ok()) {
        status->status = c_buffer.status();
        return nullptr;
      }
      status->status = absl::OkStatus();
      return *c_buffer;
    }
    
    C++
    - Registered: Tue Feb 27 12:39:08 GMT 2024
    - Last Modified: Tue Jan 09 00:52:04 GMT 2024
    - 13.9K bytes
    - Viewed (1)
Back to top