Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for exists (0.19 sec)

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

      // When creating file, use the same permissions as original
      mode_t open_mode = mode & (S_IRWXU | S_IRWXG | S_IRWXO);
    
      // O_WRONLY | O_CREAT | O_TRUNC:
      //   Open file for write and if file does not exist, create the file.
      //   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;
      }
    
    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/experimental/filesystem/plugins/posix/posix_filesystem.cc

      }
    
      close(fd);
    }
    
    static void CreateDir(const TF_Filesystem* filesystem, const char* path,
                          TF_Status* status) {
      if (strlen(path) == 0)
        TF_SetStatus(status, TF_ALREADY_EXISTS, "already exists");
      else if (mkdir(path, /*mode=*/0755) != 0)
        TF_SetStatusFromIOError(status, errno, path);
      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)
  3. tensorflow/c/c_api_experimental.cc

      status->status = c.construction_status();
      if (!status->status.ok()) return;
    
      if (op_reg_data->shape_inference_fn == nullptr) {
        status->status =
            InvalidArgument("No shape inference function exists for op '",
                            node_def.op(), "', did you forget to define it?");
        return;
      }
    
      status->status = c.Run(op_reg_data->shape_inference_fn);
      if (!status->status.ok()) return;
    
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Mon Apr 15 03:35:10 GMT 2024
    - 29.4K bytes
    - Viewed (0)
  4. tensorflow/c/eager/custom_device_test.cc

      ASSERT_TRUE(TF_GetCode(status.get()) == TF_ALREADY_EXISTS)
          << TF_Message(status.get());
    
      RegisterLoggingDevice(
          context.get(), "/job:localhost/replica:0/task:0/device:CPU:0",
          /*strict_scope_placement=*/true, &arrived, &executed, status.get());
      ASSERT_TRUE(TF_GetCode(status.get()) == TF_ALREADY_EXISTS)
          << TF_Message(status.get());
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Thu Aug 27 23:39:24 GMT 2020
    - 18.4K bytes
    - Viewed (0)
  5. tensorflow/c/eager/gradients.cc

    Status GradientRegistry::Register(
        const string& op_name, GradientFunctionFactory gradient_function_factory) {
      auto iter = registry_.find(op_name);
      if (iter != registry_.end()) {
        const string error_msg = "Gradient already exists for op: " + op_name + ".";
        return errors::AlreadyExists(error_msg);
      }
      registry_.insert({op_name, gradient_function_factory});
      return absl::OkStatus();
    }
    Status GradientRegistry::Lookup(
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Thu Feb 15 09:49:45 GMT 2024
    - 19.3K bytes
    - Viewed (0)
  6. tensorflow/c/experimental/filesystem/plugins/gcs/gcs_filesystem.cc

        TF_VLog(3, "CreateDir: directory already exists, not uploading %s", path);
        return TF_SetStatus(status, TF_ALREADY_EXISTS, path);
      }
    
      auto metadata = gcs_file->gcs_client.InsertObject(
          bucket, object, "",
          // Adding this parameter means HTTP_CODE_PRECONDITION_FAILED
          // will be returned if the object already exists, so avoid reuploading.
          gcs::IfGenerationMatch(0), gcs::Fields(""));
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Wed Aug 23 06:55:53 GMT 2023
    - 46.9K bytes
    - Viewed (0)
  7. tensorflow/c/experimental/filesystem/modular_filesystem_registration.cc

    // Validates the operations supplied by the plugin.
    //
    // Uses the 4 simpler `ValidateHelper(const TF_...*)` to validate each
    // individual function table and then checks that the function table for a
    // specific file type exists if the plugin offers support for creating that
    // type of files.
    static Status ValidateOperations(const TF_FilesystemPluginOps* ops) {
      TF_RETURN_IF_ERROR(ValidateHelper(ops->filesystem_ops));
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Tue Mar 07 22:08:43 GMT 2023
    - 12.8K bytes
    - Viewed (0)
  8. tensorflow/c/experimental/filesystem/modular_filesystem.cc

      if (ops_->path_exists == nullptr)
        return errors::Unimplemented(tensorflow::strings::StrCat(
            "Filesystem for ", fname, " does not support FileExists()"));
    
      UniquePtrTo_TF_Status plugin_status(TF_NewStatus(), TF_DeleteStatus);
      const std::string translated_name = TranslateName(fname);
      ops_->path_exists(filesystem_.get(), translated_name.c_str(),
    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)
  9. tensorflow/c/experimental/filesystem/modular_filesystem_test.cc

    }
    
    TEST_P(ModularFileSystemTest, TestCreateDirTwice) {
      const std::string dirpath = GetURIForPath("a_dir");
      Status status = env_->CreateDir(dirpath);
      if (!status.ok()) GTEST_SKIP() << "CreateDir() not supported: " << status;
    
      status = env_->CreateDir(dirpath);
      EXPECT_PRED2(UnimplementedOrReturnsCode, status, Code::ALREADY_EXISTS);
    }
    
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Fri May 27 20:25:58 GMT 2022
    - 71K bytes
    - Viewed (0)
  10. tensorflow/c/c_api_test.cc

                static_cast<TF_Code>(tensorflow::error::DEADLINE_EXCEEDED));
      EXPECT_EQ(TF_NOT_FOUND, static_cast<TF_Code>(tensorflow::error::NOT_FOUND));
      EXPECT_EQ(TF_ALREADY_EXISTS,
                static_cast<TF_Code>(tensorflow::error::ALREADY_EXISTS));
      EXPECT_EQ(TF_PERMISSION_DENIED,
                static_cast<TF_Code>(tensorflow::error::PERMISSION_DENIED));
      EXPECT_EQ(TF_UNAUTHENTICATED,
    C++
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Mon Apr 15 03:35:10 GMT 2024
    - 96.9K bytes
    - Viewed (3)
Back to top