Search Options

Results per page
Sort
Preferred Languages
Advance

Results 171 - 180 of 445 for FuncOp (0.12 sec)

  1. tensorflow/compiler/mlir/tensorflow/transforms/tensor_list_ops_decomposition.cc

              TensorListOpsDecompositionPass> {
      void runOnOperation() override;
    };
    
    // Updates func's type according to its current arguments and return values.
    void UpdateFuncType(func::FuncOp func) {
      llvm::SmallVector<Type, 8> arg_types;
      for (auto arg : func.getArguments()) arg_types.push_back(arg.getType());
      func.setType(
          FunctionType::get(func.getContext(), arg_types,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 39.2K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/lite/stablehlo/odml_converter/transforms/outline_composites.cc

      auto ftype = FunctionType::get(rewriter.getContext(), {type}, {type});
      auto name = rewriter.getStringAttr("gelu_decomp");
      func::FuncOp new_func = rewriter.create<func::FuncOp>(
          insertion_point->front().getLoc(), name, ftype);
      new_func.setPrivate();
      new_func.addEntryBlock();
      rewriter.setInsertionPointToStart(&new_func.getBody().front());
    
      auto one_val = DenseElementsAttr::get(type, kOne);
      auto one_cst =
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 17 17:58:54 UTC 2024
    - 9.6K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tensorflow/transforms/decompose_optionals.cc

        return LogicalResult::success(success);
      }
    };
    
    class HandleFunc : public OpRewritePattern<func::FuncOp> {
     public:
      using OpRewritePattern::OpRewritePattern;
    
      LogicalResult matchAndRewrite(func::FuncOp f,
                                    PatternRewriter& rewriter) const override {
        // Adjust the function type to match the block args. So this e.g. transforms
        //
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Jun 12 21:18:05 UTC 2024
    - 9.8K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/lite/flatbuffer_import.cc

            queue.push_back(op);
          }
        }
      }
    
      return visited;
    }
    
    // We want to adjust the func op according to some cross ops information.
    static StatusOr<FuncOp> PostProcessFuncOp(FuncOp func) {
      OpBuilder builder(func);
      // When a quantized constant is imported, its quantization parameter is set
      // to be narrow range. Here revert to be the fully range if the user doesn't
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 21 18:21:50 UTC 2024
    - 66.8K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/lite/transforms/partitioned_topological_sort.cc

    };
    
    void PartitionedTopologicalSortPass::runOnOperation() {
      func::FuncOp func = getOperation();
      if (!PartitionedTopologicalSort(func, &func.getBody().front(), partition_)) {
        return signalPassFailure();
      }
    }
    
    }  // namespace
    
    std::unique_ptr<OperationPass<func::FuncOp>>
    CreatePartitionedTopologicalSortPass() {
      return std::make_unique<PartitionedTopologicalSortPass>();
    }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Dec 19 15:05:28 UTC 2023
    - 7.2K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tensorflow/transforms/strip_tf_attributes.cc

      if (name.starts_with("tf.") || name.starts_with("tf_")) return true;
      StringRef value = namedAttr.getValue().getDialect().getNamespace();
      return value == "tf" || value.starts_with("tf_");
    }
    
    void StripFunction(func::FuncOp func) {
      auto stripAttrs = llvm::to_vector<4>(llvm::make_filter_range(
          func->getAttrs(),
          [](NamedAttribute namedAttr) { return ShouldStripAttr(namedAttr); }));
      for (auto namedAttr : stripAttrs) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Dec 19 08:06:04 UTC 2023
    - 3.2K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tensorflow/transforms/order_by_dialect.cc

                                op->getName().getDialectNamespace();
    }
    
    void OrderByDialectPass::runOnOperation() {
      ModuleOp module = getOperation();
      for (func::FuncOp func : module.getOps<func::FuncOp>()) {
        std::vector<std::pair<Operation*, Operation*>> side_effect_data;
        const detail::SideEffectAnalysisInfo* info = nullptr;
        auto extra_dependencies =
            [&](Operation* op,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Nov 08 17:01:11 UTC 2022
    - 3.5K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tfrt/analysis/cost_analysis.h

    class CostAnalysis {
     public:
      explicit CostAnalysis(
          mlir::func::FuncOp func_op,
          const tfrt_stub::CostRecorder* cost_recorder = nullptr) {
        cost_recorder_ = cost_recorder;
        AnalyzeArguments(func_op);
        AnalyzeBlock(&func_op.front());
      }
    
      int64_t GetCost(mlir::Operation* op) const;
    
     private:
      void AnalyzeArguments(mlir::func::FuncOp func_op);
      void AnalyzeBlock(mlir::Block* block);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Jun 06 03:08:33 UTC 2023
    - 3.1K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tensorflow/transforms/convert_session_initializer_to_function.cc

      }
    
      auto init = builder.create<func::FuncOp>(
          module.getLoc(), name,
          FunctionType::get(module.getContext(), /*inputs=*/{}, /*results=*/{}));
    
      // Make savedmodel verification happy.
      init->setAttr("tf_saved_model.exported_names",
                    builder.getStrArrayAttr({name}));
    
      builder.setInsertionPointToStart(init.addEntryBlock());
    
      for (func::FuncOp func : tf_saved_model::GetInitializerFunctions(module)) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Feb 01 05:03:09 UTC 2023
    - 3.6K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/lite/utils/fake_quant_utils.cc

    namespace mlir {
    namespace TFL {
    
    // Moves the TF operations out from the tfl.TFCustomOps wrappers inside the
    // function. This is a no-op for the ops which are not wrapped.
    LogicalResult UnwrapTFCustomOps(func::FuncOp fn, OpBuilder& builder) {
      llvm::SmallVector<Operation*, 4> wrapped_ops;
      fn.walk([&](TFL::CustomTfOp custom_op) {
        auto* real_op = &custom_op.getBody().front().front();
        wrapped_ops.push_back(real_op);
      });
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Sat Jun 03 00:14:05 UTC 2023
    - 4.3K bytes
    - Viewed (0)
Back to top