Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 50 for getNumArguments (0.19 sec)

  1. tensorflow/compiler/mlir/tensorflow/transforms/lift_variables.cc

      StringAttr resource_name_id = builder.getStringAttr(kResourceNameArgAttr);
    
      SmallSet<StringRef, 4> resource_names;
    
      for (func::FuncOp func : module.getOps<func::FuncOp>()) {
        for (int i = 0, e = func.getNumArguments(); i < e; ++i) {
          auto resource_arg =
              func.getArgAttrOfType<StringAttr>(i, kResourceNameArgAttr);
          if (!resource_arg) continue;
    
          StringRef resource_name = resource_arg.getValue();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 23 09:05:47 UTC 2024
    - 7.9K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tensorflow/transforms/region_control_flow_to_functional.cc

      if (!yield) return std::nullopt;
      func::CallOp call = llvm::dyn_cast_or_null<func::CallOp>(*block.begin());
      if (!call) return std::nullopt;
      if (block.getNumArguments() != call.getNumOperands() ||
          call.getNumResults() != yield.getNumOperands())
        return std::nullopt;
      for (auto [arg, operand] :
           llvm::zip(block.getArguments(), call.getOperands())) {
    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

      IRMapping values_in_scope;
      // Function arguments can appear as operands, so they clone should
      // be aware of them.
      assert(subgraph.FuncArguments().size() == new_func.getNumArguments());
      for (int i = 0; i < subgraph.FuncArguments().size(); ++i) {
        Value original_value = subgraph.FuncArguments()[i];
        Value new_func_arg = new_func.getArgument(i);
    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/lite/transforms/modify_io_nodes.cc

        OpBuilder builder) {
      if (mlir::isa<FloatType>(input_type)) {
        return success();
      }
    
      Block& block = func.front();
      builder.setInsertionPointToStart(&block);
    
      for (int i = 0; i != block.getNumArguments(); ++i) {
        Value arg = block.getArgument(0);
        Type arg_type = arg.getType();
        Value new_arg = arg;
        Location loc = func.getLoc();
        if (arg.hasOneUse() && llvm::isa<QuantizeOp>(*arg.user_begin())) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 8.9K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tensorflow/ir/tf_device.cc

      const int32_t num_replicated_block_args = num_replicated_inputs / n;
      if (num_replicated_block_args + num_packed_inputs != block.getNumArguments())
        return op.emitOpError()
               << "expects number of block arguments (" << block.getNumArguments()
               << ") to be equal to number of replicated inputs ("
               << num_replicated_inputs << ") / 'n' (" << n
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 33.4K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/quantization/common/attrs_and_constraints_test.cc

          ParseModuleOpString(kArgumentWithUnknownDims);
      ASSERT_TRUE(module_op);
    
      auto func_op = module_op->lookupSymbol<func::FuncOp>("unknown_dims_arg");
      ASSERT_THAT(func_op, NotNull());
      ASSERT_THAT(func_op.getNumArguments(), Eq(1));
    
      EXPECT_TRUE(HasRankOf(func_op.getArgument(0), /*rank=*/2));
    }
    
    TEST_F(AttrsAndConstraintsTest, HasRankOfReturnsFalseForUnknownRank) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 14 17:10:32 UTC 2024
    - 22.9K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tensorflow/transforms/decompose_optionals.cc

        if (!symbol) return failure();
        auto f = llvm::dyn_cast<mlir::func::FuncOp>(symbol);
    
        if (call.getOperation()->getNumOperands() !=
            f.getBody().front().getNumArguments()) {
          return failure();  // RemoteCall et al
        }
    
        rewriter.startOpModification(f);
        bool changed = false;
        for (auto [call_arg, body_arg] :
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Jun 12 21:18:05 UTC 2024
    - 9.8K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/lite/transforms/while_loop_outline.cc

      // all those post are loop independent. Initialize extern_values with while_op
      // not loop carried operands.
      auto num_loop_carried = while_op.getCond().getNumArguments();
      auto not_carried_operands =
          while_op.getOperands().drop_front(num_loop_carried);
      extern_values.insert(not_carried_operands.begin(),
                           not_carried_operands.end());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 11.8K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tensorflow/transforms/functional_control_flow_to_regions.cc

        entry->addArguments(inputs, SmallVector<Location>(inputs.size(), loc));
        args = entry->getArguments();
      }
      llvm::SmallVector<Value, 4> casted_args;
      casted_args.reserve(func.getNumArguments());
      for (const auto& ArgAndType : zip(args, func.getFunctionType().getInputs())) {
        Value arg = std::get<0>(ArgAndType);
        Type expected_type = std::get<1>(ArgAndType);
        if (arg.getType() != expected_type) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 11K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/quantization/stablehlo/passes/defer_activation_transpose.cc

        return success(IsMaxFunction(op.getBody().front()));
      }
    
      // Whether `block` semantically corresponds to a `stablehlo.maximum` op.
      bool IsMaxFunction(Block& block) const {
        if (block.getNumArguments() != 2) return false;
    
        auto return_op = cast<mlir::stablehlo::ReturnOp>(block.getTerminator());
        if (return_op.getNumOperands() != 1) return false;
    
        auto max_op = dyn_cast_or_null<MaxOp>(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 11.5K bytes
    - Viewed (0)
Back to top