Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 15 for do (0.13 sec)

  1. tensorflow/c/experimental/filesystem/plugins/posix/posix_filesystem_helper.cc

      //   If file exists, truncate its size to 0.
      int dst_fd = open(dst, O_WRONLY | O_CREAT | O_TRUNC, open_mode);
      if (dst_fd < 0) {
        close(src_fd);
        return -1;
      }
    
      // Both files have been opened, do the transfer.
      // Since errno would be overridden by `close` below, save it here.
      int error_code = 0;
      if (CopyFileContents(dst_fd, src_fd, size) < 0) error_code = errno;
    
      close(src_fd);
      close(dst_fd);
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Thu Jan 16 05:36:52 GMT 2020
    - 2.1K bytes
    - Viewed (1)
  2. tensorflow/c/c_api_function.cc

      std::vector<const Node*> control_output_nodes;
      control_output_nodes.reserve(ncontrol_outputs);
      for (int i = 0; i < ncontrol_outputs; ++i) {
        control_output_nodes.push_back(&control_outputs[i]->node);
      }
    
      // Do the actual function creation.
      DCHECK(append_hash_to_fn_name <= 1);
      tensorflow::FunctionDef fdef;
      status->status = tensorflow::GraphToFunctionDef(
          fn_body->graph, fn_name, append_hash_to_fn_name != 0,
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Mon Apr 15 03:35:10 GMT 2024
    - 13.6K bytes
    - Viewed (2)
  3. tensorflow/c/experimental/filesystem/plugins/posix/posix_filesystem.cc

        TF_SetStatus(status, TF_OK, "");
    }
    
    static int64_t Tell(const TF_WritableFile* file, TF_Status* status) {
      auto posix_file = static_cast<PosixFile*>(file->plugin_file);
    
      // POSIX's `ftell` returns `long`, do a manual cast.
      int64_t position = int64_t{ftell(posix_file->handle)};
      if (position < 0)
        TF_SetStatusFromIOError(status, errno, posix_file->filename);
      else
        TF_SetStatus(status, TF_OK, "");
    
    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)
  4. tensorflow/c/eager/parallel_device/parallel_device.cc

            // but need special handling for gradients (gradient of copy-on is not
            // just copy-off but includes a sum) and consideration of performance.
            //
            // TODO(allenl): There may be smarter ways to do this copy in some
            // cases, i.e. with a collective broadcast. We'll need to be careful
            // about things that are taken as inputs on the host or on their
            // existing device (for multi-device functions).
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Wed Mar 29 22:05:31 GMT 2023
    - 18.3K bytes
    - Viewed (0)
  5. tensorflow/c/eager/parallel_device/parallel_device_lib.cc

            TF_RETURN_IF_ERROR(unwrap(tensors_[0].get())->Shape(&first_shape));
            return errors::Unimplemented(absl::StrCat(
                "Computing the shape of a ParallelTensor when the components do "
                "not all have the same rank is not supported. One tensor had "
                "shape ",
                first_shape.DebugString(), " and another had shape ",
                component_shape.DebugString()));
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Fri Feb 09 07:47:20 GMT 2024
    - 25.4K bytes
    - Viewed (1)
  6. tensorflow/c/eager/parallel_device/parallel_device_lib_test.cc

      EXPECT_EQ(TF_GetCode(status.get()), TF_INVALID_ARGUMENT);
      EXPECT_THAT(TF_Message(status.get()), HasSubstr("assertion failed"));
    
      // Note that future collectives with the same context do not work at the
      // moment; once canceled, the collective executor requires the program to be
      // restarted / context to be reset.
    }
    
    TEST(PARALLEL_DEVICE_LIB, TestDifferentShapes) {
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Thu Jul 08 23:47:35 GMT 2021
    - 15.3K bytes
    - Viewed (0)
  7. tensorflow/c/experimental/filesystem/plugins/gcs/ram_file_block_cache_test.cc

      }
      return status.status;
    }
    
    TEST(RamFileBlockCacheTest, IsCacheEnabled) {
      auto fetcher = [](const string& filename, size_t offset, size_t n,
                        char* buffer, TF_Status* status) -> int64_t {
        // Do nothing.
        TF_SetStatus(status, TF_OK, "");
        return 0;
      };
      tf_gcs_filesystem::RamFileBlockCache cache1(0, 0, 0, fetcher);
      tf_gcs_filesystem::RamFileBlockCache cache2(16, 0, 0, fetcher);
    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)
  8. tensorflow/c/experimental/filesystem/plugins/gcs/ram_file_block_cache.cc

      new_entry->lra_iterator = lra_list_.begin();
      new_entry->timestamp = timer_seconds_();
      block_map_.emplace(std::make_pair(key, new_entry));
      return new_entry;
    }
    
    // Remove blocks from the cache until we do not exceed our maximum size.
    void RamFileBlockCache::Trim() {
      while (!lru_list_.empty() && cache_size_ > max_bytes_) {
        RemoveBlock(block_map_.find(lru_list_.back()));
      }
    }
    
    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)
  9. tensorflow/c/experimental/filesystem/modular_filesystem.cc

      TF_FilesystemPluginInfo info;
      memset(&info, 0, sizeof(info));
      auto TF_InitPlugin =
          reinterpret_cast<int (*)(TF_FilesystemPluginInfo*)>(dso_symbol);
      TF_InitPlugin(&info);
    
      // Step 4: Do the actual registration
      return filesystem_registration::RegisterFilesystemPluginImpl(&info);
    }
    
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Wed Sep 06 19:12:29 GMT 2023
    - 23.1K bytes
    - Viewed (0)
  10. tensorflow/c/experimental/grappler/grappler.cc

    #include "tensorflow/core/protobuf/rewriter_config.pb.h"
    #include "tsl/platform/env.h"
    #include "tsl/platform/errors.h"
    
    namespace {
    
    #define VALIDATE_STRUCT_SIZE(STRUCT_NAME, STRUCT_OBJ, SIZE_VALUE_NAME) \
      do {                                                                 \
        if (STRUCT_OBJ.struct_size == 0) {                                 \
          return absl::Status(absl::StatusCode::kFailedPrecondition,       \
    C++
    - Registered: Tue Feb 27 12:39:08 GMT 2024
    - Last Modified: Wed Sep 06 19:12:29 GMT 2023
    - 15K bytes
    - Viewed (1)
Back to top