Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for ReplaceOpWithNewOp (0.22 sec)

  1. tensorflow/compiler/mlir/lite/stablehlo/transforms/uniform_quantized_stablehlo_to_tfl_pass.cc

        return success();
      }
    
      void rewrite(stablehlo::UniformQuantizeOp op,
                   PatternRewriter& rewriter) const override {
        Type output_type = *op->getResultTypes().begin();
        rewriter.replaceOpWithNewOp<TFL::QuantizeOp>(
            op, output_type, /*input=*/op.getOperand(),
            /*qtype=*/TypeAttr::get(output_type));
      }
    };
    
    // stablehlo.uniform_dequantize -> tfl.dequantize
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Apr 22 09:00:19 UTC 2024
    - 99.8K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/lite/stablehlo/transforms/legalize_hlo.cc

        if (ksizes.size() == 4) {
          rewriter.replaceOpWithNewOp<TF::AvgPoolOp>(
              op, op.getType(), input, rewriter.getI64ArrayAttr(ksizes),
              rewriter.getI64ArrayAttr(kstrides), rewriter.getStringAttr(padding),
              rewriter.getStringAttr(data_format));
          return success();
        } else if (ksizes.size() == 5) {
          rewriter.replaceOpWithNewOp<TF::AvgPool3DOp>(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 154.9K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/lite/transforms/optimize.cc

        // Update the scale in the quantize op.
        auto new_qtype = RescaleQtype(q_op.getQtype(), gamma_cst);
        if (!new_qtype) return failure();
        rewriter.replaceOpWithNewOp<TFL::QuantizeOp>(q_op, new_qtype.getValue(),
                                                     new_filter, new_qtype);
    
        // If bias isn't None, it needs to be multiplied as well.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Apr 30 00:40:15 UTC 2024
    - 102.3K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/lite/ir/tfl_ops.cc

          rewriter.replaceOpWithNewOp<arith::ConstantOp>(const_op,
                                                         const_op.getValue());
          return success();
        } else if (TFL::NoValueOp::isBuildableWith(const_op.getValue(),
                                                   const_op.getType())) {
          rewriter.replaceOpWithNewOp<NoValueOp>(
              const_op, rewriter.getNoneType(),
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 02 09:41:17 UTC 2024
    - 169.2K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tensorflow/ir/tf_ops_n_z.cc

          // to numElements != 0. numElements will be 0 iff one of the dimensions is
          // zero.
          bool any_zero =
              llvm::any_of(type.getShape(), [](int64_t dim) { return dim == 0; });
          rewriter.replaceOpWithNewOp<TF::ConstOp>(
              op, result_type, DenseElementsAttr::get(result_type, {!any_zero}));
        }
        return success();
      }
    };
    }  // namespace
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 09 22:07:10 UTC 2024
    - 170.8K bytes
    - Viewed (0)
Back to top