Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 435 for ModuleOp (0.15 sec)

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

        }
      }
    
      return WalkResult::advance();
    }
    
    FailureOr<OwningOpRef<ModuleOp>> CreatePrunedModule(
        ModuleOp module, llvm::ArrayRef<llvm::StringRef> function_names) {
      SymbolTableCollection symbol_table;
      OpBuilder builder(module.getContext());
    
      OwningOpRef<ModuleOp> pruned =
          builder.create<ModuleOp>(module->getLoc());
      (*pruned)->setAttrs(module->getAttrs());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 19 03:46:51 UTC 2023
    - 4.1K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/quantization/common/test_base.h

      // Parses `module_op_str` to create a `ModuleOp`.
      OwningOpRef<ModuleOp> ParseModuleOpString(
          const absl::string_view module_op_str) {
        return parseSourceString<ModuleOp>(module_op_str, ctx_.get());
      }
    
      // Convenience function that returns the first operation of type `OpT` from
      // the `@main` function in `module_op`. Useful when testing with a text
      // representation of a `ModuleOp` containing a single function `@main`.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 04 07:19:09 UTC 2024
    - 3.5K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/quantization/stablehlo/passes/passes.td

      }];
    }
    
    def RestoreFunctionNamePass : Pass<"stablehlo-restore-function-name", "ModuleOp"> {
      let summary = "Restores function name from XlaCallModule op.";
    }
    
    def QuantizeCompositeFunctionsPass : Pass<"stablehlo-quantize-composite-functions", "ModuleOp"> {
      let summary = "Quantize composite functions with QDQ input / outputs.";
      let options = [
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 14 06:31:57 UTC 2024
    - 10.3K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/quantization/stablehlo/ops/stablehlo_op_quant_spec_test.cc

          return %0 : tensor<1x3xf32>
        }
      }
    )mlir";
    
    TEST_F(IsOpQuantizableStableHloTest, ConstantOpQuantizable) {
      OwningOpRef<ModuleOp> module_op = ParseModuleOpString(kModuleConstantAdd);
      ASSERT_TRUE(module_op);
    
      auto test_func = module_op->lookupSymbol<func::FuncOp>("constant_add");
      ASSERT_THAT(test_func, NotNull());
    
      auto constant_op =
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 04 07:19:09 UTC 2024
    - 14.8K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tensorflow/utils/tpu_rewrite_device_util_test.cc

    namespace tensorflow {
    namespace {
    
    absl::StatusOr<mlir::OwningOpRef<mlir::ModuleOp>> GetMlirModuleFromString(
        llvm::StringRef string, mlir::MLIRContext* context) {
      mlir::DialectRegistry mlir_registry;
      RegisterAllTensorFlowDialects(mlir_registry);
      context->appendDialectRegistry(mlir_registry);
      mlir::OwningOpRef<mlir::ModuleOp> mlir_module;
      auto status =
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Apr 26 09:37:10 UTC 2024
    - 46.8K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tensorflow/translate/tf_mlir_translate.h

    // Converts a TensorFlow GraphDef contained in `input` param into a MLIR module.
    // Creates MLIR entities into the given MLIR `context`.
    absl::StatusOr<mlir::OwningOpRef<mlir::ModuleOp>>
    GraphdefToMlirTranslateFunction(
        llvm::StringRef input, const std::vector<std::string>& input_arrays,
        const std::vector<std::string>& input_dtypes,
        const std::vector<std::optional<std::vector<int>>>& input_shapes,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 01 11:17:36 UTC 2024
    - 5.9K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/quantization/stablehlo/cc/calibration/component.cc

    absl::Status CalibrationComponent::ExportToSavedModel(
        ModuleOp module_op, absl::string_view calibration_data_dir,
        const bool force_regenerate_calibration_data,
        const absl::string_view dst_saved_model_path) {
      TF_ASSIGN_OR_RETURN(const std::string checkpoint_dir, GetLocalTmpFileName());
    
      // Clone ModuleOp and function aliases so changes in this pipeline won't
      // be reflected in the original values.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 14 06:31:57 UTC 2024
    - 9.2K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/quantization/stablehlo/instrumentations/save_report.cc

                                         absl::Nullable<Operation*> op) {
      // It is known that `op` is `ModuleOp` when `pass` is
      // `QuantizeCompositeFunctionPass`, but the check is still performed to be
      // defensive.
      return pass != nullptr &&
             pass->getArgument() == "stablehlo-quantize-composite-functions" &&
             isa_and_nonnull<ModuleOp>(op);
    }
    
    // Report is saved only when:
    // * After running `QuantizeCompositeFunctionPass`.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 03 02:59:01 UTC 2024
    - 3.6K bytes
    - Viewed (0)
  9. 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();
      module_op.print(os, print_flags);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Feb 26 03:47:51 UTC 2024
    - 2.3K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/quantization/tensorflow/cc/save_variables_test.cc

        return tmp_dir;
      }
    
      // Parses `module_op_str` to create a `ModuleOp`. Checks whether the created
      // module op is valid.
      mlir::OwningOpRef<mlir::ModuleOp> ParseModuleOpString(
          const absl::string_view module_op_str) {
        auto module_op_ref =
            mlir::parseSourceString<mlir::ModuleOp>(module_op_str, &ctx_);
        EXPECT_TRUE(module_op_ref);
        return module_op_ref;
      }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Sep 06 19:12:29 UTC 2023
    - 16.2K bytes
    - Viewed (0)
Back to top