Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for tfr_module_ (0.2 sec)

  1. tensorflow/compiler/mlir/tfr/integration/tfr_decompose_ctx.cc

      }
      return absl::OkStatus();
    }
    
    // Constructor of the decompose context.
    TFRDecomposeContext::TFRDecomposeContext(mlir::ModuleOp tfr_module)
        : tfr_module_(tfr_module), pm_(tfr_module_.getContext()) {
      mlir::OpPassManager& func_pm = pm_.nest<mlir::func::FuncOp>();
    
      // Prepare the imported graph.
      func_pm.addPass(mlir::CreateExecutorDialectToFunctionalConversionPass());
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Apr 29 02:34:43 UTC 2024
    - 9.1K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tfr/integration/tfr_decompose_ctx.h

      // Runs the decompose passes on the user_module.
      Status DecomposeGraph(mlir::ModuleOp user_module);
    
      // Erases the tfr_module created.
      void Destroy();
    
     private:
      mlir::ModuleOp tfr_module_;
      mlir::PassManager pm_;
    
      GraphExportConfig export_confs_;
    };
    
    // Decomposes the NodeDef to a set of primitive ops according to the decompose
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Feb 26 11:12:54 UTC 2024
    - 3.2K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tfr/passes/passes.h

                                          RewritePatternSet &patterns);
    
    // Decompose ops.
    std::unique_ptr<OperationPass<func::FuncOp>> CreateDecomposeTFOpsPass(
        std::optional<ModuleOp> tfr_module = std::nullopt);
    
    // Rewrites quantized operands and results with their storage types.
    // This pass should be run at module level after decomposition, if there are
    // quantized operands or results.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Jun 08 01:19:25 UTC 2023
    - 2K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tensorflow_to_stablehlo/python/pywrap_tensorflow_to_stablehlo_lib.cc

      mlir::MLIRContext context(registry);
      context.loadAllAvailableDialects();
    
      auto tf_module = mlir::parseSourceString<ModuleOp>(module_op_str, &context);
      if (!tf_module) {
        return absl::UnknownError("Failed to parse MLIR module");
      }
    
      auto mlir_file_path = ExportModule(*tf_module);
      if (!mlir_file_path.ok()) {
        return absl::UnknownError(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 21 22:58:42 UTC 2024
    - 5K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/quantization/stablehlo/python/integration_test/stablehlo_quantizer_odml_oss.ipynb

            "  ).call,\n",
            "    with_gradient=False,\n",
            "    native_serialization=True,\n",
            "    native_serialization_platforms=('cpu',))\n",
            "\n",
            "tf_module = tf.Module()\n",
            "tf_module.f = tf.function(\n",
            "    jax_callable,\n",
            "    autograph=False,\n",
            "    input_signature=[\n",
            "        tf.TensorSpec(input_shape, jnp.float32, 'lhs_operand')\n",
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Apr 12 03:40:43 UTC 2024
    - 5.4K bytes
    - Viewed (0)
  6. tensorflow/cc/saved_model/testdata/generate_saved_models.py

        return 2
      os.makedirs(export_path)
    
      tf_module = module_ctor()
      if version == 2:
        options = save_options.SaveOptions(save_debug_info=True)
        saved_model.save(tf_module, export_path, options=options)
      else:
        builder = saved_model.builder.SavedModelBuilder(export_path)
        builder.add_meta_graph_and_variables(tf_module, ["serve"])
        builder.save()
    
    
    if __name__ == "__main__":
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Sep 18 18:06:18 UTC 2023
    - 4.6K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tfr/passes/raise_to_tf.cc

                        arith::ArithDialect, func::FuncDialect>();
      }
    
      explicit RaiseToTFOpsPass(std::optional<ModuleOp> tfr_module,
                                bool materialize_derived_attrs)
          : external_tfr_module_(tfr_module),
            materialize_derived_attrs_(materialize_derived_attrs) {}
    
      StringRef getArgument() const final { return "tfr-raise-to-tf"; }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 21.8K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/lite/stablehlo/odml_to_stablehlo.cc

      os.flush();
    
      output->os() << result;
      output->keep();
    
      return absl::OkStatus();
    }
    
    tensorflow::Status ConvertTFToStableHLO(
        ModuleOp tf_module, const PassPipelineCLParser& pass_pipeline) {
      PassManager pm(tf_module.getContext());
      if (failed(applyPassManagerCLOptions(pm))) {
        return tensorflow::errors::Aborted(
            "Failed to apply MLIR pass manager CL options.");
      }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 03 18:16:49 UTC 2024
    - 14.1K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tensorflow/transforms/xla_call_module_deserialization.cc

    // module itself without inserting into the tf module.
    FailureOr<StringAttr> RenameStablehloFunctions(
        MLIRContext *context, SymbolTableCollection &symbol_tables,
        ModuleOp tf_module, ModuleOp stablehlo_module) {
      SymbolTable &tf_symbol_table = symbol_tables.getSymbolTable(tf_module);
      // `stablehlo_module` is deleted right after the deserialization, so no need
      // to store its `SymbolTable` to `SymbolTableCollection`.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 23 09:05:47 UTC 2024
    - 11.1K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tfr/passes/decompose.cc

    }
    
    }  // namespace
    
    // Creates an instance of the pass to decompose the TF ops.
    std::unique_ptr<OperationPass<func::FuncOp>> CreateDecomposeTFOpsPass(
        std::optional<ModuleOp> tfr_module) {
      return std::make_unique<DecomposeTFOpsPass>(tfr_module);
    }
    
    static PassRegistration<DecomposeTFOpsPass> pass([] {
      return CreateDecomposeTFOpsPass();
    });
    
    }  // namespace TFR
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 14.6K bytes
    - Viewed (0)
Back to top