- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 15 for do (0.36 sec)
-
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) -
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) -
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 30 12:39:09 GMT 2024 - Last Modified: Thu Jul 08 23:47:35 GMT 2021 - 15.3K bytes - Viewed (0) -
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) -
tensorflow/c/eager/custom_device_test.cc
TFE_Execute(matmul.get(), &retval, &num_retvals, status.get()); EXPECT_FALSE(executed); ASSERT_FALSE(TF_GetCode(status.get()) == TF_OK); // Custom devices can refuse to do type-based dispatch (as hcustom1 is // configured to do) matmul.reset(MatMulOp(context.get(), hcustom1.get(), hcpu.get())); num_retvals = 1; executed = false; TFE_Execute(matmul.get(), &retval, &num_retvals, status.get());
C++ - Registered: Tue Apr 30 12:39:09 GMT 2024 - Last Modified: Thu Aug 27 23:39:24 GMT 2020 - 18.4K bytes - Viewed (0) -
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 30 12:39:09 GMT 2024 - Last Modified: Mon Apr 15 03:35:10 GMT 2024 - 13.6K bytes - Viewed (2) -
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 30 12:39:09 GMT 2024 - Last Modified: Wed Mar 29 22:05:31 GMT 2023 - 18.3K bytes - Viewed (0) -
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 30 12:39:09 GMT 2024 - Last Modified: Fri Feb 09 07:47:20 GMT 2024 - 25.4K bytes - Viewed (1) -
tensorflow/c/experimental/filesystem/plugins/gcs/gcs_filesystem.cc
// ---------------------------------------------------------------------------- namespace tf_gcs_filesystem { // TODO(vnvo2409): Use partial reponse for better performance. // TODO(vnvo2409): We could do some cleanups like `return TF_SetStatus`. // TODO(vnvo2409): Refactor the filesystem implementation when // https://github.com/googleapis/google-cloud-cpp/issues/4482 is done.
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) -
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)