Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 27 for StatusScopedDiagnosticHandler (0.62 sec)

  1. tensorflow/compiler/mlir/tensorflow/utils/error_util.cc

    #include "tensorflow/core/platform/errors.h"
    #include "tensorflow/core/platform/status.h"
    #include "tensorflow/core/util/managed_stack_trace.h"
    
    namespace mlir {
    
    StatusScopedDiagnosticHandler::StatusScopedDiagnosticHandler(
        MLIRContext* context, bool propagate, bool filter_stack)
        : BaseScopedDiagnosticHandler(context, propagate, filter_stack) {
      if (filter_stack) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 2.1K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tensorflow/utils/error_util_test.cc

    namespace {
    
    using testing::HasSubstr;
    
    TEST(ErrorUtilTest, StatusScopedDiagnosticHandler) {
      MLIRContext context;
      auto id = StringAttr::get(&context, "//tensorflow/python/test.py");
      auto loc = FileLineColLoc::get(&context, id, 0, 0);
    
      // Test OK without diagnostic gets passed through.
      {
        TF_ASSERT_OK(
            StatusScopedDiagnosticHandler(&context).Combine(absl::OkStatus()));
      }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Feb 26 03:47:51 UTC 2024
    - 6.7K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/python/mlir.cc

          TF_SetStatus(status, TF_INVALID_ARGUMENT,
                       ("Invalid pass_pipeline: " + error_stream.str()).c_str());
          return "// error";
        }
    
        mlir::StatusScopedDiagnosticHandler statusHandler(module.getContext());
        if (failed(pm.run(module))) {
          tsl::Set_TF_Status_from_Status(status, statusHandler.ConsumeStatus());
          return "// error";
        }
      }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 03 18:16:49 UTC 2024
    - 19.3K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/quantization/tensorflow/cc/run_passes.cc

    namespace tensorflow {
    namespace quantization {
    
    absl::Status RunPassesOnModuleOp(
        std::optional<absl::string_view> mlir_dump_file_name,
        mlir::PassManager& pass_manager, mlir::ModuleOp module_op) {
      mlir::StatusScopedDiagnosticHandler statusHandler(module_op.getContext(),
                                                        /*propagate=*/true);
    
      absl::StatusOr<std::unique_ptr<llvm::raw_ostream>> dump_file;
      if (mlir_dump_file_name) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Feb 07 01:17:26 UTC 2024
    - 1.8K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tensorflow/utils/serialize_mlir_module_utils.cc

      TF_RET_CHECK(mlir_module) << "unexpected null MLIR module pointer";
    
      // Make sure we catch any error reported by MLIR and forward it to the TF
      // error reporting system.
      mlir::StatusScopedDiagnosticHandler error_handler(mlir_context);
    
      // Parse the module.
      *mlir_module = mlir::parseSourceString<mlir::ModuleOp>(serialized_mlir_module,
                                                             mlir_context);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Feb 26 03:47:51 UTC 2024
    - 2.3K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/quantization/tensorflow/cc/run_passes.h

    absl::Status RunPasses(const absl::string_view name, FuncT add_passes_func,
                           mlir::MLIRContext& ctx, mlir::ModuleOp module_op) {
      mlir::PassManager pm{&ctx};
      add_passes_func(pm);
    
      mlir::StatusScopedDiagnosticHandler diagnostic_handler{&ctx};
      TF_RETURN_IF_ERROR(MaybeEnableIrPrinting(pm, name));
    
      if (failed(pm.run(module_op))) {
        return absl::InternalError(
            absl::StrFormat("Failed to run pass: %s. %s", name,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Feb 07 01:17:26 UTC 2024
    - 3K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tensorflow/utils/dump_graph.cc

      mlir::MLIRContext context;
      mlir::OwningOpRef<mlir::ModuleOp> module;
      if (flib_def) {
        flib_def = &graph.flib_def();
      }
      auto convert = [&]() -> Status {
        mlir::StatusScopedDiagnosticHandler status_handler(&context);
        // TODO(jpienaar): Both the graph debug info and import config should be
        // specifiable.
        GraphDebugInfo debug_info;
        switch (config.dialect) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Feb 26 03:47:51 UTC 2024
    - 3.6K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tensorflow/transforms/graph_optimization_pass.cc

      // Prepare IR for exporting.
      pm.addPass(CreateBreakUpIslandsPass());
    
      // In case of failure, the `diag_handler` converts MLIR errors emitted to the
      // MLIRContext into a tensorflow::Status.
      StatusScopedDiagnosticHandler diag_handler(module.getContext());
      LogicalResult result = pm.run(module);
      (void)result;
      return diag_handler.ConsumeStatus();
    }
    
    }  // namespace TF
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 09:56:53 UTC 2024
    - 3K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tfrt/function/function.cc

      print_flags.elideLargeElementsAttrs();
    
      if (VLOG_IS_ON(1)) {
        VLOG(1) << "Input TF Executor dialect:";
        DumpMlirOpToFile("tf_to_tfrt_tf_executor_dialect", module);
      }
    
      mlir::StatusScopedDiagnosticHandler diag_handler(module.getContext());
    
      // Lower MLIR TF Dialect to MLIR TFRT CoreRT dialect.
      mlir::PassManager pm(module.getContext());
      tensorflow::applyTensorflowAndCLOptions(pm);
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Apr 22 08:13:15 UTC 2024
    - 3.8K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/lite/sparsity/sparsify_model.cc

    namespace mlir {
    namespace lite {
    
    absl::Status SparsifyModel(const tflite::ModelT& input_model,
                               flatbuffers::FlatBufferBuilder* builder) {
      MLIRContext context;
      StatusScopedDiagnosticHandler statusHandler(&context,
                                                  /*propagate=*/true);
    
      // Import input_model to a MLIR module
      flatbuffers::FlatBufferBuilder input_builder;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Jun 10 20:16:40 UTC 2024
    - 4.3K bytes
    - Viewed (0)
Back to top