Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 53 for m_Constant (0.16 sec)

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

      // Get the tensors.
      DenseElementsAttr input_tensor, weights_tensor, bias_tensor;
      if (!matchPattern(getInput(), m_Constant(&input_tensor)) ||
          !matchPattern(getFilter(), m_Constant(&weights_tensor)) ||
          (has_bias && !matchPattern(getBias(), m_Constant(&bias_tensor)))) {
        return failure();
      }
    
      // Get the tensor types.
    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/transforms/shape_inference.cc

          matchPattern(op.getWindowDimensions(), m_Constant(&window_dimensions)) &&
          matchPattern(op.getWindowStrides(), m_Constant(&window_strides)) &&
          matchPattern(op.getBaseDilations(), m_Constant(&base_dilations)) &&
          matchPattern(op.getWindowDilations(), m_Constant(&window_dilations)) &&
          matchPattern(op.getPadding(), m_Constant(&padding))) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Sat Jun 08 07:28:49 UTC 2024
    - 134.1K bytes
    - Viewed (0)
  3. 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)
  4. tensorflow/compiler/mlir/tensorflow/ir/tf_ops_a_m.cc

                                SmallVectorImpl<int64_t>& s0_shape,
                                SmallVectorImpl<int64_t>& s1_shape) {
      if (!matchPattern(op.getS0(), m_Constant(&s0))) return false;
      if (!matchPattern(op.getS1(), m_Constant(&s1))) return false;
    
      for (auto s : s0.getValues<APInt>()) s0_shape.push_back(s.getSExtValue());
      for (auto s : s1.getValues<APInt>()) s1_shape.push_back(s.getSExtValue());
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 146.7K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/lite/transforms/prepare_tf.cc

        if (!begin_attr_type ||
            !matchPattern(begin_attr, m_Constant(&begin_elem_attr))) {
          return failure();
        }
        if (!end_attr_type || !matchPattern(end_attr, m_Constant(&end_elem_attr))) {
          return failure();
        }
        if (!strides_attr_type ||
            !matchPattern(strides_attr, m_Constant(&strides_elem_attr))) {
          return failure();
        }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 28 21:49:50 UTC 2024
    - 64.6K bytes
    - Viewed (0)
  6. 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)
  7. tensorflow/compiler/mlir/tensorflow/transforms/lower_tf.cc

        ElementsAttr paddings;
        llvm::SmallVector<int64_t, 4> block_shape_ints;
        auto padded_shape = llvm::to_vector<4>(input_shape);
        if (matchPattern(op.getBlockShape(), m_Constant(&block_shape)) &&
            matchPattern(op.getPaddings(), m_Constant(&paddings))) {
          for (uint64_t i = 0; i < block_rank; i++) {
            int64_t paddings_sum =
                paddings.getValues<APInt>()[{i, 0}].getSExtValue() +
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 74.9K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/lite/stablehlo/transforms/hlo_matchers.cc

    // data so that the iota dimension does not need to be the (inner) z-dimension.
    bool MatchIotaConst(DenseIntElementsAttr dimensions, Value iota) {
      DenseIntElementsAttr iota_const_attr;
      if (!matchPattern(iota, m_Constant(&iota_const_attr))) return false;
    
      auto iota_type = iota_const_attr.getType();
      auto iota_shape = iota_type.getShape();
      auto reduce_dim = (*dimensions.value_begin<APInt>()).getSExtValue();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 11.6K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/lite/transforms/prepare_quantize_dynamic_range.cc

                op->getOperand(qi).getDefiningOp());
            if (!const_op) {
              continue;
            }
    
            DenseFPElementsAttr attr;
            if (!matchPattern(const_op->getResult(0), m_Constant(&attr))) {
              continue;
            }
    
            if (mlir::dyn_cast<DenseFPElementsAttr>(attr).size() >=
                quant_specs_.minimum_elements_for_weights) {
              continue;
            }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 20.8K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/quantization/stablehlo/passes/bridge/convert_tf_quant_ops_to_mhlo.cc

      DenseFPElementsAttr scales;
      if (!matchPattern(scales_value, m_Constant(&scales))) {
        return rewriter.notifyMatchFailure(op, "scales must be constant");
      }
    
      // Check whether the zero_points operand has constant op.
      DenseIntElementsAttr zero_points;
      if (!matchPattern(zero_points_value, m_Constant(&zero_points))) {
        return rewriter.notifyMatchFailure(op, "zero_points must be constant");
      }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 17 17:58:54 UTC 2024
    - 30.9K bytes
    - Viewed (0)
Back to top