Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 12 for MatchAnyOpTypeTag (0.22 sec)

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

    // unchanged.
    class CommuteBothInputsTransposedWithEwiseOps : public RewritePattern {
     public:
      explicit CommuteBothInputsTransposedWithEwiseOps(MLIRContext *context)
          : RewritePattern(MatchAnyOpTypeTag(), /*benefit=*/1, context) {}
      LogicalResult matchAndRewrite(Operation *op,
                                    PatternRewriter &rewriter) const override {
        if (!IsElementwise(op)) {
          return failure();
        }
    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/quantization/tensorflow/passes/convert_tpu_model_to_cpu.cc

      }
    
      void runOnOperation() override;
    };
    
    class RemoveTpuOp : public RewritePattern {
     public:
      explicit RemoveTpuOp(MLIRContext* context)
          : RewritePattern(MatchAnyOpTypeTag(), /*benefit=*/1, context) {}
    
     private:
      LogicalResult matchAndRewrite(Operation* op,
                                    PatternRewriter& rewriter) const override {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.5K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tf2xla/transforms/legalize_tf_with_tf2xla.cc

                                    const std::string& device_type,
                                    bool prefer_tf2xla)
          : ConversionPattern(converter, MatchAnyOpTypeTag(), /*benefit=*/1, ctx),
            device_type_(device_type),
            prefer_tf2xla_(prefer_tf2xla) {}
    
      LogicalResult matchAndRewrite(
          Operation* op, ArrayRef<Value> operands,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 28 21:49:50 UTC 2024
    - 9.7K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/quantization/tensorflow/passes/add_quantization_unit_loc.cc

        }
      }
    
      return std::nullopt;
    }
    
    class AddQuantizationUnitLoc : public RewritePattern {
     public:
      explicit AddQuantizationUnitLoc(MLIRContext* context)
          : RewritePattern(MatchAnyOpTypeTag(), /*benefit=*/1, context) {}
    
     private:
      LogicalResult matchAndRewrite(Operation* op,
                                    PatternRewriter& rewriter) const override {
        if (!IsOpWithQuantizableTrait(op) ||
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 7.4K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/quantization/stablehlo/passes/bridge/convert_tf_quant_types.cc

      TFQuantTypeConverter &converter_;
    };
    
    class TFQuantTypePattern : public ConversionPattern {
     public:
      TFQuantTypePattern(MLIRContext *ctx, TypeConverter &converter)
          : ConversionPattern(converter, MatchAnyOpTypeTag(), 1, ctx) {}
    
      LogicalResult matchAndRewrite(
          Operation *op, ArrayRef<Value> operands,
          ConversionPatternRewriter &rewriter) const override {
        // This pattern only handle non-UQ, non-const ops.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 12.6K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tensorflow/transforms/fold_broadcast.cc

    namespace mlir {
    namespace {
    
    class ConvertResultsBroadcastableShapeOp : public RewritePattern {
     public:
      ConvertResultsBroadcastableShapeOp(MLIRContext* context)
          : RewritePattern(MatchAnyOpTypeTag(), 1, context) {}
    
      LogicalResult matchAndRewrite(Operation* op,
                                    PatternRewriter& rewriter) const override;
    
     private:
      template <typename Op>
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 7.9K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/quantization/stablehlo/passes/convert_func_to_bfloat16.cc

      BFloat16TypeConverter& converter_;
    };
    
    class BFloat16TypePattern : public ConversionPattern {
     public:
      BFloat16TypePattern(TypeConverter& converter, MLIRContext* ctx)
          : ConversionPattern(converter, MatchAnyOpTypeTag(), /*benefit=*/1, ctx) {}
    
      LogicalResult matchAndRewrite(
          Operation* op, const ArrayRef<Value> operands,
          ConversionPatternRewriter& rewriter) const override {
        if (getTypeConverter()->isLegal(op)) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 9.3K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tf2xla/transforms/xla_legalize_tf.cc

      //    implemented in C++ don't do so this comparison doesn't work in those
      //    cases.
      // 2) Descending pattern benefit.
      // 3) Op specific patterns over patterns with MatchAnyOpTypeTag.
      // 4) Order of patterns in `RewritePatternSet`.
    
      // Add TF->HLO legalization patterns.
      PopulateLegalizeTfPatterns(context, &legalize_lower_patterns);
    
      // Add TF->TF lowering patterns.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 28 21:49:50 UTC 2024
    - 10.2K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/quantization/tensorflow/passes/insert_custom_aggregation_ops.cc

      // outlives this object.
      explicit AddCustomAggregationOp(MLIRContext *context,
                                      const CalibrationOptions &calib_opts)
          : RewritePattern(MatchAnyOpTypeTag(), /*benefit=*/1, context),
            calib_opts_(calib_opts) {}
    
      LogicalResult matchAndRewrite(Operation *op,
                                    PatternRewriter &rewriter) const override {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 17 17:58:54 UTC 2024
    - 14.8K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/lite/stablehlo/odml_converter/transforms/outline_composites.cc

    // identifying `erf` ops and validate the structure around them.
    class OutlineGELU : public RewritePattern {
     public:
      explicit OutlineGELU(MLIRContext* context)
          : RewritePattern(MatchAnyOpTypeTag(), /*benefit=*/1, context) {}
    
      LogicalResult matchAndRewrite(Operation* op,
                                    PatternRewriter& rewriter) const override {
        if (!MatchERF(op)) return failure();
        // `add 1`
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 17 17:58:54 UTC 2024
    - 9.6K bytes
    - Viewed (0)
Back to top