Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for QuantizeOp (0.13 sec)

  1. tensorflow/compiler/mlir/lite/transforms/quantize.cc

    };
    
    class QuantizeConstPattern : public OpRewritePattern<QuantizeOp> {
     public:
      explicit QuantizeConstPattern(MLIRContext* context, bool legacy_float_scale)
          : OpRewritePattern<QuantizeOp>(context),
            legacy_float_scale_(legacy_float_scale) {}
      LogicalResult matchAndRewrite(QuantizeOp op,
                                    PatternRewriter& rewriter) const override {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Apr 24 20:30:06 UTC 2024
    - 13.3K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/lite/transforms/post_quantize.cc

          arg.dropAllUses();
          bb.eraseArgument(0);
        };
    
        // This is looking for a pattern: arg -> tfl.quantize
        if (arg.hasOneUse() && llvm::isa<QuantizeOp>(*arg.user_begin())) {
          auto quantize_op = llvm::cast<QuantizeOp>(*arg.user_begin());
          remove_quantize_op(quantize_op);
          continue;
        }
    
        // Make a copy of current argument and append it to the end of the list if
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 17.1K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/quantization/stablehlo/passes/quantization_patterns.h

    // A base rewrite pattern which matches any N-in-M-out operations with
    // quantization parameters propagated to at least one of its operands. The
    // quantization parameters are annotated by the QuantizeOp/DequantizeOp pairs.
    // Each matched pattern are rewritten by its quantized alternatives.
    //
    // Quantization method is determined by the `_quantization_method` attributes
    // attached to each quantizable units.
    //
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 10.9K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/quantization/common/quantization_lib/quantization_utils.h

          if (QuantizedType::getQuantizedElementType(quantize_operand.getType())) {
            // The input of this QuantizeOp has already been quantized, i.e.
            // rescale.
            return failure();
          }
          DenseFPElementsAttr attr;
          if (matchPattern(quantize_operand, m_Constant(&attr))) {
            // Const-> QuantizeOp pattern will be handled separately.
            return failure();
          }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Apr 24 20:30:06 UTC 2024
    - 41.7K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/lite/experimental/tac/transforms/device_transform_patterns.cc

          rewriter.create<TFL::MeanOp>(mean_op->getLoc(), new_output_type, input,
                                       mean_op.getAxis(), mean_op.getKeepDims());
    
      // Insert a requant op.
      rewriter.replaceOpWithNewOp<TFL::QuantizeOp>(
          mean_op, output_type, new_mean_op, mlir::TypeAttr::get(output_type));
      return success();
    }
    
    }  // namespace tac
    }  // namespace TFL
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 25.4K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/quantization/stablehlo/passes/quantization_patterns.cc

              output_types.push_back(result_type);
              continue;
            }
            const Type result_element_type =
                mlir::cast<TensorType>(result.getType()).getElementType();
            // If the user is the QuantizeOp, it must be the only user.
            if (result.hasOneUse() &&
                isa<quantfork::QuantizeCastOp>(*result.user_begin())) {
              auto user = cast<quantfork::QuantizeCastOp>(*result.user_begin());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 03 06:04:36 UTC 2024
    - 41.7K bytes
    - Viewed (0)
Back to top