Search Options

Results per page
Sort
Preferred Languages
Advance

Results 61 - 70 of 73 for BlockArgument (0.21 sec)

  1. tensorflow/compiler/mlir/quantization/tensorflow/passes/merge_initializer_function_ops_to_main.cc

        // During cloning, let it know that the source function's argument
        // corresponds to the main function's newly created argument when cloning
        // ops from src -> main.
        BlockArgument main_arg = main_func_op.getArgument(main_arg_idx);
        mapper.map(src_arg, main_arg);
      }
    
      return mapper;
    }
    
    // Copies ops from `src_func_op` to `main_body` except for the FetchOps. Returns
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Sun May 12 12:54:52 UTC 2024
    - 15.3K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/lite/transforms/lower_static_tensor_list.cc

        func::FuncOp func, const llvm::SmallSet<int, 4> &tensor_list_args) {
      // `indexes` stores the argument index of tensorlists which size may get
      // updated in the function.
      llvm::SmallSet<int, 4> indexes;
      for (BlockArgument &arg : func.getArguments()) {
        if (tensor_list_args.contains(arg.getArgNumber())) {
          for (const mlir::OpOperand &use : arg.getUses()) {
            mlir::Operation *op = use.getOwner();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Jun 11 20:00:43 UTC 2024
    - 70.7K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tensorflow/transforms/tensor_list_ops_decomposition.cc

        }
      } else {
        info.signature_change = true;
        for (auto& entry : callee_map) {
          auto buffer_arg = mlir::dyn_cast<BlockArgument>(entry.getFirst());
          if (!buffer_arg) continue;
          info.buffer_arg_to_size_arg[buffer_arg.getArgNumber()] =
              mlir::cast<BlockArgument>(entry.getSecond().size).getArgNumber();
        }
        if (lowered_callee != callee) {
          // Add the clone with a new name.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 39.2K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/quantization/tensorflow/passes/insert_main_function.cc

      int result_idx = 0;
      llvm::SmallVector<Value> call_op_returns;
      for (auto func_op : module_op.getOps<func::FuncOp>()) {
        if (!ShouldIncludeInMainFunction(func_op)) continue;
    
        llvm::ArrayRef<BlockArgument> new_args = llvm::ArrayRef(
            main_func.getArguments().begin() + arg_idx, func_op.getNumArguments());
        arg_idx += func_op.getNumArguments();
        llvm::ArrayRef<Type> new_types = llvm::ArrayRef(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 16.5K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/quantization/stablehlo/passes/quantization_patterns.cc

        LLVM_DEBUG(llvm::dbgs() << GemmStyleOp::getOperationName()
                                << " op must have ranked tensor type.\n");
        return failure();
      }
    
      MutableArrayRef<BlockArgument> operands =
          entry_func_op.getBody().getArguments();
      // Function must have input, filter, and optionally bias.
      if (operands.size() != 2 && operands.size() != 3) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 03 06:04:36 UTC 2024
    - 41.7K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tensorflow/transforms/sparsecore/embedding_program_key.cc

            operand_not_in_launch);
      }
    
      // Handle pass through block arguments.
      for (OpOperand& operand :
           original_launch_op.GetBody().getTerminator()->getOpOperands()) {
        if (mlir::isa<BlockArgument>(operand.get())) {
          original_launch_op.getResult(operand.getOperandNumber())
              .replaceAllUsesWith(operand.get());
        }
      }
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 17.4K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tensorflow/utils/tf_xla_mlir_translate.cc

      mlir::Block& block = main.getRegion().front();
      xla::XlaBuilder builder("main");
    
      // Create xla_params.
      std::vector<xla::XlaOp> xla_params;
      for (mlir::BlockArgument& arg : block.getArguments()) {
        auto num = arg.getArgNumber();
        xla::Shape shape = xla::TypeToShape(arg.getType());
        xla::XlaOp argop =
            xla::Parameter(&builder, num, shape, absl::StrCat("Arg_", num));
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 18.8K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tf2xla/api/v1/compile_mlir_util.cc

      auto builder = mlir::OpBuilder(main_fn.getBody());
      std::vector<int> args_to_erase;
      for (int idx = 0; idx < args.size(); idx++) {
        const XlaArgument& xla_arg = args[idx];
        mlir::BlockArgument mlir_arg = main_fn.getArgument(idx);
        if (xla_arg.kind == XlaArgument::kResource) {
          mlir::Type element_type;
          if (xla_arg.type == DT_INVALID) {
            return errors::Unimplemented(absl::StrCat(
    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/quantization/stablehlo/passes/replace_stablehlo_ops_in_main_function_with_xla_call_module_ops.cc

        // Additionally remove arguments from the outputs, as it provides liveness
        // throughout (functions as an invisible op above the very first op that
        // returns the arguments).
        for (const BlockArgument arg : main_func.getArguments()) {
          outputs.remove(arg);
        }
      }
    
      ReplaceStablehloOpsWithXlaCallModuleOp(
          SmallVector<Value>(inputs.begin(), inputs.end()),
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 21K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tensorflow/transforms/host_runtime/tpu_merge_variables_with_execute.cc

            // Check device matching for the node defining the resource.
            if (!IsResourceMergeable(resource_attr, device_attr)) continue;
          } else {
            auto resource_arg = resource.dyn_cast<BlockArgument>();
            assert(resource_arg);
            if (resource_arg.getOwner() != &func.front()) continue;
            // Check device matching for the argument defining the resource.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Feb 29 17:52:11 UTC 2024
    - 27K bytes
    - Viewed (0)
Back to top