Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for make_unique (0.36 sec)

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

      CHECK_OK(buffer.status());
    
      return new PJRT_Buffer{std::move(*buffer), c_api_client->pjrt_c_client()};
    }
    
    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(
    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/eager/tfe_monitoring_reader_internal.h

    #include <memory>
    
    #include "tensorflow/core/lib/monitoring/cell_reader.h"
    
    struct TFE_MonitoringCounterReader {
      explicit TFE_MonitoringCounterReader(const char* name) {
        counter = std::make_unique<
            ::tensorflow::monitoring::testing::CellReader<int64_t>>(name);
      }
      template <typename... LabelType>
      int64_t Read(const LabelType&... labels);
    C
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Thu Apr 20 03:14:47 GMT 2023
    - 1.3K bytes
    - Viewed (0)
  3. tensorflow/c/eager/custom_device_testutil.cc

      TFE_TensorHandle* t = TFE_TensorHandleCopyToDevice(
          tensor, context, dev->underlying_device.c_str(), status);
      if (TF_GetCode(status) != TF_OK) return nullptr;
      auto dst = std::make_unique<LoggedTensor>(t);
      *(dev->arrived_flag) = true;
      return MakeLoggedTensorHandle(context, dev->device_name, std::move(dst),
                                    status);
    }
    
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Wed Mar 03 20:47:31 GMT 2021
    - 8.3K bytes
    - Viewed (0)
  4. tensorflow/c/experimental/next_pluggable_device/tensor_pjrt_buffer_util.cc

    }
    
    absl::Status SetPjRtCBufferToTensor(PJRT_Buffer* c_buffer,
                                        xla::PjRtCApiClient* c_api_client,
                                        Tensor* tensor) {
      auto buffer = std::make_unique<xla::PjRtCApiBuffer>(c_api_client, c_buffer);
      tensorflow::AsyncValueTensor* av_tensor =
          tensorflow::AsyncValueTensor::FromTensor(tensor);
      if (av_tensor == nullptr) {
        TF_ASSIGN_OR_RETURN(
    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)
  5. tensorflow/c/eager/gradients_test.cc

      int num_retvals = 1;
      std::vector<AbstractTensorHandle*> outputs(1);
      GradientRegistry registry;
      s = RegisterGradients(&registry);
      ASSERT_EQ(errors::OK, s.code()) << s.message();
      auto tape = std::make_unique<Tape>(/*persistent=*/false);
      s = Execute(check_numerics_op.get(), ctx.get(), absl::MakeSpan(outputs),
                  &num_retvals, &forward_op, tape.get(), registry);
      ASSERT_EQ(errors::OK, s.code()) << s.message();
    
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Thu Feb 15 09:49:45 GMT 2024
    - 7K bytes
    - Viewed (0)
Back to top