Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 57 for init (0.14 sec)

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

      TF_RETURN_IF_ERROR(
          env->GetSymbolFromLibrary(dso_handle, "TF_InitGraph", &dso_symbol));
    
      // Step 2: Call `TF_InitPlugin`
      auto init_fn = reinterpret_cast<TFInitGraphPluginFn>(dso_symbol);
      return InitGraphPlugin(init_fn);
    }
    
    absl::Status InitGraphPlugin(TFInitGraphPluginFn init_fn) {
      TP_OptimizerRegistrationParams params{
          TP_OPTIMIZER_REGISTRATION_PARAMS_STRUCT_SIZE};
    C++
    - Registered: Tue Feb 27 12:39:08 GMT 2024
    - Last Modified: Wed Sep 06 19:12:29 GMT 2023
    - 15K bytes
    - Viewed (1)
  2. tensorflow/c/c_api.cc

      for (const auto* edge : oper->node.out_edges()) {
        if (edge->IsControlEdge() && !edge->dst()->IsSink()) {
          ++count;
        }
      }
      return count;
    }
    
    int TF_OperationGetControlOutputs(TF_Operation* oper,
                                      TF_Operation** control_outputs,
                                      int max_control_outputs) {
      int count = 0;
      for (const auto* edge : oper->node.out_edges()) {
    C++
    - Registered: Tue Apr 16 12:39:09 GMT 2024
    - Last Modified: Mon Apr 15 03:35:10 GMT 2024
    - 102.3K bytes
    - Viewed (0)
  3. tensorflow/c/experimental/filesystem/plugins/posix/posix_filesystem_helper.cc

    #include <string.h>
    #include <unistd.h>
    
    #include "tensorflow/c/experimental/filesystem/plugins/posix/copy_file.h"
    
    namespace tf_posix_filesystem {
    
    int TransferFileContents(const char* src, const char* dst, mode_t mode,
                             off_t size) {
      int src_fd = open(src, O_RDONLY);
      if (src_fd < 0) return -1;
    
      // When creating file, use the same permissions as original
    C++
    - Registered: Tue Apr 09 12:39:09 GMT 2024
    - Last Modified: Thu Jan 16 05:36:52 GMT 2020
    - 2.1K bytes
    - Viewed (1)
  4. tensorflow/c/eager/c_api_unified_experimental.cc

    void TF_OutputListSetNumOutputs(TF_OutputList* o, int num_outputs,
                                    TF_Status* s) {
      unwrap(o)->expected_num_outputs = num_outputs;
      unwrap(o)->outputs.clear();
      unwrap(o)->outputs.resize(num_outputs);
    }
    int TF_OutputListNumOutputs(TF_OutputList* o) {
      return unwrap(o)->outputs.size();
    }
    TF_AbstractTensor* TF_OutputListGet(TF_OutputList* o, int i) {
      return wrap(unwrap(o)->outputs[i]);
    }
    C++
    - Registered: Tue Apr 16 12:39:09 GMT 2024
    - Last Modified: Thu Feb 15 09:49:45 GMT 2024
    - 9K bytes
    - Viewed (0)
  5. tensorflow/c/eager/parallel_device/parallel_device_remote_test.cc

    tensorflow::ServerDef GetServerDef(const std::string& job_name, int num_tasks) {
      tensorflow::ServerDef server_def;
      server_def.set_protocol("grpc");
      server_def.set_job_name(job_name);
      server_def.set_task_index(0);
      tensorflow::ClusterDef* cluster_def = server_def.mutable_cluster();
      tensorflow::JobDef* job_def = cluster_def->add_job();
      job_def->set_name(job_name);
      for (int i = 0; i < num_tasks; i++) {
        int port = tensorflow::testing::PickUnusedPortOrDie();
    C++
    - Registered: Tue Apr 16 12:39:09 GMT 2024
    - Last Modified: Thu Apr 27 22:09:57 GMT 2023
    - 6.7K bytes
    - Viewed (0)
  6. tensorflow/c/experimental/grappler/grappler_test.cc

        params->device_type = "Device1";
      };
    
      TF_ASSERT_OK(InitGraphPlugin(plugin_init_0));
      TF_ASSERT_OK(InitGraphPlugin(plugin_init_1));
      ASSERT_EQ(PluginGraphOptimizerRegistry::CreateOptimizers(
                    std::set<string>{"Device0", "Device1"})
                    .size(),
                2);
    }
    
    TEST(Grappler, DeviceTypeNotSet) {
      auto plugin_init = [](TP_OptimizerRegistrationParams* const params,
    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)
  7. tensorflow/c/eager/dlpack_test.cc

    namespace {
    
    void TestHandleFromDLPack(TF_Status* status, TFE_Context* ctx,
                              std::vector<int64_t> shape,
                              std::vector<int64_t> strides) {
      size_t num_elements = 1;
      for (int i = 0; i < static_cast<int32_t>(shape.size()); ++i) {
        num_elements *= shape[i];
      }
      std::vector<float> data(num_elements);
      for (size_t j = 0; j < num_elements; ++j) {
        data[j] = j;
      }
    C++
    - Registered: Tue Apr 16 12:39:09 GMT 2024
    - Last Modified: Fri Jun 30 03:04:46 GMT 2023
    - 4.4K bytes
    - Viewed (0)
  8. tensorflow/c/experimental/filesystem/plugins/gcs/gcs_filesystem_test.cc

      EXPECT_TF_OK(status_);
    
      std::vector<std::string> childrens;
      for (int i = 0; i < num_entries; ++i) {
        childrens.push_back(entries[i]);
      }
      std::sort(childrens.begin(), childrens.end());
      EXPECT_EQ(std::vector<string>({"SubDir/", "TestFile.csv"}), childrens);
    }
    
    TEST_F(GCSFilesystemTest, DeleteFile) {
      tf_gcs_filesystem::Init(filesystem_, status_);
      ASSERT_TF_OK(status_);
    C++
    - Registered: Tue Apr 16 12:39:09 GMT 2024
    - Last Modified: Mon Aug 31 12:04:23 GMT 2020
    - 24.9K bytes
    - Viewed (0)
  9. tensorflow/c/eager/gradients.cc

    }
    Status SetAttrStringList(AbstractOperation* op_, const char* attr_name,
                             const void* const* values, const size_t* lengths,
                             int num_values, ForwardOperation* forward_op_) {
      std::vector<StringPiece> v(num_values);
      for (int i = 0; i < num_values; ++i) {
        v[i] = StringPiece(static_cast<const char*>(values[i]), lengths[i]);
      }
      forward_op_->attrs.Set(attr_name, v);
    C++
    - Registered: Tue Apr 16 12:39:09 GMT 2024
    - Last Modified: Thu Feb 15 09:49:45 GMT 2024
    - 19.3K bytes
    - Viewed (0)
  10. tensorflow/c/eager/dlpack.cc

    // data.
    bool IsValidStrideCompactRowMajorData(int64_t* shape_arr, int64_t* stride_arr,
                                          int ndim) {
      bool valid = true;
      int64_t expected_stride = 1;
      for (int i = ndim - 1; i >= 0; --i) {
        // Empty tensors are always compact regardless of strides.
        if (shape_arr[i] == 0) return true;
    C++
    - Registered: Tue Apr 16 12:39:09 GMT 2024
    - Last Modified: Thu Feb 15 09:49:45 GMT 2024
    - 12.8K bytes
    - Viewed (0)
Back to top