Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for TF_NewBuffer (0.25 sec)

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

      TF_DeleteStatus(status);
      TF_DeleteGraphProperties(graph_properties);
      TF_ASSERT_OK(cluster->Shutdown());
    }
    
    TEST(TF_FunctionLibraryDefinition, LookUpOpDef) {
      TF_Buffer* g_buf = TF_NewBuffer();
      TF_Buffer* op_buf = TF_NewBuffer();
      TF_Status* status = TF_NewStatus();
      GraphDef g_def;
      Status s = MessageToBuffer(g_def, g_buf);
      TF_ASSERT_OK(s);
      TF_FunctionLibraryDefinition* func =
    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_test_util.cc

             node_def.input_size() == 1 && node_def.input(0) == input;
    }
    
    bool GetGraphDef(TF_Graph* graph, tensorflow::GraphDef* graph_def) {
      TF_Status* s = TF_NewStatus();
      TF_Buffer* buffer = TF_NewBuffer();
      TF_GraphToGraphDef(graph, buffer, s);
      bool ret = TF_GetCode(s) == TF_OK;
      EXPECT_EQ(TF_OK, TF_GetCode(s)) << TF_Message(s);
      if (ret) ret = graph_def->ParseFromArray(buffer->data, buffer->length);
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Fri Oct 15 03:16:52 GMT 2021
    - 17.8K bytes
    - Viewed (2)
  3. tensorflow/c/c_api_experimental.cc

      // a different TFE context for each thread of execution (for running graph
      // functions, and their send/recvs corountines).
      config.set_inter_op_parallelism_threads(1);
    
      TF_Buffer* ret = TF_NewBuffer();
      TF_CHECK_OK(MessageToBuffer(config, ret));
      return ret;
    }
    
    TF_Buffer* TF_CreateRunOptions(unsigned char enable_full_trace) {
      tensorflow::RunOptions options;
      if (enable_full_trace) {
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Mon Apr 15 03:35:10 GMT 2024
    - 29.4K bytes
    - Viewed (0)
  4. tensorflow/c/experimental/grappler/grappler.cc

                                     GraphDef* optimized_graph_def) {
      OwnedTFStatus c_status(TF_NewStatus());
      OwnedTFBuffer graph_buf(TF_NewBuffer());
      OwnedTFBuffer optimized_graph_buf(TF_NewBuffer());
      TF_RETURN_IF_ERROR(MessageToBuffer(item.graph, graph_buf.get()));
    
      optimizer_.optimize_func(c_optimizer_, graph_buf.get(),
    C++
    - Registered: Tue Feb 27 12:39:08 GMT 2024
    - Last Modified: Wed Sep 06 19:12:29 GMT 2023
    - 15K bytes
    - Viewed (1)
  5. tensorflow/c/c_api_test.cc

      TF_DeleteSessionOptions(opt);
      ASSERT_EQ(TF_OK, TF_GetCode(s)) << TF_Message(s);
    
      TF_Buffer* run_options = TF_NewBufferFromString("", 0);
      TF_Buffer* run_metadata = TF_NewBuffer();
      TF_Run(session, run_options, nullptr, nullptr, 0, nullptr, nullptr, 0,
             nullptr, 0, run_metadata, s);
      EXPECT_EQ(TF_INVALID_ARGUMENT, TF_GetCode(s)) << TF_Message(s);
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Mon Apr 15 03:35:10 GMT 2024
    - 96.9K bytes
    - Viewed (3)
  6. tensorflow/c/experimental/next_pluggable_device/c_api.cc

      status->status = value.status();
      if (!value.ok()) {
        return nullptr;
      }
      // Caller is responsible to call `TF_DeleteBuffer` to release the buffer.
      TF_Buffer* result = TF_NewBuffer();
      const std::string& value_str = *value;
      void* data = malloc(value_str.length());
      value_str.copy(static_cast<char*>(data), value_str.length(), 0);
      result->data = data;
      result->length = value_str.length();
    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)
  7. tensorflow/c/eager/c_api_experimental_test.cc

      auto* cell1 = TFE_MonitoringGetCellSampler1(sampler1, "foo");
      TFE_MonitoringSamplerCellAdd(cell1, 1.0);
      TFE_MonitoringSamplerCellAdd(cell1, 2.0);
      TF_Buffer* result1 = TF_NewBuffer();
      TFE_MonitoringSamplerCellValue(cell1, result1);
      tensorflow::HistogramProto histogram1;
      EXPECT_TRUE(histogram1.ParseFromString(
          {reinterpret_cast<const char*>(result1->data), result1->length}));
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Thu Aug 03 03:14:26 GMT 2023
    - 31.5K bytes
    - Viewed (1)
  8. tensorflow/c/c_api_function_test.cc

        func_ = TF_FunctionImportFunctionDef(buf.data(), buf.size(), s_);
        ASSERT_EQ(TF_OK, TF_GetCode(s_)) << TF_Message(s_);
      }
    
      void GetAttr(const char* attr_name, AttrValue* out_attr) {
        TF_Buffer* attr_buf = TF_NewBuffer();
        TF_FunctionGetAttrValueProto(func_, attr_name, attr_buf, s_);
        ASSERT_TRUE(out_attr->ParseFromArray(attr_buf->data, attr_buf->length));
        TF_DeleteBuffer(attr_buf);
      }
    
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Thu Jul 20 22:08:54 GMT 2023
    - 63.6K bytes
    - Viewed (6)
  9. tensorflow/c/c_api.cc

      tensorflow::OpRegistry::Global()->GetRegisteredOps(&op_defs);
      tensorflow::OpList op_list;
      for (const auto& op : op_defs) {
        *(op_list.add_op()) = op;
      }
      TF_Buffer* ret = TF_NewBuffer();
      TF_CHECK_OK(MessageToBuffer(op_list, ret));
      return ret;
    }
    
    // --------------------------------------------------------------------------
    // ListDevices & SessionListDevices API
    
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Mon Apr 15 03:35:10 GMT 2024
    - 102.3K bytes
    - Viewed (0)
  10. tensorflow/c/eager/c_api_test.cc

      int num_retvals = 1;
      TFE_Execute(matmul, &retvals[0], &num_retvals, status);
      EXPECT_EQ(TF_OK, TF_GetCode(status)) << TF_Message(status);
      TFE_DeleteOp(matmul);
      TFE_DeleteTensorHandle(m);
      TF_Buffer* b = TF_NewBuffer();
      TFE_ContextExportRunMetadata(ctx, b, status);
      ASSERT_EQ(TF_OK, TF_GetCode(status)) << TF_Message(status);
      tensorflow::RunMetadata rm;
      EXPECT_TRUE(
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Thu Aug 03 20:50:20 GMT 2023
    - 94.6K bytes
    - Viewed (1)
Back to top