Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 25 for m_Constant (0.12 sec)

  1. tensorflow/compiler/mlir/lite/utils/utils.h

      SmallVector<int32_t> initial_permutation;
      DenseElementsAttr perm1_const;
    
      SmallVector<int32_t> new_permutation;
      if (matchPattern(permutation1, m_Constant(&perm1_const))) {
        for (int32_t idx = 0; idx < perm1_const.getNumElements(); ++idx) {
          initial_permutation.push_back(idx);
        }
        for (auto perm : perm2_const.getValues<APInt>()) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Apr 30 00:40:15 UTC 2024
    - 11.6K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/lite/transforms/dilated_conv.h

      // a dilated conv.
      auto stb_paddings = stb_op.getPaddings();
      auto bts_crops = bts_op.getCrops();
      ElementsAttr stb_paddings_attr, bts_crops_attr;
      if (!matchPattern(stb_paddings, m_Constant(&stb_paddings_attr)) ||
          !matchPattern(bts_crops, m_Constant(&bts_crops_attr))) {
        return rewriter.notifyMatchFailure(
            op,
            "either SpaceToBatchND or BatchToSpaceND "
            "doesn't have constant padding/crops value");
      }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 20K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/lite/transforms/legalize_tf.cc

      ElementsAttr k;
      if (!matchPattern(tf_matrix_diag_v2_or_v3_op.getK(), m_Constant(&k)))
        return false;
      if (ExtractSingleElementAsInteger(k).getInt() != 0) return false;
    
      // Extract num_rows constant tensor and check value = -1.
      ElementsAttr num_rows;
      if (!matchPattern(tf_matrix_diag_v2_or_v3_op.getNumRows(),
                        m_Constant(&num_rows)))
        return false;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon May 20 20:06:54 UTC 2024
    - 45.2K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tf2xla/transforms/legalize_tf_collective.cc

                                       DenseIntElementsAttr& replica_groups,
                                       Operation* op) {
      DenseIntElementsAttr group_assignment;
      if (!matchPattern(group_assignment_value, m_Constant(&group_assignment))) {
        return op->emitOpError() << "expects constant group_assignment";
      }
      replica_groups = mlir::cast<DenseIntElementsAttr>(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 16K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/quantization/tensorflow/ops/tf_quantize_op.cc

      const bool kIsNarrowRange = true;
      const bool kIsSigned = true;
      const int kBitWidth = 8;
    
      DenseFPElementsAttr attr;
      if (!matchPattern(op->getResult(0), m_Constant(&attr))) return nullptr;
    
      QuantizedType quant_type = mlir::dyn_cast<quant::QuantizedType>(
          quant::GetUniformQuantizedTypeForWeight(
              attr, /*symmetric=*/kIsNarrowRange && kIsSigned, kBitWidth, kIsSigned,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 11K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/quantization/common/attrs_and_constraints.h

        DenseIntElementsAttr value_attr;
        if (!matchPattern(value, m_Constant(&value_attr)) ||
            !value_attr.isSplat()) {
          return false;
        }
        splat_value = value_attr.getSplatValue<T>();
        return true;
      }
    
      DenseFPElementsAttr value_attr;
      if (!matchPattern(value, m_Constant(&value_attr)) || !value_attr.isSplat()) {
        return false;
      }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 9.9K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/lite/experimental/tac/transforms/device_transform_patterns.cc

      mlir::DenseIntElementsAttr splits_attr;
      if (!splits || !matchPattern(splits, m_Constant(&splits_attr)))
        return failure();
    
      auto split_dim = splitv_op.getSplitDim().getDefiningOp();
      mlir::ElementsAttr split_dim_attr;
      if (!split_dim || !matchPattern(split_dim, m_Constant(&split_dim_attr)))
        return failure();
    
      auto input = splitv_op.getValue();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 25.4K 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