Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 31 for getNumArguments (0.64 sec)

  1. tensorflow/compiler/mlir/tf2xla/internal/passes/tpu_sharding_identification_pass.cc

        OptionalOpShardingVector& sharding_for_args) {
      // Look up function definition from module.
      Block& function_block = func.front();
    
      sharding_for_args.reserve(function_block.getNumArguments());
    
      // Iterate through operands of `cluster_func`.
      // The computation operand can either be:
      //   1) a TPUPartitionedInput Op if the input has a non-resource type;
      //   2) a ReadVariableOp else.
      //
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Apr 30 02:01:13 UTC 2024
    - 28.9K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/quantization/tensorflow/passes/merge_initializer_function_ops_to_main.cc

        // No need to create a mapping when there is no usage - it will not affect
        // the cloning.
        if (src_arg.use_empty()) continue;
    
        const unsigned main_arg_idx = main_func_op.getNumArguments();
    
        const DictionaryAttr main_arg_attr =
            src_func_op.getArgAttrDict(src_arg_idx);
    
        main_func_op.insertArgument(main_arg_idx, src_arg.getType(), main_arg_attr,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Sun May 12 12:54:52 UTC 2024
    - 15.3K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tf2xla/api/v1/compile_tf_graph.cc

      constexpr char kAliasingAttr[] = "tf.aliasing_output";
      llvm::SmallDenseMap<unsigned, unsigned> output_to_input_alias;
      unsigned num_arguments = main_fn.getNumArguments();
      for (unsigned arg_index = 0; arg_index < num_arguments; ++arg_index) {
        if (auto aliasing_output = main_fn.getArgAttrOfType<mlir::IntegerAttr>(
                arg_index, kAliasingAttr))
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Jun 12 22:19:26 UTC 2024
    - 14K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tensorflow/translate/export_graphdef.cc

          unique_output_names.push_back(
              exporter.op_to_name_.GetUniqueName(tensor_id_node));
        }
      }
    
      if (!input_names.empty()) {
        TF_RET_CHECK(input_names.size() == block.getNumArguments());
        for (const auto& it : llvm::enumerate(function.getArguments())) {
          // TODO(lyandy): Update when changing feed/fetch import.
          std::string name(input_names[it.index()]);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 01 11:17:36 UTC 2024
    - 35.2K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tf2xla/api/v2/tf_executor_to_graph.cc

          unique_output_names.push_back(
              exporter.op_to_name_.GetUniqueName(tensor_id_node));
        }
      }
    
      if (!input_names.empty()) {
        TF_RET_CHECK(input_names.size() == block.getNumArguments());
        for (const auto& it : llvm::enumerate(function.getArguments())) {
          // TODO(lyandy): Update when changing feed/fetch import.
          std::string name(input_names[it.index()]);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Jun 06 23:04:51 UTC 2024
    - 35.2K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/lite/transforms/post_quantize.cc

    void RemoveQuantizationAdaptorOps(func::FuncOp func) {
      mlir::OpBuilder builder(func.getBody());
      auto& bb = func.front();
      auto loc = func.getLoc();
    
      int num_args = bb.getNumArguments();
      llvm::SmallVector<Type, 4> input_types;
      input_types.reserve(num_args);
      // Edit the block arguments and create the new input ops in place to replace
      // the old input ops and quantize ops.
    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/tf2xla/api/v1/compile_mlir_util.cc

      std::vector<xla::Shape> shapes;
      shapes.reserve(func_type.getNumResults());
    
      llvm::SmallDenseMap<unsigned, unsigned> output_to_input_alias;
      for (unsigned i = 0; i < main_func.getNumArguments(); ++i)
        if (auto aliasing_output = main_func.getArgAttrOfType<mlir::IntegerAttr>(
                i, "tf.aliasing_output"))
          output_to_input_alias[aliasing_output.getInt()] = i;
    
    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/resource_op_lifting_cleanup.cc

          func.front().getTerminator()->eraseOperand(result_idx);
      }
    
      // Check which function arguments are unused in all branches. We can drop
      // those as well.
      int num_args = cloned_branches[0].getNumArguments();
      llvm::BitVector used_args(num_args);
      for (func::FuncOp func : branches) {
        for (BlockArgument arg : func.getArguments()) {
          if (!arg.use_empty()) used_args.set(arg.getArgNumber());
        }
      }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 19.7K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tensorflow/transforms/convert_control_to_data_outputs.cc

        SmallPtrSet<Operation*, 4> ops_connected_to_fetch, int num_old_outputs) {
      assert(num_old_outputs + resource_equivalence_classes.getNumClasses() ==
             func.getNumArguments());
      auto graph_op = cast<GraphOp>(func.front().front());
    
      auto fetch = graph_op.GetFetch();
      OpBuilder builder_chain_src(fetch);
      builder_chain_src.setInsertionPointToStart(fetch->getBlock());
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 28.7K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/quantization/stablehlo/passes/bridge/convert_tf_quant_to_mhlo_int_test.cc

            *module_op->getBodyRegion().getOps().begin());
        if (!func_op) {
          return absl::InternalError("Input MLIR must have only 1 func");
        }
        if (arguments.size() != func_op.getNumArguments()) {
          return absl::InternalError("Input argument has wrong size");
        }
    
        // Convert input xla::Literal arguments to constants, this allows using
        // constant folding to evaluate function return value.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Apr 03 01:03:21 UTC 2024
    - 35.8K bytes
    - Viewed (0)
Back to top