- Sort Score
- Result 10 results
- Languages All
Results 1 - 9 of 9 for unsafe (0.17 sec)
-
tensorflow/c/c_api.cc
// call Session::Extend(). bool ExtendSessionGraphHelper(TF_Session* session, TF_Status* status) { if (session->graph != nullptr) { // Take the graph lock before the session lock to avoid deadlock. This is // safe since session->graph does not change. session->graph->mu.lock(); mutex_lock session_lock(session->mu); const Graph& graph = session->graph->graph;
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) -
tensorflow/c/c_api_experimental.cc
if (!status->status.ok()) { return 0; } return op_reg_data->op_def.is_stateful(); } void TF_InitMain(const char* usage, int* argc, char*** argv) { tensorflow::port::InitMain(usage, argc, argv); } int TF_PickUnusedPortOrDie() { return tensorflow::internal::PickUnusedPortOrDie(); } TFE_TensorHandle* TFE_NewTensorHandleFromScalar(TF_DataType data_type,
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) -
tensorflow/c/experimental/filesystem/plugins/posix/posix_filesystem.cc
const char* filename; int fd; } PosixFile; static void Cleanup(TF_RandomAccessFile* file) { auto posix_file = static_cast<PosixFile*>(file->plugin_file); close(posix_file->fd); // This would be safe to free using `free` directly as it is only opaque. // However, it is better to be consistent everywhere. plugin_memory_free(const_cast<char*>(posix_file->filename)); delete posix_file; }
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/c_api_test.cc
TF_Tensor* t = TF_NewTensor(TF_FLOAT, dims, 2, values, num_bytes, &Deallocator, &deallocator_called); TF_Tensor* o = TF_TensorMaybeMove(t); ASSERT_TRUE(o == nullptr); // It is unsafe to move memory TF might not own. TF_DeleteTensor(t); EXPECT_TRUE(deallocator_called); } TEST(CAPI, LibraryLoadFunctions) { // TODO(b/73318067): Fix linking for the GPU test generated by the
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) -
tensorflow/c/experimental/filesystem/modular_filesystem_test.cc
tensorflow::Flag("tmp_dir", tensorflow::SetTmpDir, "", "Temporary directory to store test data.")}; if (!tensorflow::Flags::Parse(&argc, argv, flag_list)) { std::cout << tensorflow::Flags::Usage(argv[0], flag_list); return -1; } tensorflow::testing::InstallStacktraceHandler(); tensorflow::ModularFileSystemTest::InitializeTestRNG(); testing::InitGoogleTest(&argc, argv);
C++ - Registered: Tue Apr 30 12:39:09 GMT 2024 - Last Modified: Fri May 27 20:25:58 GMT 2022 - 71K bytes - Viewed (0) -
tensorflow/c/eager/parallel_device/parallel_device_lib.cc
} }; using ExecutorPtr = std::unique_ptr<TFE_Executor, ExecutorDeleter>; } // namespace // Allows a single op at a time to be launched without blocking. // // DeviceThread itself is thread-safe, in that StartExecute will block if there // is a pending execution. Since StartExecute is equivalent to grabbing a lock, // multiple DeviceThreads should always be accessed in the same order to avoid // deadlocks.
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/posix/copy_file_linux.cc
off_t offset = 0; int bytes_transferred = 0; int rc = 1; // When `sendfile` returns 0 we stop copying and let callers handle this. while (offset < size && rc > 0) { // Use uint64 for safe compare SSIZE_MAX uint64_t chunk = size - offset; if (chunk > SSIZE_MAX) chunk = SSIZE_MAX; rc = sendfile(dst_fd, src_fd, &offset, static_cast<size_t>(chunk)); if (rc < 0) return -1;
C++ - Registered: Tue Apr 23 12:39:09 GMT 2024 - Last Modified: Fri Nov 22 21:23:55 GMT 2019 - 1.5K bytes - Viewed (0) -
tensorflow/c/eager/c_api.cc
} // 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) { return static_cast<TFE_ContextDevicePlacementPolicy>(
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) -
tensorflow/c/c_api_function_test.cc
ASSERT_EQ(TF_OK, TF_GetCode(s_)) << TF_Message(s_); TF_GraphCopyFunction(host_graph_, func_, nullptr, s_); ASSERT_EQ(TF_OK, TF_GetCode(s_)) << TF_Message(s_); // Delete the gradient func. // It is safe to delete after adding a copy to host graph. TF_DeleteFunction(grad_func); // Check that GraphDef did not change GraphDef gdef2; GetGraphDef(host_graph_, &gdef2);
C++ - Registered: Tue Apr 30 12:39:09 GMT 2024 - Last Modified: Thu Jul 20 22:08:54 GMT 2023 - 63.6K bytes - Viewed (6)