Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for Threads (0.19 sec)

  1. tensorflow/c/c_api_experimental.cc

      // CPU tensor to GPU).
      // Setting a larger thread pool does not help with the Swift caller, as we use
      // 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;
    }
    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)
  2. tensorflow/c/eager/parallel_device/parallel_device_lib.cc

      StatusPtr first_bad_status(nullptr);
      for (int device_index = 0; device_index < underlying_devices_.size();
           ++device_index) {
        DeviceThread* device_thread = device_threads_[device_index].get();
        per_device_output_tensors.push_back(device_thread->Join(status));
        // We will run every Join even if there are bad statuses in case the user
        // wants to recover and continue running ops on the parallel device (which
    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)
  3. tensorflow/c/c_api.cc

    #include "tensorflow/core/platform/status.h"
    #include "tensorflow/core/platform/str_util.h"
    #include "tensorflow/core/platform/strcat.h"
    #include "tensorflow/core/platform/stringpiece.h"
    #include "tensorflow/core/platform/thread_annotations.h"
    #include "tensorflow/core/platform/types.h"
    #include "tensorflow/core/public/session.h"
    #include "tensorflow/core/public/version.h"
    
    // The implementation below is at the top level instead of the
    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)
  4. tensorflow/c/experimental/filesystem/plugins/gcs/ram_file_block_cache_test.cc

      };
      const int block_size = 8;
      tf_gcs_filesystem::RamFileBlockCache cache(
          block_size, 2 * callers * block_size, 0, fetcher);
      std::vector<std::unique_ptr<Thread>> threads;
      threads.reserve(callers);
      for (int i = 0; i < callers; i++) {
        threads.emplace_back(
            Env::Default()->StartThread({}, "caller", [block_size, &cache, i]() {
              std::vector<char> out;
              TF_EXPECT_OK(
    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/env.cc

      cc_options.numa_node = options->numa_node;
      return reinterpret_cast<TF_Thread*>(::tensorflow::Env::Default()->StartThread(
          cc_options, thread_name, [=]() { (*work_func)(param); }));
    }
    
    void TF_JoinThread(TF_Thread* thread) {
      // ::tensorflow::Thread joins on destruction
      delete reinterpret_cast<::tensorflow::Thread*>(thread);
    }
    
    void* TF_LoadSharedLibrary(const char* library_filename, TF_Status* status) {
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Wed Aug 11 01:20:50 GMT 2021
    - 7K bytes
    - Viewed (0)
  6. tensorflow/c/env_test.cc

    }
    
    }  // namespace
    
    TEST(TestEnv, TestThreads) {
      TF_ThreadOptions options;
      TF_DefaultThreadOptions(&options);
      SomeThreadData data;
      TF_Thread* thread =
          TF_StartThread(&options, "SomeThreadName", &SomeThreadFunc, &data);
      TF_JoinThread(thread);
      ::tensorflow::mutex_lock l(data.mu);
      ASSERT_TRUE(data.did_work);
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Mon Dec 10 20:52:48 GMT 2018
    - 4.2K bytes
    - Viewed (0)
  7. tensorflow/c/eager/c_api.cc

          static_cast<tensorflow::ContextDevicePlacementPolicy>(policy));
    }
    
    // Note: this function looks up a thread local policy. So it should be called in
    // the appropriate client thread. In particular, in async mode, it may not be
    // safe to call this function from the async EagerExecutor threads.
    extern TFE_ContextDevicePlacementPolicy TFE_ContextGetDevicePlacementPolicy(
        TFE_Context* ctx) {
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Tue Mar 12 20:00:09 GMT 2024
    - 43.9K bytes
    - Viewed (2)
  8. tensorflow/c/experimental/filesystem/plugins/gcs/gcs_filesystem.cc

    // Implementation of a filesystem for GCS environments.
    // This filesystem will support `gs://` URI schemes.
    namespace gcs = google::cloud::storage;
    
    // The environment variable that overrides the block size for aligned reads from
    // GCS. Specified in MB (e.g. "16" = 16 x 1024 x 1024 = 16777216 bytes).
    constexpr char kBlockSize[] = "GCS_READ_CACHE_BLOCK_SIZE_MB";
    constexpr size_t kDefaultBlockSize = 64 * 1024 * 1024;
    C++
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Wed Aug 23 06:55:53 GMT 2023
    - 46.9K bytes
    - Viewed (0)
  9. tensorflow/c/experimental/filesystem/plugins/gcs/ram_file_block_cache.cc

                                      const std::shared_ptr<Block>& block,
                                      TF_Status* status) {
      absl::MutexLock lock(&mu_);
      if (block->timestamp == 0) {
        // The block was evicted from another thread. Allow it to remain evicted.
        return TF_SetStatus(status, TF_OK, "");
      }
      if (block->lru_iterator != lru_list_.begin()) {
        lru_list_.erase(block->lru_iterator);
        lru_list_.push_front(key);
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Thu Jul 16 01:39:09 GMT 2020
    - 11.1K bytes
    - Viewed (0)
  10. tensorflow/c/eager/c_api_test.cc

      TFE_ContextOptionsSetDevicePlacementPolicy(opts, global_policy);
      TFE_Context* ctx = TFE_NewContext(opts, status.get());
      if (thread_policy != global_policy) {
        TFE_ContextSetThreadLocalDevicePlacementPolicy(ctx, thread_policy);
      }
      TFE_DeleteContextOptions(opts);
      ASSERT_EQ(TF_GetCode(status.get()), TF_OK) << TF_Message(status.get());
    
    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)
Back to top