Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 14 for allocated (0.86 sec)

  1. tensorflow/c/c_api.cc

      for (int i = 0; i < len; ++i) {
        values[i] = TF_NewBuffer();
        status->status = MessageToBuffer(attr->list().shape(i), values[i]);
        if (!status->status.ok()) {
          // Delete everything allocated to far, the operation has failed.
          for (int j = 0; j <= i; ++j) {
            TF_DeleteBuffer(values[j]);
          }
          return;
        }
      }
    }
    
    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)
  2. tensorflow/c/experimental/filesystem/plugins/windows/windows_filesystem.cc

      ops->scheme = strdup(uri);
    }
    
    void TF_InitPlugin(TF_FilesystemPluginInfo* info) {
      info->plugin_memory_allocate = plugin_memory_allocate;
      info->plugin_memory_free = plugin_memory_free;
      info->num_schemes = 2;
      info->ops = static_cast<TF_FilesystemPluginOps*>(
          plugin_memory_allocate(info->num_schemes * sizeof(info->ops[0])));
      ProvideFilesystemSupportFor(&info->ops[0], "");
    C++
    - Registered: Tue Apr 09 12:39:09 GMT 2024
    - Last Modified: Fri May 27 20:21:15 GMT 2022
    - 2.6K bytes
    - Viewed (0)
  3. tensorflow/c/experimental/filesystem/modular_filesystem.cc

            "Filesystem for ", dir, " does not support GetChildren()"));
    
      UniquePtrTo_TF_Status plugin_status(TF_NewStatus(), TF_DeleteStatus);
      std::string translated_name = TranslateName(dir);
      // Note that `children` is allocated by the plugin and freed by core
      // TensorFlow, so we need to use `plugin_memory_free_` here.
      char** children = nullptr;
      const int num_children =
    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)
  4. tensorflow/c/eager/parallel_device/parallel_device_lib.cc

      //   Outputs:
      std::vector<TensorHandlePtr> op_outputs_ TF_GUARDED_BY(execution_mutex_);
      // TF_Status is an incomplete type and so can't be stack allocated. To avoid
      // unnecessary allocations each Execute call, we keep one heap-allocated
      // version for the thread.
      StatusPtr status_ TF_GUARDED_BY(execution_mutex_);
    
      const std::string device_;
      ExecutorPtr executor_ TF_GUARDED_BY(execution_mutex_);
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Fri Feb 09 07:47:20 GMT 2024
    - 25.4K bytes
    - Viewed (1)
  5. tensorflow/c/eager/parallel_device/parallel_device.cc

      std::vector<MaybeParallelTensorOwned> typed_outputs(
          std::move(maybe_typed_outputs.value()));
    
      if (typed_outputs.size() > *num_outputs) {
        TF_SetStatus(status, TF_INTERNAL,
                     "The allocated output buffer was too small.");
        return;
      }
    
      for (int i = 0; i < typed_outputs.size(); ++i) {
        MaybeParallelTensorOwned typed_output(std::move(typed_outputs[i]));
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Wed Mar 29 22:05:31 GMT 2023
    - 18.3K bytes
    - Viewed (0)
  6. tensorflow/c/experimental/filesystem/plugins/posix/posix_filesystem.cc

    }
    
    void TF_InitPlugin(TF_FilesystemPluginInfo* info) {
      info->plugin_memory_allocate = plugin_memory_allocate;
      info->plugin_memory_free = plugin_memory_free;
      info->num_schemes = 2;
      info->ops = static_cast<TF_FilesystemPluginOps*>(
          plugin_memory_allocate(info->num_schemes * sizeof(info->ops[0])));
      ProvideFilesystemSupportFor(&info->ops[0], "");
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Sun Mar 24 20:08:23 GMT 2024
    - 15.8K bytes
    - Viewed (0)
  7. tensorflow/c/c_api_experimental.cc

      // Update the vector with information from `input_tensors` if provided.
      if (input_tensors != nullptr) {
        // Note that we take the address of the elements in `all_input_tensors`
        // below. Allocate enough space so that no reallocation happens, which will
        // make the pointers invalid.
        all_input_tensors.reserve(num_inputs);
        for (int i = 0; i < num_inputs; ++i) {
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Mon Apr 15 03:35:10 GMT 2024
    - 29.4K bytes
    - Viewed (0)
  8. tensorflow/c/experimental/next_pluggable_device/tensor_pjrt_buffer_util_test.cc

      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)
  9. tensorflow/c/experimental/next_pluggable_device/c_api.cc

      TF_VariableInfo() = delete;
      // TF_VariableInfo is constructed here by TensorFlow, and will be passed to
      // plugin as a opaque pointer. Plugin will need to call C APIs below to
      // operate on TF_VariableInfo (such as allocate temp tensor for the `var` held
      // by the underlying tensorflow::VariableInfo.
      TF_VariableInfo(int index, const std::string& name, tensorflow::Var* var) {
        var_info = tensorflow::VariableInfo{index, name, var};
      }
    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)
  10. tensorflow/c/c_api_test.cc

      TF_DeleteStatus(s);
    }
    
    void Deallocator(void* data, size_t, void* arg) {
      tensorflow::cpu_allocator()->DeallocateRaw(data);
      *reinterpret_cast<bool*>(arg) = true;
    }
    
    TEST(CAPI, Tensor) {
      const int num_bytes = 6 * sizeof(float);
      float* values =
          reinterpret_cast<float*>(tensorflow::cpu_allocator()->AllocateRaw(
              TF_TensorDefaultAlignment(), num_bytes));
      int64_t dims[] = {2, 3};
    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)
Back to top