Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for SerializeMlirModule (0.46 sec)

  1. tensorflow/compiler/mlir/tensorflow/utils/serialize_mlir_module_utils.h

    #include "mlir/IR/MLIRContext.h"  // from @llvm-project
    #include "tensorflow/core/platform/status.h"
    
    namespace tensorflow {
    
    // Prints a MLIR module `module_op` and returns it as a string.
    std::string SerializeMlirModule(mlir::ModuleOp module_op);
    
    // Parses a MLIR module from `mlir_module_string` into `mlir_module` with
    // context `mlir_context`.
    Status DeserializeMlirModule(llvm::StringRef serialized_mlir_module,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Mar 22 14:25:57 UTC 2022
    - 1.6K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tensorflow/utils/serialize_mlir_module_utils.cc

    #include "tensorflow/compiler/mlir/tensorflow/utils/error_util.h"
    #include "xla/status_macros.h"
    #include "tensorflow/core/platform/errors.h"
    
    namespace tensorflow {
    
    std::string SerializeMlirModule(mlir::ModuleOp module_op) {
      std::string serialized_mlir_module;
      llvm::raw_string_ostream os(serialized_mlir_module);
      mlir::OpPrintingFlags print_flags;
      print_flags.enableDebugInfo();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Feb 26 03:47:51 UTC 2024
    - 2.3K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tf2xla/internal/legalize_tf_mlir.cc

      if (!mlir::SetTPUInfeedLayout(mlir_module))
        return errors::Internal("Failed to set layouts attribute");
    
      TF_ASSIGN_OR_RETURN(
          auto compiled_mlir,
          CompileSerializedMlirToXlaHlo(
              SerializeMlirModule(mlir_module.get()), arg_shapes, device_type,
              use_tuple_args, true, shape_determination_fns, compilation_result,
              custom_legalization_passes, metadata.module_name(),
              lower_to_xla_hlo));
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Sun Apr 14 20:29:34 UTC 2024
    - 6.1K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tensorflow/utils/tf_xla_mlir_translate.cc

      return module_ref;
    }
    
    static mlir::LogicalResult MlirModuleToSerializedMlirStringAttrTranslate(
        mlir::ModuleOp module_op, llvm::raw_ostream& output) {
      output << "\"";
      std::string serialized_module = SerializeMlirModule(module_op);
      llvm::printEscapedString(serialized_module, output);
      output << "\"";
      return mlir::success();
    }
    
    static mlir::LogicalResult MlirTfToHloTextTranslateFunction(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 18.8K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tensorflow/transforms/host_runtime/tpu_rewrite_pass.cc

          clone.setPublic();
        } else {
          clone.setPrivate();
        }
        symbol_table.insert(clone);
      }
    
      *serialized_func_module =
          tensorflow::SerializeMlirModule(module_for_func.get());
      return success();
    }
    
    // Create a `tf._TPUCompileMlir` that contains a MLIR module that is
    // functionally equivalent to the function referenced by cluster_func.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Apr 30 21:25:12 UTC 2024
    - 29.7K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tf2xla/api/v1/compile_mlir_util.cc

          use_tuple_args, enable_op_fallback, use_return_tuple,
          shape_determination_fns, custom_legalization_passes, module_name,
          lower_to_xla_hlo));
    
      auto mlir_compilation = SerializeMlirModule(module_op);
    
      // Only attempt to fill in the compilation result's IO info if lowering.
      if (lower_to_xla_hlo) {
        TF_RETURN_IF_ERROR(PopulateCollectiveInfo(module_op, compilation_result));
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 21 17:24:39 UTC 2024
    - 45.3K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tf2xla/internal/passes/extract_outside_compilation.cc

          ModuleOp::create(mlir::UnknownLoc::get(func.getContext()));
      SymbolTable symbol_table(module_for_func.get());
    
      symbol_table.insert(func);
      *serialized_func_module =
          tensorflow::SerializeMlirModule(module_for_func.get());
    }
    
    // Returns whether `op` or ops nested in `op` are outside compiled.
    bool HasOutsideCompilationNested(Operation* op) {
      return op
          ->walk([&](Operation* walked_op) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Apr 30 21:25:12 UTC 2024
    - 68.3K bytes
    - Viewed (0)
Back to top