Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 30 for StatusScopedDiagnosticHandler (0.72 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/tensorflow/utils/error_util.h

    // absl::Status)
    class StatusScopedDiagnosticHandler : public BaseScopedDiagnosticHandler {
     public:
      // Constructs a diagnostic handler in a context. If propagate is true, then
      // diagnostics reported are also propagated back to the original diagnostic
      // handler.  If filter_stack is true, a reduced stack will be produced.
    
      explicit StatusScopedDiagnosticHandler(MLIRContext* context,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Sep 06 19:12:29 UTC 2023
    - 2.9K bytes
    - Viewed (0)
  4. 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)
  5. tensorflow/compiler/mlir/tensorflow/transforms/bridge.cc

      PassManager bridge(module.getContext());
    
      StandardPipelineOptions pipeline_options;
      pipeline_options.enable_inliner.setValue(enable_inliner);
      CreateTFStandardPipeline(bridge, pipeline_options);
    
      mlir::StatusScopedDiagnosticHandler diag_handler(
          module.getContext(), /*propagate=*/false,
          /*filter_stack=*/!VLOG_IS_ON(1));
    
      constexpr char kBridgeComponent[] = "TFXLABridge";
      if (enable_logging || VLOG_IS_ON(1)) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Nov 09 17:16:05 UTC 2023
    - 2.4K bytes
    - Viewed (0)
  6. 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)
  7. 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)
  8. 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)
  9. 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)
  10. 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)
Back to top