Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 16 of 16 for m_Constant (0.16 sec)

  1. tensorflow/compiler/mlir/lite/quantization/ir/ConvertConst.cc

    LogicalResult QuantizedConstRewrite::matchAndRewrite(
        QuantizeCastOp qbarrier, PatternRewriter &rewriter) const {
      Attribute value;
    
      // Is the operand a constant?
      if (!matchPattern(qbarrier.getArg(), m_Constant(&value))) {
        return failure();
      }
    
      // Does the qbarrier convert to a quantized type. This will not be true
      // if a quantized type has not yet been chosen or if the cast to an equivalent
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 4.4K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/quantization/stablehlo/passes/post_quantize.cc

      LogicalResult matchAndRewrite(mlir::stablehlo::UniformQuantizeOp op,
                                    PatternRewriter& rewriter) const override {
        DenseFPElementsAttr attr;
        if (matchPattern(op.getOperand(), m_Constant(&attr))) {
          const Type qtype = op.getResult().getType();
          ElementsAttr quantized_attr = Quantize(attr, qtype);
          if (quantized_attr) {
            rewriter.replaceOpWithNewOp<mlir::stablehlo::ConstantOp>(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Mar 05 07:39:40 UTC 2024
    - 6.3K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/lite/utils/utils.td

      "TFL::AreLastTwoDimsTransposed($0)">>;
    
    // Checks if the param passed is of NoneType.
    def IsNoneType : Constraint<CPred<"$0.getType().isa<NoneType>()">>;
    
    def ConstantLikePred : CPred<"::mlir::matchPattern($0, ::mlir::m_Constant())">;
    def IsConstantLike : Constraint<ConstantLikePred>;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Apr 30 00:40:15 UTC 2024
    - 4.8K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/lite/experimental/common/outline_operations.cc

    namespace mlir {
    namespace TFL {
    namespace common {
    
    bool IsConstantOrNone(Operation* op) {
      return (op->getNumResults() == 1 &&
              mlir::isa<NoneType>(op->getResult(0).getType())) ||
             matchPattern(op, m_Constant()) || isa<QConstOp>(op);
    }
    
    // Pre-order traverse, adding results and BlockArgs to `been_defined` and
    // collecting operands not contained within `been_defined`. If we encounter an
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 8.5K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/lite/transforms/optimize_functional_ops.cc

          rewriter.eraseOp(op.getOperation());
          return success();
        }
    
        // Extract the constant cond value.
        DenseElementsAttr cond;
        if (!matchPattern(op.getCond(), m_Constant(&cond))) return failure();
    
        // TODO(hinsu): Handle constants that are not scalar booleans.
        auto cond_type = mlir::dyn_cast<RankedTensorType>(cond.getType());
        if (!cond_type || !cond_type.getShape().equals({}) ||
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 6.6K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tensorflow/utils/attribute_utils.h

        Operation *op = result.getOwner();
        if (!isa<IdentityOp>(op) && !isa<IdentityNOp>(op)) break;
        val = op->getOperand(result.getResultNumber());
      }
      return matchPattern(val, m_Constant(&attr));
    }
    
    // Checks if both compilation and replication attributes are present in the
    // operation, and if their values are valid.
    LogicalResult HasValidCompilationAndReplicationAttributes(Operation &op);
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 22 19:47:48 UTC 2024
    - 8.7K bytes
    - Viewed (0)
Back to top