Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 33 for getNumArguments (0.23 sec)

  1. tensorflow/compiler/mlir/lite/transforms/prepare_quantize.cc

      // current function.
      bool IsLegalQuantSpecs(func::FuncOp func) {
        if (func.getName() == quant_specs_.target_func) {
          return (quant_specs_.disable_set_input_nodes_quantization_params ||
                  func.getNumArguments() == quant_specs_.input_ranges.size());
        }
        return true;
      }
    
      // Get the min and max values from the quantization specification for the
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 17.6K 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/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)
  4. 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)
  5. 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)
  6. 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)
  7. 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)
  8. 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)
  9. tensorflow/compiler/mlir/quantization/tensorflow/passes/merge_save_function_ops_to_main.cc

    // "__tf_file_prefix". If such an argument doesn't exist, returns a null value.
    BlockArgument GetFilePrefixArg(func::FuncOp main_func_op) {
      for (int i = 0; i < main_func_op.getNumArguments(); i++) {
        auto index_path_attr =
            main_func_op.getArgAttrOfType<ArrayAttr>(i, kTfSavedModelIndexPathAttr);
        if (index_path_attr && !index_path_attr.empty() &&
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 10.7K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tensorflow/transforms/prepare_tpu_computation_for_tf_export.cc

            /*tpu_core=*/rewriter.getI64IntegerAttr(0));
      }
    };
    
    void UpdateArgAttributes(mlir::func::FuncOp func) {
      OpBuilder builder(func.getBody());
      for (int i = 0; i < func.getNumArguments(); ++i) {
        constexpr char kShardingAttr[] = "mhlo.sharding";
        if (auto sharding =
                func.getArgAttrOfType<mlir::StringAttr>(i, kShardingAttr)) {
          if (!sharding.getValue().empty()) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 11.8K bytes
    - Viewed (0)
Back to top