Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for openInputFile (0.27 sec)

  1. tensorflow/compiler/mlir/lite/python/flatbuffer_to_mlir.cc

      // referred logic from mlir::mlirTranslateMain().
    
      std::string errorMessage;
      std::unique_ptr<llvm::MemoryBuffer> input;
      if (input_is_filepath) {
        input = mlir::openInputFile(model_file_or_buffer, &errorMessage);
        if (!input) {
          llvm::errs() << errorMessage << "\n";
          return "";
        }
      } else {
        input = llvm::MemoryBuffer::getMemBuffer(model_file_or_buffer, "flatbuffer",
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Sun May 12 12:39:37 UTC 2024
    - 3.4K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tensorflow/utils/dump_mlir_util_test.cc

      TF_ASSERT_OK(mlir::TF::RunBridgeWithStandardPipeline(
          module_ref.get(),
          /*enable_logging=*/true, /*enable_inliner=*/false));
    
      std::string errorMessage;
      auto input_file = mlir::openInputFile(filepath, &errorMessage);
      EXPECT_THAT(input_file, Not(IsNull()));
    
      auto output_stream = mlir::openOutputFile(output_dump, &errorMessage);
      EXPECT_THAT(output_stream, Not(IsNull()));
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Mar 18 13:40:21 UTC 2024
    - 5.8K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tensorflow_to_stablehlo/tf_to_stablehlo.cc

        const std::vector<std::string>& tag_names, bool is_input_mlir_module) {
      if (is_input_mlir_module) {
        std::string error_message;
        std::unique_ptr<llvm::MemoryBuffer> file =
            openInputFile(input_path, &error_message);
        if (!file) {
          return absl::AbortedError(
              absl::StrCat("Failed to parse input MLIR model: ", error_message));
        }
    
        llvm::SourceMgr source_mgr;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 21 22:58:42 UTC 2024
    - 5.5K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tensorflow/transforms/init_text_file_to_import.cc

              tensorflow::io::JoinPath("assets",
                                       tensorflow::io::Basename(filename)));
        }
    
        // Read the content of the file.
        std::string error_message;
        auto file = openInputFile(filename, &error_message);
        if (!file) {
          return op.emitOpError("failed to open vocabulary file")
                 << " (" << filename << "): " << error_message;
        }
    
        // Splits into lines.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Nov 03 12:35:38 UTC 2022
    - 6.1K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/lite/experimental/tac/utils/utils.cc

        bool experimental_prune_unreachable_nodes_unconditionally,
        llvm::SourceMgr* source_mgr, mlir::MLIRContext* context) {
      std::string error;
      std::unique_ptr<llvm::MemoryBuffer> buffer =
          mlir::openInputFile(input_filename, &error);
      if (buffer == nullptr) {
        return absl::InvalidArgumentError(absl::StrFormat(
            "Cannot open input file: %s. %s", input_filename, error));
      }
    
      if (input_mlir) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Jun 03 03:47:03 UTC 2024
    - 4.5K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/lite/tf_tfl_translate.cc

            &bundle);
      } else if (import_hlo) {
        // HLO import path.
        std::string error;
        std::unique_ptr<llvm::MemoryBuffer> buffer =
            mlir::openInputFile(input_file_name, &error);
        if (buffer == nullptr) {
          llvm::errs() << "Cannot open input file: " << input_file_name << " "
                       << error;
          return kTrFailure;
        }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 03 18:01:23 UTC 2024
    - 14K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tf_mlir_translate_main.cc

            input_filename, tags, exported_names, &context, import_options);
        if (!module_or.status().ok()) return 1;
    
        module_or.value()->print(output->os());
      } else {
        auto input = mlir::openInputFile(input_filename, &error_message);
    
        if (!input) {
          llvm::errs() << error_message << "\n";
          return 1;
        }
    
        // Processes the memory buffer with a new MLIRContext.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Jun 08 01:19:25 UTC 2023
    - 7K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/lite/metrics/error_collector_inst_test.cc

        });
        signalPassFailure();
      };
    };
    
    absl::StatusOr<OwningOpRef<mlir::ModuleOp>> LoadModule(
        MLIRContext* context, const std::string& file_name) {
      std::string error_message;
      auto file = openInputFile(file_name, &error_message);
      if (!file) {
        return tensorflow::errors::InvalidArgument("fail to open input file");
      }
    
      llvm::SourceMgr source_mgr;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Mar 25 01:48:36 UTC 2024
    - 8.2K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/python/mlir.cc

      mlir::StatusScopedDiagnosticHandler diagnostic_handler(&context);
      {
        mlir::Location loc = mlir::UnknownLoc::get(&context);
        std::string error;
        std::unique_ptr<llvm::MemoryBuffer> buffer =
            mlir::openInputFile(flatbuffer_file, &error);
        if (buffer == nullptr) {
          TF_SetStatus(status, TF_INVALID_ARGUMENT,
                       ("Unable to load input file " + error).c_str());
          return;
        }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 03 18:16:49 UTC 2024
    - 19.3K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/lite/tf_to_tfl_flatbuffer.cc

        absl::string_view control_output_arrays, llvm::SourceMgr* source_mgr,
        MLIRContext* context) {
      // Set up the input file.
      std::string error_message;
      auto file = mlir::openInputFile(input_filename, &error_message);
      if (!file) {
        return absl::InvalidArgumentError(
            absl::StrCat("Failed to open input file: ", error_message));
      }
    
      if (input_mlir) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 03 18:01:23 UTC 2024
    - 23.8K bytes
    - Viewed (0)
Back to top