Search Options

Results per page
Sort
Preferred Languages
Advance

Results 71 - 80 of 100 for matchAndRewrite (0.28 sec)

  1. tensorflow/compiler/mlir/lite/quantization/tensorflow/tf_to_quant.cc

      explicit InsertQuantOpsAfterTFFakeQuantOp<TFFakeQuantOp, PerAxis>(
          MLIRContext *ctx)
          : OpRewritePattern<TFFakeQuantOp>(ctx) {}
    
      LogicalResult matchAndRewrite(TFFakeQuantOp tf_op,
                                    PatternRewriter &rewriter) const override {
        // We don't want to insert quantize/dequantize if the quantize op exists.
        auto res = tf_op.getOutputs();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 8.1K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/lite/transforms/optimize_functional_ops.cc

    // function body based on the conditional value.
    class FoldIfOp : public OpRewritePattern<TF::IfOp> {
     public:
      explicit FoldIfOp(MLIRContext* context)
          : OpRewritePattern<TF::IfOp>(context) {}
    
      LogicalResult matchAndRewrite(TF::IfOp op,
                                    PatternRewriter& rewriter) const override {
        // This pattern is restricted to if ops in functions with exactly one block
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 6.6K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tensorflow/transforms/decompose_resource_ops.cc

                               SelectV2Op::getOperationName(),
                               UnpackOp::getOperationName(),
                           }) {}
    
      LogicalResult matchAndRewrite(Operation *op,
                                    PatternRewriter &rewriter) const override {
        auto rng_op = cast<RngReadAndSkipOp>(op);
    
        DenseIntElementsAttr alg_constant;
    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/utils/fake_quant_utils.h

          : use_fake_quant_num_bits_(use_fake_quant_num_bits) {}
    
      FetchMinMax fetch_min_max_;
    
      using FetchAttrType = typename FetchMinMax::AttrType;
      LogicalResult matchAndRewrite(TFFakeQuantOp tf_op,
                                    OpBuilder &rewriter) const {
        if (tf_op.getNumBits() != 8) {
          return failure();
        }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 6.3K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/quantization/tensorflow/passes/add_quantization_unit_loc.cc

     public:
      explicit AddQuantizationUnitLoc(MLIRContext* context)
          : RewritePattern(MatchAnyOpTypeTag(), /*benefit=*/1, context) {}
    
     private:
      LogicalResult matchAndRewrite(Operation* op,
                                    PatternRewriter& rewriter) const override {
        if (!IsOpWithQuantizableTrait(op) ||
            FindQuantizationUnitFromLoc(op->getLoc()).has_value()) {
          return failure();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 7.4K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/lite/stablehlo/transforms/fuse_convolution_pass.cc

    namespace mlir {
    namespace odml {
    
    class FuseMhloMulAndConvolutionPattern : public OpRewritePattern<mhlo::MulOp> {
     public:
      using OpRewritePattern<mhlo::MulOp>::OpRewritePattern;
    
      LogicalResult matchAndRewrite(mhlo::MulOp mul_op,
                                    PatternRewriter &rewriter) const override {
        // Variables for capturing values and attributes used while creating ops.
        mhlo::ConvolutionOp conv_op;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Feb 22 22:21:19 UTC 2024
    - 8.3K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/quantization/tensorflow/passes/lift_quantizable_spots_as_functions_drq.cc

            quantization_method_(quantization_method),
            target_opset_(target_opset),
            min_num_elements_for_weights_(min_num_elements_for_weights) {}
    
     private:
      LogicalResult matchAndRewrite(TF::PartitionedCallOp call_op,
                                    PatternRewriter& rewriter) const override {
        std::unique_ptr<OpQuantSpec> spec = GetTFOpQuantSpec(call_op);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 8.5K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tensorflow/transforms/optimize.cc

    // the rank of the input and output of the broadcast.
    class SimplifyBroadcastReshape : public OpRewritePattern<BroadcastToOp> {
      using OpRewritePattern<BroadcastToOp>::OpRewritePattern;
    
      LogicalResult matchAndRewrite(BroadcastToOp op,
                                    PatternRewriter &rewriter) const override {
        // Only rewrite if the Broadcast has only one consumer.
        if (!op.getOutput().hasOneUse()) return failure();
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 8.1K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/lite/transforms/dilated_conv.h

          PatternRewriter& rewriter) const;
    
     public:
      LogicalResult matchAndRewrite(Conv2dOpTy op,
                                    PatternRewriter& rewriter) const override;
    };
    
    template <typename Conv2dOpTy>
    LogicalResult ConvertTFDilatedConvOp<Conv2dOpTy>::matchAndRewrite(
        Conv2dOpTy op, PatternRewriter& rewriter) const {
      if (!op.getResult().hasOneUse()) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 20K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/lite/stablehlo/transforms/legalize_hlo_conversions/scatter.h

    template <typename BinaryOp, typename TfOp>
    class ConvertScatterOp : public OpConversionPattern<mhlo::ScatterOp> {
     public:
      using OpConversionPattern::OpConversionPattern;
    
      LogicalResult matchAndRewrite(
          mhlo::ScatterOp scatter_op, OpAdaptor adaptor,
          ConversionPatternRewriter& rewriter) const final {
        {
          OperandRange operands = scatter_op.getInputs();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 10.1K bytes
    - Viewed (0)
Back to top