Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 201 for constop (0.34 sec)

  1. tensorflow/compiler/mlir/tensorflow/transforms/lower_tf.cc

          loc, mlir::RankedTensorType::get({}, getElementTypeOrSelf(shape)), shape,
          /*begin=*/
          builder->create<TF::ConstOp>(loc, builder->getI32TensorAttr({idx})),
          /*end=*/
          builder->create<TF::ConstOp>(loc, builder->getI32TensorAttr({idx + 1})),
          /*strides=*/
          builder->create<TF::ConstOp>(loc, builder->getI32TensorAttr({1})),
          /*begin_mask=*/0, /*end_mask=*/0, /*ellipsis_mask=*/0,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 74.9K bytes
    - Viewed (0)
  2. 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)
  3. tensorflow/compiler/mlir/tensorflow/transforms/decompose_resource_ops.cc

        for (int i = 0; i < counter_size; ++i) {
          Value word = counter[i];
          Value word_u64 = rewriter.create<CastOp>(loc, word_u64_type, word);
          Value new_word_u64 = rewriter.create<AddV2Op>(loc, word_u64, increment);
          Value new_word = rewriter.create<CastOp>(loc, word_type, new_word_u64);
          pack_args.push_back(new_word);
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Nov 03 12:35:38 UTC 2022
    - 8.1K bytes
    - Viewed (0)
  4. 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)
  5. tensorflow/compiler/mlir/tfr/ir/tfr_ops.cc

                                    PatternRewriter &rewriter) const override {
        auto cast_op = dyn_cast<TFR::CastOp>(qparams_op.getInput().getDefiningOp());
        auto cast_qtype = getQuantizedElementType(cast_op);
        if (!cast_qtype) {
          return failure();
        }
    
        TF::ConstOp scale_op;
        TF::ConstOp zp_op;
    
        // Reads quantization parameters from the quantized type, and converts
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Nov 21 16:55:41 UTC 2023
    - 38.2K bytes
    - Viewed (0)
  6. 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)
  7. 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)
  8. 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)
  9. tensorflow/compiler/mlir/quantization/tensorflow/cc/const_op_size.h

    #include "tensorflow/compiler/mlir/tensorflow/ir/tf_ops.h"
    
    namespace mlir {
    namespace quant {
    
    // Returns the size in bytes of the underlying data of `const_op`. If the
    // underlying type's size cannot be determined, it assumes 4 bytes per element.
    int64_t GetSizeInBytes(TF::ConstOp const_op);
    
    }  // namespace quant
    }  // namespace mlir
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Dec 14 04:37:13 UTC 2022
    - 1.2K bytes
    - Viewed (0)
  10. 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)
Back to top