Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 69 for getFunctionType (0.56 sec)

  1. tensorflow/compiler/mlir/tfr/ir/tfr_ops.cc

      // at the end?
      int first_tensor = -1, last_tensor = -1, first_tensor_list = -1,
          last_tensor_list = -1, first_attr = -1;
      for (auto arg : llvm::enumerate(func.getFunctionType().getInputs())) {
        Type arg_type = arg.value();
    
        if (auto tensor = arg_type.dyn_cast<TFRTensorType>()) {
          if (first_tensor == -1) {
            first_tensor = arg.index();
          }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Nov 21 16:55:41 UTC 2023
    - 38.2K bytes
    - Viewed (0)
  2. 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)
  3. tensorflow/compiler/mlir/tensorflow/transforms/convert_control_to_data_outputs.cc

        func.getRegion().addArgument(chaining_data_type, func.getLoc());
      }
    
      FunctionType ftype =
          FunctionType::get(func.getContext(), func.getBody().getArgumentTypes(),
                            func.getFunctionType().getResults());
      func.setType(ftype);
    }
    
    // Appends function results with `num_resources` number of results of requested
    // type.
    void AppendFunctionResults(func::FuncOp func, int num_resources,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 28.7K bytes
    - Viewed (0)
  4. 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)
  5. 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)
  6. tensorflow/compiler/mlir/quantization/tensorflow/passes/merge_save_function_ops_to_main.cc

      SmallVector<Type> input_types(main_func_op.getArgumentTypes());
      input_types.emplace_back(file_prefix_arg_type);
    
      main_func_op.setType(
          builder.getFunctionType(input_types, main_func_op.getResultTypes()));
    
      // Add "__tf_file_prefix" to the "tf_saved_model.index_path" attribute for the
      // newly created argument.
      main_func_op.setArgAttr(new_file_prefix_arg.getArgNumber(),
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 10.7K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tensorflow/transforms/tensor_array_ops_decomposition.cc

            (*stats)[grad_var].accumulate_on_write = true;
          }
        }
      }
      OpBuilder builder(while_op);
      auto new_while = builder.create<TF::WhileOp>(
          while_op.getLoc(), body.getFunctionType().getInputs(), operands,
          while_op->getAttrs());
      for (int64_t i = 0; i < while_op.getNumOperands(); ++i) {
        if (ta_arg_buffer_type(i)) {
          while_op.getResult(i).replaceAllUsesWith(while_op.getOperand(i));
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Mar 02 20:41:19 UTC 2023
    - 40.2K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/lite/transforms/lower_static_tensor_list.cc

                                ConversionPatternRewriter *rewriter) const {
        auto guard = OpBuilder::InsertionGuard(*rewriter);
        auto inputs = branch_func.getFunctionType().getInputs();
        Block *block = rewriter->createBlock(
            &branch_func.getBody(), branch_func.begin(), inputs,
            SmallVector<Location>(inputs.size(), branch_func.getLoc()));
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Jun 11 20:00:43 UTC 2024
    - 70.7K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tf2xla/api/v1/compile_mlir_util.cc

      mlir::func::FuncOp main_func =
          module.lookupSymbol<mlir::func::FuncOp>("main");
      TF_RET_CHECK(main_func != nullptr) << "No main function found";
      mlir::FunctionType func_type = main_func.getFunctionType();
    
      int num_args = func_type.getNumInputs();
      xla_input_shapes->reserve(num_args);
    
      std::vector<xla::Shape> individual_arg_shapes;
      individual_arg_shapes.reserve(num_args);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 21 17:24:39 UTC 2024
    - 45.3K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tensorflow/transforms/decompose_reduce_dataset.cc

        // 3. Captures inputs.
        // The number of dataset inputs can be indirectly determined to be
        // total_number_of_inputs - state_inputs - captured_inputs.
        auto func_inputs = reduce_func.getFunctionType().getInputs();
        const int func_input_size = func_inputs.size();
        const int argument_size =
            reduce_dataset->getAttrOfType<ArrayAttr>("Targuments").size();
        const int state_size =
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 14K bytes
    - Viewed (0)
Back to top