Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 57 for getFunctionType (0.81 sec)

  1. 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)
  2. 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)
  3. 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)
  4. 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)
  5. 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)
  6. 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)
  7. 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)
  8. 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)
  9. tensorflow/compiler/mlir/tensorflow/transforms/resource_op_lifting.cc

      // Now use the filtered original operands, which will be replaced by
      // AddLoadsStoresOutsideControlFlowOp().
      auto new_while = builder.create<TF::WhileOp>(
          while_op.getLoc(), body.getFunctionType().getResults(),
          FilterRange<Value, OperandRange>(while_op.getOperands(),
                                           resource_arg_uses),
          while_op->getAttrs());
      // Prepare for AddLoadsStoresOutsideControlFlowOp().
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 55.1K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/lite/utils/lstm_utils.cc

    void ConvertLSTMCellSimpleToFusedLSTM::UpdateFuncSignature() {
      // https://github.com/tensorflow/community/pull/113
      SmallVector<int64_t, 2> output_shape{1, tensorflow::kTFDynamicSize};
      auto input_types = fused_func_op_.getFunctionType().getInputs();
      auto output_type = tensorflow::GetTypeFromTFTensorShape(
          output_shape,
          mlir::cast<RankedTensorType>(input_.getType()).getElementType());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 36.2K bytes
    - Viewed (0)
Back to top