Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 28 of 28 for getFunctionType (0.15 sec)

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

      main_func.getArguments().front().setType(tensor_string_type);
      main_func.setType(
          FunctionType::get(builder.getContext(), {tensor_string_type},
                            main_func.getFunctionType().getResults()));
      // Name of the main function for the eventual executable needs to be set.
      main_func->setAttr(kTfSavedModelExportedNamesAttr,
                         builder.getStrArrayAttr({func_name}));
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 7.2K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/python/mlir_wrapper/ops.cc

          .def("getArguments",
               [](mlir::func::FuncOp& f) { return f.getArguments().vec(); })
          .def("getName", [](mlir::func::FuncOp& f) { return f.getName().str(); })
          .def("getType", &mlir::func::FuncOp::getFunctionType);
    
      py::class_<mlir::func::ReturnOp>(m, "ReturnOp")
          .def("create",
               [](mlir::OpBuilder& opb, mlir::Location loc,
                  std::vector<mlir::Value> values) -> mlir::Operation* {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Mar 30 02:12:49 UTC 2022
    - 7.6K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tensorflow/transforms/lift_variables.cc

        // Update the function type.
        func.setType(mlir::FunctionType::get(module.getContext(),
                                             func.getBody().getArgumentTypes(),
                                             func.getFunctionType().getResults()));
      }
      return success();
    }
    
    }  // namespace tf_saved_model
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 23 09:05:47 UTC 2024
    - 7.9K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/lite/debug/debug_test.cc

        builder.setInsertionPointToStart(module_->getBody());
        auto func = builder.create<mlir::func::FuncOp>(  //
            builder.getUnknownLoc(), "main", builder.getFunctionType({}, {}));
        func->setAttr("tfl.func", builder.getUnitAttr());
        builder.setInsertionPointToStart(func.addEntryBlock());
        llvm::SmallVector<int> shape{1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Apr 17 11:15:16 UTC 2024
    - 9.7K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/quantization/tensorflow/passes/lift_hashtable_ops_as_args.cc

      llvm::StringMap<int> shared_name_to_arg_idx;
      llvm::SmallVector<std::pair<Operation*, int>> lifted_op_and_arg_idx;
      Block& block = target_func.front();
      auto func_type = target_func.getFunctionType();
    
      for (Operation& op : block.without_terminator()) {
        StringRef shared_name = GetSharedName(&op);
        if (shared_name.empty() || !IsHashTableOp(&op)) continue;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 17 17:58:54 UTC 2024
    - 8.2K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/quantization/stablehlo/passes/convert_func_to_bfloat16.cc

          // The FuncOp type can contain types that the op's operand and result
          // types do not contain.
          if (auto func = dyn_cast<func::FuncOp>(op)) {
            if (!converter_.isSignatureLegal(func.getFunctionType())) return false;
          } else if (auto bitcast_convert_op =
                         dyn_cast<mlir::stablehlo::BitcastConvertOp>(op)) {
            return IsConvertOpLegal<mlir::stablehlo::BitcastConvertOp,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 9.3K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/lite/experimental/common/outline_operations.cc

          TypesFromValues(subgraph.FuncArguments());
      llvm::SmallVector<Type> return_types =
          TypesFromValues(subgraph.FuncOutputs());
    
      FunctionType function_type =
          builder.getFunctionType(input_types, return_types);
    
      std::string function_name = absl::StrCat("func_", subgraph.subgraph_id_);
    
      func::FuncOp new_func = func::FuncOp::create(builder.getUnknownLoc(),
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 8.5K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/quantization/tensorflow/passes/insert_save_op.cc

      auto filename_input_type = RankedTensorType::get(
          /*shape=*/{}, /*elementType=*/builder.getType<TF::StringType>());
    
      FunctionType func_type = builder.getFunctionType(
          /*inputs=*/{filename_input_type}, /*results=*/{});
      auto save_func = builder.create<func::FuncOp>(
          NameLoc::get(builder.getStringAttr(kTfQuantSaveFuncName)),
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Mar 22 05:52:39 UTC 2024
    - 9.5K bytes
    - Viewed (0)
Back to top