Search Options

Results per page
Sort
Preferred Languages
Advance

Results 61 - 70 of 100 for matchAndRewrite (0.48 sec)

  1. tensorflow/compiler/mlir/lite/stablehlo/transforms/legalize_hlo_conversions/reduce.h

              bool is_argmax>
    class ConvertReduceOpToArgMinMax : public OpConversionPattern<mhlo::ReduceOp> {
     public:
      using OpConversionPattern::OpConversionPattern;
      LogicalResult matchAndRewrite(
          mhlo::ReduceOp reduce_op, OpAdaptor adaptor,
          ConversionPatternRewriter& rewriter) const final {
        if (reduce_op.getInputs().size() != 2) return failure();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.7K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tensorflow/transforms/init_text_file_to_import.cc

                                                    StringRef saved_model_dir)
          : OpRewritePattern<InitializeTableFromTextFileV2Op>(context),
            saved_model_dir_(saved_model_dir) {}
    
      LogicalResult matchAndRewrite(InitializeTableFromTextFileV2Op op,
                                    PatternRewriter& rewriter) const override {
        // Now, this pattern matching only supports the following case, which is
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Nov 03 12:35:38 UTC 2022
    - 6.1K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/lite/quantization/ir/ConvertSimQuant.cc

     public:
      using OpRewritePattern<FakeQuantOp>::OpRewritePattern;
    
      FakeQuantRewrite(MLIRContext *ctx, bool *hadFailure)
          : OpRewritePattern<FakeQuantOp>(ctx), hadFailure(hadFailure) {}
    
      LogicalResult matchAndRewrite(FakeQuantOp op,
                                    PatternRewriter &rewriter) const override {
        // TODO: If this pattern comes up more frequently, consider adding core
        // support for failable rewrites.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 08 02:10:16 UTC 2024
    - 6K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tensorflow/ir/tf_executor.cc

    // results of the GraphOp to the operands of the FetchOp.
    struct DropEmptyGraph : public OpRewritePattern<GraphOp> {
      using OpRewritePattern<GraphOp>::OpRewritePattern;
    
      LogicalResult matchAndRewrite(GraphOp op,
                                    PatternRewriter &rewriter) const override {
        Block &block = op.GetBody();
        // Check if graph only has one fetch.
        if (&block.front() != &block.back()) return failure();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 42.7K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/lite/transforms/prepare_tf.cc

            intAttrOne(Builder(context).getI32IntegerAttr(1)),
            allow_bf16_and_f16_type_legalization_(
                allow_bf16_and_f16_type_legalization) {}
    
      LogicalResult matchAndRewrite(Operation *op,
                                    PatternRewriter &rewriter) const override {
        // Assumes TensorFlow convolution op is already verified to be
        // in valid form.
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 28 21:49:50 UTC 2024
    - 64.6K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/lite/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 {
        // 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
    - 6.6K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tensorflow/ir/tf_ops_n_z.cc

     public:
      explicit HoistCwiseUnaryOutOfUnpack(MLIRContext *context)
          : OpRewritePattern<UnpackOp>(context) {}
      LogicalResult matchAndRewrite(UnpackOp op,
                                    PatternRewriter &rewriter) const override;
    };
    
    LogicalResult HoistCwiseUnaryOutOfUnpack::matchAndRewrite(
        UnpackOp op, PatternRewriter &rewriter) const {
      auto loc = op.getLoc();
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 09 22:07:10 UTC 2024
    - 170.8K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/quantization/tensorflow/passes/quantize_composite_functions.cc

          : OpRewritePattern<quantfork::QuantizeCastOp>(context),
            target_opset_(target_opset) {}
    
     private:
      OpSet target_opset_ = OpSet::TF;
    
      LogicalResult matchAndRewrite(quantfork::QuantizeCastOp q_op,
                                    PatternRewriter& rewriter) const override {
        auto output_type = mlir::cast<TensorType>(q_op.getType());
        auto elem_type =
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 54.5K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/quantization/tensorflow/passes/propagate_quantize_type.cc

                                                   new_dequantize_op);
        user_op->getResult(0).setType(new_user_op_type);
      }
    
      LogicalResult matchAndRewrite(TF::PartitionedCallOp op,
                                    PatternRewriter& rewriter) const override {
        const auto f_attr = mlir::dyn_cast<FlatSymbolRefAttr>(op.getFAttr());
        StringRef function_name = f_attr.getValue();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 7K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tensorflow/ir/tf_ops_a_m.cc

     public:
      explicit FoldConstantCaseOp(MLIRContext* context)
          : OpRewritePattern<TF::CaseOp>(context) {}
      LogicalResult matchAndRewrite(TF::CaseOp op,
                                    PatternRewriter& rewriter) const override;
    };
    
    LogicalResult FoldConstantCaseOp::matchAndRewrite(
        TF::CaseOp op, PatternRewriter& rewriter) const {
      // Extract the constant cond value.
      DenseIntElementsAttr branch;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 146.7K bytes
    - Viewed (0)
Back to top