Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 82 for matchAndRewrite (0.69 sec)

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

    class RemoveCustomCallWithSharding
        : public OpRewritePattern<stablehlo::CustomCallOp> {
      using OpRewritePattern<stablehlo::CustomCallOp>::OpRewritePattern;
    
      LogicalResult matchAndRewrite(stablehlo::CustomCallOp op,
                                    PatternRewriter &rewriter) const override {
        // Removes the custom call with sharding op if the operand type is the
        // same as the result type.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Jan 25 09:43:18 UTC 2024
    - 10.9K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tensorflow/transforms/unroll_batch_matmul.cc

      static std::vector<Value> sliceInput(Value value, int batch_size,
                                           Location loc, PatternRewriter& rewriter);
    
      LogicalResult matchAndRewrite(BatchMatMulOpType op,
                                    PatternRewriter& rewriter) const override;
    };
    
    #define GEN_PASS_DEF_UNROLLBATCHMATMULPASS
    #include "tensorflow/compiler/mlir/tensorflow/transforms/tf_passes.h.inc"
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 11.6K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/lite/stablehlo/transforms/smuggle_disallowed_ops.cc

      return success();
    }
    
    }  // namespace
    
    template <typename OpTy>
    class SmuggleOpPattern : public OpRewritePattern<OpTy> {
     public:
      using OpRewritePattern<OpTy>::OpRewritePattern;
    
      LogicalResult matchAndRewrite(OpTy op,
                                    PatternRewriter& rewriter) const override {
        return SmuggleOp(op, rewriter);
      }
    };
    
    class SmuggleDisallowedOpsPass
        : public PassWrapper<SmuggleDisallowedOpsPass,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Mar 19 01:14:04 UTC 2024
    - 3.6K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tensorflow/transforms/batchmatmul_to_einsum.cc

    template <typename BatchMatMulOpType>
    class ConvertTFBatchMatMulToEinsumOp
        : public OpRewritePattern<BatchMatMulOpType> {
      using OpRewritePattern<BatchMatMulOpType>::OpRewritePattern;
    
      LogicalResult matchAndRewrite(BatchMatMulOpType op,
                                    PatternRewriter& rewriter) const override {
        Value input_lhs = op.getX();
        Value input_rhs = op.getY();
    
        // LHS and RHS must be a ranked tensor type
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 3.8K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tf2xla/transforms/legalize_tf_with_tf2xla.cc

          : ConversionPattern(converter, MatchAnyOpTypeTag(), /*benefit=*/1, ctx),
            device_type_(device_type),
            prefer_tf2xla_(prefer_tf2xla) {}
    
      LogicalResult matchAndRewrite(
          Operation* op, ArrayRef<Value> operands,
          ConversionPatternRewriter& rewriter) const override {
        // This pattern is a conversion pattern because we want to specify a type
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 28 21:49:50 UTC 2024
    - 9.7K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/quantization/tensorflow/cc/constant_fold.cc

      SmallVector<Value> results;
      if (failed(FoldOperation(builder, op, results))) {
        return op->getResults();
      }
      return results;
    }
    
    LogicalResult ConstantFoldQuantizableOperands::matchAndRewrite(
        Operation* op, PatternRewriter& rewriter) const {
      absl::flat_hash_set<int> quantizable_operands = GetQuantizableOperands(op);
      if (quantizable_operands.empty()) return failure();
    
      bool has_change = false;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 17 17:58:54 UTC 2024
    - 5K bytes
    - Viewed (0)
  7. 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)
  8. 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)
  9. 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)
  10. 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)
Back to top