Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 18 for buf (0.15 sec)

  1. tensorflow/c/experimental/grappler/grappler_test.cc

      Status s = MessageToBuffer(g_def, g_buf);
      TF_ASSERT_OK(s);
      TF_FunctionLibraryDefinition* func =
          TF_NewFunctionLibraryDefinition(g_buf, status);
    
      TF_LookUpOpDef(func, "Add", op_buf, status);
      string actual_string(reinterpret_cast<const char*>(op_buf->data),
                           op_buf->length);
      ASSERT_EQ(TF_OK, TF_GetCode(status));
    
      const OpDef* expected_op_def;
    C++
    - Registered: Tue Feb 27 12:39:08 GMT 2024
    - Last Modified: Thu Apr 13 22:30:58 GMT 2023
    - 11.6K bytes
    - Viewed (0)
  2. tensorflow/c/c_api.cc

                                             target_oper_names, &new_handle);
      if (status->status.ok()) {
        char* buf = new char[new_handle.size() + 1];
        memcpy(buf, new_handle.c_str(), new_handle.size() + 1);
        *handle = buf;
      }
    }
    
    void TF_PRun(TF_DeprecatedSession* s, const char* handle,
                 // Input tensors
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Mon Apr 15 03:35:10 GMT 2024
    - 102.3K bytes
    - Viewed (0)
  3. tensorflow/c/eager/c_api.h

    // If async mode is enabled, this call blocks till all currently pending ops are
    // done.
    TF_CAPI_EXPORT extern void TFE_ContextExportRunMetadata(TFE_Context* ctx,
                                                            TF_Buffer* buf,
                                                            TF_Status* status);
    
    // Some TF ops need a step container to be set to limit the lifetime of some
    C
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Thu Apr 27 21:07:00 GMT 2023
    - 22.8K bytes
    - Viewed (1)
  4. tensorflow/c/experimental/filesystem/plugins/gcs/ram_file_block_cache_test.cc

      const size_t size = 256;
      std::vector<char> buf;
      buf.reserve(size);
      for (int i = 0; i < size; i++) {
        buf.push_back(i);
      }
      // The fetcher just fetches slices of the buffer.
      auto fetcher = [&buf](const string& filename, size_t offset, size_t n,
                            char* buffer, TF_Status* status) -> int64_t {
        int64_t bytes_transferred;
        if (offset < buf.size()) {
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Fri Oct 15 03:16:57 GMT 2021
    - 23.2K bytes
    - Viewed (0)
  5. tensorflow/c/c_api_test.cc

      EXPECT_EQ(TF_DATA_LOSS, static_cast<TF_Code>(tensorflow::error::DATA_LOSS));
    }
    
    TEST(CAPI, GetAllOpList) {
      TF_Buffer* buf = TF_GetAllOpList();
      tensorflow::OpList op_list;
      EXPECT_TRUE(op_list.ParseFromArray(buf->data, buf->length));
      EXPECT_GT(op_list.op_size(), 0);
      TF_DeleteBuffer(buf);
    }
    
    TEST(CAPI, SetShape) {
      TF_Status* s = TF_NewStatus();
      TF_Graph* graph = TF_NewGraph();
    
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Mon Apr 15 03:35:10 GMT 2024
    - 96.9K bytes
    - Viewed (3)
  6. tensorflow/c/experimental/grappler/grappler_internal.h

    struct TFStatusDeleter {
      void operator()(TF_Status* s) const { TF_DeleteStatus(s); }
    };
    using OwnedTFStatus = std::unique_ptr<TF_Status, TFStatusDeleter>;
    
    struct TFBufferDeleter {
      void operator()(TF_Buffer* buf) const { TF_DeleteBuffer(buf); }
    };
    using OwnedTFBuffer = std::unique_ptr<TF_Buffer, TFBufferDeleter>;
    
    class CGraphOptimizer : public CustomGraphOptimizer {
     public:
    C
    - Registered: Tue Feb 27 12:39:08 GMT 2024
    - Last Modified: Wed Jun 08 08:58:23 GMT 2022
    - 3.5K bytes
    - Viewed (1)
  7. tensorflow/c/eager/c_api_experimental_test.cc

      auto* cell2 = TFE_MonitoringGetCellStringGauge2(gauge2, "foo", "bar");
      TFE_MonitoringStringGaugeCellSet(cell2, "str");
      auto* buf = new TF_Buffer;
      TFE_MonitoringStringGaugeCellValue(cell2, buf);
      string data(static_cast<const char*>(buf->data), buf->length);
      TF_DeleteBuffer(buf);
      EXPECT_EQ(data, "str");
      TFE_MonitoringDeleteStringGauge2(gauge2);
      TF_DeleteStatus(status);
    }
    
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Thu Aug 03 03:14:26 GMT 2023
    - 31.5K bytes
    - Viewed (1)
  8. tensorflow/c/experimental/filesystem/modular_filesystem.cc

      for (size_t i = 0; i < values.size(); i++) {
        memset(&option_values[i], 0, sizeof(option_values[i]));
        option_values[i].buffer_val.buf = const_cast<char*>(values[i].c_str());
        option_values[i].buffer_val.buf_length = values[i].size();
      }
      option_value.values = &option_values[0];
      option.value = &option_value;
      UniquePtrTo_TF_Status plugin_status(TF_NewStatus(), TF_DeleteStatus);
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Wed Sep 06 19:12:29 GMT 2023
    - 23.1K bytes
    - Viewed (0)
  9. tensorflow/c/eager/c_api_test.cc

      if (use_tfrt) {
        TF_Buffer* buf = TF_NewBuffer();
        TFE_GetExecutedOpNames(ctx, buf, status);
        ASSERT_EQ(TF_OK, TF_GetCode(status)) << TF_Message(status);
    #ifndef NDEBUG
        if (enable_grappler)
          EXPECT_NE(strstr(static_cast<const char*>(buf->data), "tf.Mul"), nullptr);
        else
          EXPECT_NE(strstr(static_cast<const char*>(buf->data), "tf.Add"), nullptr);
    #endif
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Thu Aug 03 20:50:20 GMT 2023
    - 94.6K bytes
    - Viewed (1)
  10. tensorflow/c/eager/c_api_experimental.cc

    }
    
    const void TFE_MonitoringStringGaugeCellValue(
        TFE_MonitoringStringGaugeCell* cell, TF_Buffer* buf) {
      tensorflow::string value = cell->cell.value();
      void* data = tensorflow::port::Malloc(value.length());
      value.copy(static_cast<char*>(data), value.length(), 0);
      buf->data = data;
      buf->length = value.length();
      buf->data_deallocator = [](void* data, size_t length) {
        tensorflow::port::Free(data);
      };
    }
    
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Thu Apr 11 23:52:39 GMT 2024
    - 35.9K bytes
    - Viewed (3)
Back to top