Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 100 for matchAndRewrite (0.4 sec)

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

     public:
      explicit CommuteBothInputsTransposedWithEwiseOps(MLIRContext *context)
          : RewritePattern(MatchAnyOpTypeTag(), /*benefit=*/1, context) {}
      LogicalResult matchAndRewrite(Operation *op,
                                    PatternRewriter &rewriter) const override {
        if (!IsElementwise(op)) {
          return failure();
        }
    
        const bool any_blargs = llvm::any_of(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 12.5K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/lite/stablehlo/transforms/legalize_stablehlo_custom_call_to_composite.cc

      using OpRewritePattern::OpRewritePattern;
    
      explicit ReplaceCustomCallWithComposite(MLIRContext *context)
          : OpRewritePattern<mlir::stablehlo::CustomCallOp>(context) {}
    
      LogicalResult matchAndRewrite(mlir::stablehlo::CustomCallOp op,
                                    PatternRewriter &rewriter) const override {
        auto backendConfig =
            mlir::dyn_cast<DictionaryAttr>(op->getAttr("composite.backend_config"));
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 4.4K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/quantization/tensorflow/passes/quantize.cc

        : public OpRewritePattern<quantfork::DequantizeCastOp> {
     public:
      explicit RemoveUnusedQdqPattern(MLIRContext* context)
          : OpRewritePattern<quantfork::DequantizeCastOp>(context) {}
      LogicalResult matchAndRewrite(quantfork::DequantizeCastOp dq_op,
                                    PatternRewriter& rewriter) const override {
        auto q_op = dq_op.getArg().getDefiningOp<quantfork::QuantizeCastOp>();
        if (!q_op) return failure();
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Mar 22 05:52:39 UTC 2024
    - 23.6K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tfrt/ir/tfrt_fallback_async.cc

        : public OpRewritePattern<CoreRTTensorHandleToFallbackTensorOp> {
      using OpRewritePattern<
          CoreRTTensorHandleToFallbackTensorOp>::OpRewritePattern;
    
      LogicalResult matchAndRewrite(CoreRTTensorHandleToFallbackTensorOp op,
                                    PatternRewriter &rewriter) const override {
        SmallVector<Value, 1> new_values;
        bool should_rewrite = false;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Jun 08 01:19:25 UTC 2023
    - 15.6K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/quantization/tensorflow/passes/convert_custom_aggregation_op_to_quant_stats.cc

      // outlives this object.
      explicit ConvertCustomAggregationOpToQuantStats(MLIRContext *context)
          : OpRewritePattern<TF::CustomAggregatorOp>(context) {}
    
      LogicalResult matchAndRewrite(TF::CustomAggregatorOp op,
                                    PatternRewriter &rewriter) const override {
        FloatAttr min = mlir::dyn_cast_or_null<FloatAttr>(op->getAttr("min"));
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 4.8K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/lite/transforms/optimize_op_order.cc

    struct PushDownDequantize : public OpRewritePattern<DequantizeOp> {
      explicit PushDownDequantize(MLIRContext* context)
          : OpRewritePattern<DequantizeOp>(context) {}
    
      LogicalResult matchAndRewrite(DequantizeOp dequantize_op,
                                    PatternRewriter& rewriter) const override {
        if (!dequantize_op->hasOneUse()) return failure();
    
        auto use = dequantize_op->use_begin();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.1K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/lite/transforms/decompose_hybrid_quantization.cc

      void runOnOperation() override;
    };
    
    template <typename SrcOp>
    class DequantizeConverter : public OpRewritePattern<SrcOp> {
     public:
      using OpRewritePattern<SrcOp>::OpRewritePattern;
    
      LogicalResult matchAndRewrite(SrcOp srcop,
                                    PatternRewriter &rewriter) const final {
        Operation *op = srcop.getOperation();
        bool allTypesFp = true;
        bool allTypesQuantizedOrInt = true;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.8K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/quantization/stablehlo/passes/merge_fusion_with_dequantize.cc

        : public OpRewritePattern<func::CallOp> {
     public:
      explicit MergeFusionWithUniformDequantizePattern(MLIRContext* context)
          : OpRewritePattern<func::CallOp>(context) {}
      LogicalResult matchAndRewrite(func::CallOp call_op,
                                    PatternRewriter& rewriter) const override {
        if (call_op.getNumResults() != 1) return failure();
        auto users = call_op->getUsers();
        for (auto user : users) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.9K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tensorflow/transforms/gpu_fusion.cc

    // optional extra operands for the AddV2 case.
    struct ReluToFusedBatchNorm : public OpRewritePattern<ReluOp> {
      using OpRewritePattern<ReluOp>::OpRewritePattern;
    
      LogicalResult matchAndRewrite(ReluOp relu_op,
                                    PatternRewriter &rewriter) const override {
        Operation *relu_input = relu_op.getFeatures().getDefiningOp();
        if (!relu_input) return failure();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Nov 03 12:35:38 UTC 2022
    - 5.2K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/quantization/common/quantization_lib/quantization_utils.h

            num_bits(num_bits),
            narrow_range(narrow_range),
            is_signed(is_signed),
            legacy_float_scale(legacy_float_scale) {}
    
      LogicalResult matchAndRewrite(quantfork::StatisticsOp op,
                                    PatternRewriter& rewriter) const override {
        Type expressed = op.getType().cast<ShapedType>().getElementType();
        quant::QuantizedType quant_type;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Apr 24 20:30:06 UTC 2024
    - 41.7K bytes
    - Viewed (0)
Back to top