Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for getOperands (0.55 sec)

  1. tensorflow/compiler/mlir/lite/ir/tfl_ops.cc

    }
    
    }  // end anonymous namespace
    
    OpFoldResult ReshapeOp::fold(FoldAdaptor adaptor) {
      auto operands = adaptor.getOperands();
      // Remove identity reshape with both static result and input shape.
      auto result_type = getType().cast<ShapedType>();
      auto input_type = getOperand(0).getType().cast<ShapedType>();
      if (InputOutputHasSameShape(input_type, result_type)) return getInput();
    
      // Constant folding
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 02 09:41:17 UTC 2024
    - 169.2K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tensorflow/ir/tf_ops_a_m.cc

    OpFoldResult LeakyReluOp::fold(FoldAdaptor adaptor) {
      auto operands = adaptor.getOperands();
      assert(operands.size() == 1 && "leaky relu has one operand");
    
      // leaky_relu(x, alpha: 1) -> x
      if (getAlpha().convertToFloat() == 1.0f &&
          getOperand().getType() == getType())
        return getOperand();
    
      auto calculate = [&](FloatAttr arg) {
        APFloat val = arg.getValue();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 146.7K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tensorflow/ir/tf_ops_n_z.cc

          auto body_yield_operand =
              LookThroughIdentity(body_yield.getOperand(op_idx));
          auto cond_yield_operand =
              cond_forwards_args
                  ? LookThroughIdentity(cond_yield.getOperand(op_idx + 1))
                  : nullptr;
          auto while_operand = while_op.getOperand(op_idx);
          if ((body_arg == body_yield_operand ||
               while_operand == body_yield_operand) &&
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 09 22:07:10 UTC 2024
    - 170.8K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tensorflow/transforms/shape_inference.cc

        return RefineTypeForPassThroughOperands(
            op, iter_sink.getOperands().drop_front().take_front(),
            iter_source.getResults());
      }
      if (auto launch_op = dyn_cast<tf_device::LaunchOp>(op)) {
        auto terminator = launch_op.GetBody().getTerminator();
        return RefineTypeForPassThroughOperands(op, terminator->getOperands(),
                                                op->getResults());
      }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Sat Jun 08 07:28:49 UTC 2024
    - 134.1K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/lite/stablehlo/transforms/legalize_hlo.cc

      if (compare_op.getComparisonDirection() != mhlo::ComparisonDirection::GT) {
        return false;
      }
      if (compare_op.getOperands()[0] != comparator_blk.getArgument(0) ||
          compare_op.getOperands()[1] != comparator_blk.getArgument(1)) {
        return false;
      }
      return return_op.getOperands().front() == compare_op.getResult();
    }
    
    // In general, we convert the following form of sort to tf.TopK:
    //
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 154.9K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/lite/stablehlo/transforms/uniform_quantized_stablehlo_to_tfl_pass.cc

      }
    
      void rewrite(stablehlo::SelectOp op,
                   PatternRewriter& rewriter) const override {
        Value pred = op.getOperand(0);
        Value on_true = op.getOperand(1);
        Value on_false = op.getOperand(2);
        rewriter.replaceOpWithNewOp<TFL::SelectV2Op>(op, pred, on_true, on_false);
      }
    };
    
    // Rewrites quantized stablehlo.concatenate to tfl.concatenation.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Apr 22 09:00:19 UTC 2024
    - 99.8K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/lite/flatbuffer_export.cc

                 tfl::SparseQConstOp, mlir::TFL::NoValueOp,
                 mlir::stablehlo::ConstantOp, mlir::vhlo::ConstantOpV1>(op);
    }
    
    static bool IsTFResourceOp(Operation* op) {
      for (const auto& operand : op->getOperands()) {
        auto elementType = getElementTypeOrSelf(operand.getType());
        if (mlir::isa<mlir::TF::ResourceType>(elementType)) {
          return true;
        }
      }
      for (const auto& result : op->getResults()) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Jun 12 21:41:49 UTC 2024
    - 164.5K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/lite/ir/tfl_ops.td

          Or<[TFL_OperandIsUnrankedPred<0>,
              CPred<"$_op.getOperand(0).getType().cast<ShapedType>().getRank() <= 1">,
              CPred<"$_op.getOperand(0).getType().cast<ShapedType>().getRank() == 2 && !$_op.getOperand(0).getType().cast<ShapedType>().hasStaticShape()">,
              CPred<"$_op.getOperand(0).getType().cast<ShapedType>().getRank() == 2 && $_op.getOperand(0).getType().cast<ShapedType>().getShape()[1] <= 4">]>>]> {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Jun 06 19:09:08 UTC 2024
    - 186K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/lite/transforms/optimize.cc

        Value bias = affine_op->getOperand(2);
        if (!mlir::isa<NoneType>(bias.getType()) &&
            !matchPattern(bias, m_Constant(&value))) {
          return false;
        }
        // If the binary op is mul/div, also check that filter is constant.
        if (isa<TFL::MulOp, TFL::DivOp>(binary_op) &&
            !matchPattern(affine_op->getOperand(1), m_Constant(&value))) {
          return false;
        }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Apr 30 00:40:15 UTC 2024
    - 102.3K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tensorflow/translate/import_model.cc

      for (int input = 0, e = num_operands + 1; input != e; ++input) {
        if (input < dst_input) {
          state.operands.push_back(dst->getOperand(input));
        } else if (input == dst_input) {
          state.operands.push_back(source->getResult(0));
        } else {
          state.operands.push_back(dst->getOperand(input - 1));
        }
      }
      state.attributes.assign(dst->getAttrs().begin(), dst->getAttrs().end());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 01 11:17:36 UTC 2024
    - 183.2K bytes
    - Viewed (0)
Back to top