Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 61 for constop (0.18 sec)

  1. tensorflow/compiler/mlir/quantization/tensorflow/ops/tf_quantize_op.cc

      ShapedType new_type = shaped_quantized_type.clone(storage_type);
    
      rewriter.setInsertionPointAfter(op);
      auto const_op =
          rewriter.create<TF::ConstOp>(op.getLoc(), new_type, tensor_proto_attr);
      auto new_identity_op = rewriter.create<TF::IdentityOp>(
          op->getLoc(), const_op.getType(), const_op);
      return new_identity_op.getResult();
    }
    
    Operation* LogicsForUniformDequanization(PatternRewriter& rewriter,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 11K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/quantization/tensorflow/passes/quantize_weights.cc

    class QuantizeConstWeights : public OpRewritePattern<TF::ConstOp> {
     public:
      explicit QuantizeConstWeights(
          MLIRContext* context,
          const tensorflow::quantization::QuantizationOptions& quantization_options)
          : OpRewritePattern<TF::ConstOp>(context),
            quant_options_(quantization_options) {}
    
      LogicalResult matchAndRewrite(TF::ConstOp op,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Mar 05 07:39:40 UTC 2024
    - 11.3K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tf2xla/internal/passes/xla_broadcast.cc

    Value CreateZeroInput(Location loc, OpBuilder& builder, Attribute zero_attr,
                          DenseIntElementsAttr shape_attr) {
      ConstOp zero = builder.create<ConstOp>(loc, zero_attr);
      zero->setAttr(kICIWeightDistributionMlirBridgeMarker,
                    builder.getBoolAttr(true));
      ConstOp shape = builder.create<ConstOp>(loc, shape_attr);
      shape->setAttr(kICIWeightDistributionMlirBridgeMarker,
                     builder.getBoolAttr(true));
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Jun 13 18:52:07 UTC 2024
    - 13.9K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tensorflow/transforms/layout_optimization.cc

    // Helper method that returns an op from 'transpose_ops' that match criteria
    // for an 'operand' and 'permutation'
    TransposeOp ReuseExistingTranspose(const OpOperand* operand,
                                       const SmallVector<int64_t, 4>& permutation,
                                       Operation* op, ConstOp permutation_op,
                                       SmallVector<TransposeOp, 2>* transpose_ops) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 19.3K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/quantization/stablehlo/passes/bridge/convert_tf_quant_types.cc

          // Consider UQ op legal if it has a CastOp next to the qint input/output.
          if (IsTFUniformQuantizedOp(op)) {
            return IsTFUniformQuantizedOpLegal(op);
          } else if (auto cast_op = llvm::dyn_cast<TF::CastOp>(op)) {
            return IsCastOpLegal(cast_op);
          } else if (auto const_op = llvm::dyn_cast<TF::ConstOp>(op)) {
            return !IsIllegalType(const_op.getOutput().getType());
          }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 12.6K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/lite/transforms/dense_to_sparse.cc

          float ratio_threshold = kBlockOverRandomSparsityRatio;
          if (isa<ConstOp>(inst)) {
            supported_block_size = sparse_op.GetFloatBlockSize();
            type = mlir::cast<ShapedType>(dyn_cast<ConstOp>(inst).getType());
          } else if (isa<QConstOp>(inst)) {
            supported_block_size = sparse_op.GetQuantizedBlockSize();
            type = mlir::cast<ShapedType>(dyn_cast<QConstOp>(inst).getType());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 16.1K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/lite/stablehlo/transforms/legalize_hlo_conversions/dot_general.cc

        }
      }
    
      const DimensionVector& batch_dimensions() const { return batch_dimensions_; }
      const DimensionVector& contracting_dimensions() const {
        return contracting_dimensions_;
      }
      // Out dimensions are any dimensions that are neither batch nor contracting
      // dimensions, hence will be propagated to output shape.
      const DimensionVector& out_dimensions() const { return out_dimensions_; }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 19.2K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tensorflow/transforms/collection_ops_util.cc

      if (!type) return -1;
      auto indices_op = indices.getDefiningOp();
      if (!indices_op) return -1;
      auto const_op = llvm::dyn_cast<TF::ConstOp>(indices_op);
      if (!const_op) return -1;
      int64_t last_index = -1;
      int64_t first_index = -1;
      for (const auto& ind : const_op.getValue().getValues<APInt>()) {
        if (last_index == -1) {
          last_index = ind.getSExtValue();
          first_index = last_index;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 14.5K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/lite/experimental/tac/transforms/device_transform_patterns.cc

        TFL::Conv2DOp conv_op, PatternRewriter& rewriter) const {
      return EnsureBias(conv_op, 2, rewriter);
    }
    
    // ================== slice ============================
    
    // If a slice op has < 4d dimension, will pad it to 4d.
    LogicalResult PadSlice::matchAndRewrite(TFL::SliceOp slice_op,
                                            PatternRewriter& rewriter) const {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 25.4K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/quantization/tensorflow/passes/duplicate_shape_determining_constants.cc

              << " does not have a defining op and cannot be duplicated.";
        } else {
          // If the operand's defining is not a ConstOp, recursively traverse
          // "upwards" to find ConstOps that transitively produces the current
          // operand and duplicate them.
          auto op_operands = defining_op->getOpOperands();
          absl::c_transform(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Mar 22 05:52:39 UTC 2024
    - 17.5K bytes
    - Viewed (0)
Back to top