Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for SetPjRtCBufferToTensor (0.28 sec)

  1. tensorflow/c/experimental/next_pluggable_device/tensor_pjrt_buffer_util.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);
    
    absl::StatusOr<xla::PjRtCApiClient*> GetPjRtCApiClient(
    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)
  2. tensorflow/c/experimental/next_pluggable_device/tensor_pjrt_buffer_util_test.cc

      tensorflow::Tensor tensor(DT_FLOAT, {1});
      TF_ASSERT_OK_AND_ASSIGN(auto pjrt_client, xla::GetCApiClient(DEVICE_CPU));
      PJRT_Buffer* c_buffer = CreateCBuffer();
    
      TF_EXPECT_OK(SetPjRtCBufferToTensor(
          c_buffer, down_cast<xla::PjRtCApiClient*>(pjrt_client.get()), &tensor));
    }
    
    TEST(TensorPjRtBufferUtilTest, SetPjRtCBufferToTensorSuccess) {
      auto allocator = std::make_unique<AsyncValueAllocator>();
    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)
  3. tensorflow/c/experimental/next_pluggable_device/tensor_pjrt_buffer_util.cc

      if (c_api_buffer == nullptr) {
        return absl::InternalError(
            "The PjRtBuffer in the tensor is not type PjRtCApiBuffer.");
      }
      return c_api_buffer->c_buffer();
    }
    
    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 30 19:20:20 GMT 2023
    - 3.7K bytes
    - Viewed (0)
  4. tensorflow/c/experimental/next_pluggable_device/c_api.cc

          tensorflow::GetPjRtCApiClient(tensorflow::DeviceType(device_type));
      if (!pjrt_c_api_client.ok()) {
        status->status = pjrt_c_api_client.status();
        return;
      }
      auto set_buffer_status =
          SetPjRtCBufferToTensor(c_buffer, *pjrt_c_api_client, &tensor);
      status->status = set_buffer_status;
    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