Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 67 for getFunctionType (0.89 sec)

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

      builder.setInsertionPointToEnd(first_block);
      auto func = builder.create<mlir::func::FuncOp>(
          ops[0]->getLoc(), dialect.str() + std::to_string(function_id),
          builder.getFunctionType(input_types, output_types));
      func->setAttr("dialect", builder.getStringAttr(dialect));
      auto block = func.addEntryBlock();
    
      llvm::DenseSet<Operation*> all_operations;
      for (Operation* outer : ops) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Mar 17 07:31:01 UTC 2023
    - 8K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tensorflow/transforms/tfg-to-tfe.cc

        // will be the operations inside the function body rather than representing
        // them in the function signature.
        FunctionType func_type = rewriter.getFunctionType({}, {});
        func::FuncOp func = rewriter.create<func::FuncOp>(
            loc, kImportModelDefaultGraphFuncName, func_type);
        rewriter.setInsertionPointToStart(func.addEntryBlock());
        auto executor_graph =
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 17 17:58:54 UTC 2024
    - 21.2K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tensorflow/transforms/functional_control_flow_to_cfg.cc

      // they have exactly one call-site and they are sharing the operands.
      for (Type type : cond_fn.getFunctionType().getInputs()) {
        cond_block->addArgument(type, loc);
      }
      for (Type type : body_fn.getFunctionType().getInputs()) {
        body_block->addArgument(type, loc);
        orig_block_tail->addArgument(type, loc);
      }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Jan 13 11:42:59 UTC 2023
    - 12.2K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/lite/transforms/modify_io_nodes.cc

      // Handle the entry functions only.
      if (func.getName() != "main" && (!attrs || attrs.empty())) {
        return;
      }
    
      OpBuilder builder(func);
      FunctionType func_type = func.getFunctionType();
      llvm::SmallVector<Type, 4> new_input_types(func_type.getInputs().begin(),
                                                 func_type.getInputs().end());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 8.9K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tensorflow/transforms/convert_session_initializer_to_function.cc

        func->removeAttr("tf_saved_model.exported_names");
    
        ArrayRef<Value> args;
        builder.create<func::CallOp>(session_initializer.getLoc(),
                                     func.getFunctionType().getResults(),
                                     func.getSymName(), args);
      }
      builder.create<func::ReturnOp>(session_initializer.getLoc());
    
      session_initializer.erase();
    }
    
    }  // namespace
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Feb 01 05:03:09 UTC 2023
    - 3.6K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tensorflow/transforms/functional_control_flow_to_regions.cc

      auto loc = op->getLoc();
      if (use_region_args) {
        auto inputs = func.getFunctionType().getInputs();
        entry->addArguments(inputs, SmallVector<Location>(inputs.size(), loc));
        args = entry->getArguments();
      }
      llvm::SmallVector<Value, 4> casted_args;
      casted_args.reserve(func.getNumArguments());
      for (const auto& ArgAndType : zip(args, func.getFunctionType().getInputs())) {
        Value arg = std::get<0>(ArgAndType);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 11K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tensorflow/transforms/promote_resources_to_args.cc

    mlir::LogicalResult PromoteVarHandlesToArguments(
        func::FuncOp function, bool add_validation,
        llvm::SmallVectorImpl<std::string>* var_handle_shared_names) {
      Block& block = function.front();
      auto func_type = function.getFunctionType();
    
      auto func_arg_types = llvm::to_vector<4>(func_type.getInputs());
      llvm::SmallDenseMap<llvm::StringRef, int> var_arg_index_by_name;
      for (auto var_handle_op :
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 17.1K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/lite/stablehlo/transforms/legalize_tf_xla_call_module_to_stablehlo_pass.cc

    void RemovePlatformIndexArg(MLIRContext *ctx, func::FuncOp func_op) {
      // If there are multiple platforms, the first argument is reserved for
      // passing the platform index.
      FunctionType function_type = func_op.getFunctionType();
      ArrayRef<Type> new_input_types =
          function_type.getInputs().take_back(func_op.getNumArguments() - 1);
      func_op.setFunctionType(
          FunctionType::get(ctx, new_input_types, function_type.getResults()));
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Jan 25 09:43:18 UTC 2024
    - 10.9K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tensorflow/transforms/stack_ops_decomposition.cc

        llvm::function_ref<std::optional<Type>(int64_t)> arg_to_stack_type,
        llvm::function_ref<void(ArrayRef<BlockArgument>)> handle_new_size_vars =
            nullptr) {
      auto new_input_types = llvm::to_vector<8>(func.getFunctionType().getInputs());
      auto size_var_type = GetSizeVarType(OpBuilder(func));
      int64_t original_arg_count = new_input_types.size();
      for (int64_t i = 0; i < original_arg_count; ++i) {
        auto stack_type = arg_to_stack_type(i);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 23.8K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/lite/transforms/prepare_composite_functions_tf.cc

                                                 custom_option_buffer))) {
        return failure();
      }
    
      auto tfl_fusable_op = builder.create<TFL::CustomOp>(
          func->getLoc(), func.getFunctionType().getResults(), func.getArguments(),
          custom_op_name, CustomOption(&builder, custom_option_buffer));
      builder.create<func::ReturnOp>(func->getLoc(), tfl_fusable_op.getResults());
      return success();
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 17.6K bytes
    - Viewed (0)
Back to top