Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 30 for func_20 (0.27 sec)

  1. tensorflow/compiler/mlir/lite/experimental/common/outline_operations.cc

        return_operands.push_back(cloned_output);
      }
      function_builder.create<mlir::func::ReturnOp>(new_func.getLoc(),
                                                    return_operands);
      ops_added.func_op = new_func;
      module.push_back(new_func);
      return new_func;
    }
    
    void ExtractSubgraphToFunc(const Subgraph& subgraph, OpBuilder& builder,
                               ModuleOp& module, OpsAdded& ops_added) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 8.5K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tfr/integration/tfr_decompose_ctx.cc

        : 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());
    
      // Run TFR lowering, inlining and raising to tf.
      func_pm.addPass(mlir::TFR::CreateDecomposeTFOpsPass(tfr_module_));
      func_pm.addPass(mlir::TFR::CreateRaiseToTFOpsPass(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Apr 29 02:34:43 UTC 2024
    - 9.1K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/quantization/stablehlo/passes/insert_calibration_statistics_saver.cc

      // Insert CalibrationStatisticsSaverOp to the end of each region.
      for (auto func_op : module_op.getOps<func::FuncOp>()) {
        int32_t output_file_idx = 0;
        StringRef func_name = func_op.getSymName();
    
        func_op.walk([&output_file_idx, &ctx, &func_name, &aggregator_ops_to_ignore,
                      this](Operation* op) {
          for (Region& region : op->getRegions()) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 14 06:31:57 UTC 2024
    - 7.2K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tf2xla/internal/passes/input_lowering_metrics_pass.cc

     public:
      void runOnOperation() override;
    };
    
    void InputMetricsLoweringPass::runOnOperation() {
      bool has_dynamic_op = false;
      Operation* func_op = getOperation();
    
      func_op->walk([&](Operation* op) {
        auto abstractOp = op->getRegisteredInfo();
        if (!abstractOp) return WalkResult::advance();
    
        if (mlir::mhlo::IsDynamicPadderOp(abstractOp->getTypeID())) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 01 08:55:35 UTC 2024
    - 2.9K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/quantization/stablehlo/cc/saved_model_import.cc

      module_op->walk([&](func::FuncOp func_op) {
        FunctionName func_name = func_op.getSymName().str();
        existing_func_names.insert(func_name);
        // We may retrieve the original function's name from the attribute.
        // Functions without this attribute are ignored.
        auto original_func_name =
            func_op->getAttrOfType<StringAttr>("tf._original_func_name");
        if (original_func_name) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Apr 24 12:49:45 UTC 2024
    - 6.4K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/quantization/tensorflow/cc/convert_asset_args.cc

    // Returns a list of "tf.entry_function" attribute's "inputs" comma-split
    // values.
    //
    // Example: if `func_op` has attribute `tf.entry_function = {inputs =
    // "arg0:0,arg1:0"}`, then this function returns `{"arg0:0", "arg1:0"}`.
    SmallVector<StringRef> GetEntryFunctionInputs(func::FuncOp func_op) {
      auto entry_function_attr =
          func_op->getAttrOfType<DictionaryAttr>("tf.entry_function");
    
      SmallVector<StringRef> inputs;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.4K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/quantization/stablehlo/passes/nchw_convolution_to_nhwc.cc

    };
    
    }  // namespace
    
    void NchwConvolutionToNhwcPass::runOnOperation() {
      func::FuncOp func_op = getOperation();
      MLIRContext& ctx = getContext();
    
      RewritePatternSet patterns(&ctx);
      patterns.add<RewriteNchwConvolutionToNhwc>(&ctx);
    
      if (failed(applyPatternsAndFoldGreedily(func_op, std::move(patterns)))) {
        func_op.emitError() << "Failed to run NchwConvolutionToNhwcPass.";
        signalPassFailure();
      }
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 8.2K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/quantization/tensorflow/cc/convert_asset_args_test.cc

        EXPECT_TRUE(module_op_ref);
        return module_op_ref;
      }
    
      mlir::MLIRContext ctx_{};
    };
    
    func::FuncOp GetMainFuncOp(ModuleOp module_op) {
      for (auto func_op : module_op.getOps<func::FuncOp>()) {
        if (func_op.getSymName() == "main") {
          return func_op;
        }
      }
      return {};
    }
    
    TEST_F(ConvertAssetArgsTest, ConvertsSingleAssetArg) {
      OwningOpRef<ModuleOp> module_op = ParseModuleOpString(R"mlir(
        module {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 6.2K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/quantization/stablehlo/passes/fold_constant_transpose.cc

    };
    
    void FoldConstantTransposePass::runOnOperation() {
      func::FuncOp func_op = getOperation();
      MLIRContext& ctx = getContext();
    
      RewritePatternSet patterns(&ctx);
      patterns.add<FoldTransposedConstantOp>(&ctx);
      if (failed(applyPatternsAndFoldGreedily(func_op, std::move(patterns)))) {
        func_op.emitError("Failed to fold constant->transpose pattern.");
        signalPassFailure();
      }
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 7.7K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/quantization/stablehlo/passes/bridge/verify_quant_legalization.cc

    }
    
    bool IsMhloUniformQuantizedOp(Operation& op) {
      return llvm::isa<mhlo::UniformQuantizeOp, mhlo::UniformDequantizeOp>(op);
    }
    
    void VerifyQuantLegalization::runOnOperation() {
      Operation* func_op = getOperation();
    
      auto walk_result = func_op->walk([&](Operation* op) {
        // Verify all uq and qint types are lowered.
        if (llvm::any_of(op->getOperandTypes(), IsQuantType) ||
            llvm::any_of(op->getResultTypes(), IsQuantType) ||
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 3.5K bytes
    - Viewed (0)
Back to top