Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 33 for getNumArguments (0.31 sec)

  1. tensorflow/compiler/mlir/tf2xla/transforms/legalize_tf_communication.cc

    Value UpdateControlFlowBlockArgWithToken(OpBuilder& builder, Block& block,
                                             ArrayRef<Type> types) {
      builder.setInsertionPointToStart(&block);
    
      auto old_args_size = block.getNumArguments();
    
      block.addArguments(
          types, SmallVector<Location>(types.size(), block.getParent()->getLoc()));
    
      ValueRange old_args = block.getArguments().take_front(old_args_size);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 40.5K bytes
    - Viewed (0)
  2. 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)
  3. 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)
  4. 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)
  5. 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)
  6. 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)
  7. 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)
  8. 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)
  9. tensorflow/compiler/mlir/tensorflow/transforms/tensor_array_ops_decomposition.cc

        llvm::function_ref<Type(int64_t)> ta_arg_buffer_type,
        llvm::function_ref<bool(int64_t)> ta_accumulate_on_write,
        llvm::SmallDenseMap<Value, TensorArrayStats>* stats) {
      int64_t original_args = func.getNumArguments();
      for (int64_t argnum = 0; argnum < original_args; ++argnum) {
        auto arg = func.getArgument(argnum);
        Type t = ta_arg_buffer_type(argnum);
        if (!t) continue;
        arg.setType(t);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Mar 02 20:41:19 UTC 2023
    - 40.2K bytes
    - Viewed (0)
  10. 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)
Back to top