Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 29 for getFunctionType (0.27 sec)

  1. tensorflow/compiler/mlir/lite/utils/tftext_utils.cc

      // * Zero or more row_split tensors.
      constexpr int kValues = 0;
      constexpr int kRowSplits = 1;
    
      if (func.getFunctionType().getInputs().size() !=
          func.getFunctionType().getResults().size()) {
        return func.emitError() << "Mismatched number of inputs and outputs.";
      }
    
      int row_splits = func.getFunctionType().getInputs().size() - kRowSplits;
      if (row_splits == 0) {
        auto input_values = GetInputType(func, kValues);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 14.4K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/lite/utils/lstm_utils_test.cc

                                       .getValue())
              .getValues<FloatAttr>()[0]
              .getValue()
              .isExactlyValue(0.0f));
    
      EXPECT_EQ(fused_lstm_func_.getFunctionType().getNumResults(), 1);
      auto output_types = fused_lstm_func_.getFunctionType().getResults();
      SmallVector<int64_t, 2> output_shape{1, mlir::ShapedType::kDynamic};
      EXPECT_EQ(mlir::cast<RankedTensorType>(output_types[0]).getShape().size(),
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 10K bytes
    - Viewed (0)
  3. 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)
  4. 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)
  5. 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)
  6. 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)
  7. 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)
  8. 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)
  9. 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)
  10. tensorflow/compiler/mlir/tensorflow/transforms/tensor_list_ops_decomposition.cc

        llvm::function_ref<std::optional<Type>(int64_t)> arg_to_buffer_type,
        llvm::function_ref<bool(int64_t)> arg_buffer_size_is_fixed) {
      auto new_input_types = llvm::to_vector<8>(func.getFunctionType().getInputs());
      int64_t original_arg_count = new_input_types.size();
      Location loc = func.getLoc();
      for (int64_t i = 0; i < original_arg_count; ++i) {
        auto buffer_type = arg_to_buffer_type(i);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 39.2K bytes
    - Viewed (0)
Back to top