Search Options

Results per page
Sort
Preferred Languages
Advance

Results 71 - 80 of 82 for matchAndRewrite (0.2 sec)

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

    template <typename BinaryOpType>
    class FoldBroadcastInDimBeforeBinaryElementwiseOp
        : public OpRewritePattern<BinaryOpType> {
     public:
      using OpRewritePattern<BinaryOpType>::OpRewritePattern;
    
      LogicalResult matchAndRewrite(BinaryOpType binary_op,
                                    PatternRewriter &rewriter) const override {
        auto lhs = binary_op.getLhs();
        auto rhs = binary_op.getRhs();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 10.5K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/lite/transforms/quantize.cc

     public:
      explicit QuantizeConstPattern(MLIRContext* context, bool legacy_float_scale)
          : OpRewritePattern<QuantizeOp>(context),
            legacy_float_scale_(legacy_float_scale) {}
      LogicalResult matchAndRewrite(QuantizeOp op,
                                    PatternRewriter& rewriter) const override {
        DenseFPElementsAttr attr;
        if (matchPattern(op.getInput(), m_Constant(&attr))) {
          auto qtype = op.getQtypeAttr();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Apr 24 20:30:06 UTC 2024
    - 13.3K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/quantization/tensorflow/passes/insert_custom_aggregation_ops.cc

                                      const CalibrationOptions &calib_opts)
          : RewritePattern(MatchAnyOpTypeTag(), /*benefit=*/1, context),
            calib_opts_(calib_opts) {}
    
      LogicalResult matchAndRewrite(Operation *op,
                                    PatternRewriter &rewriter) const override {
        // Return early if the given operator is the custom aggregator op.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 17 17:58:54 UTC 2024
    - 14.8K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/lite/ir/tfl_ops.cc

    // bias operand named 'bias'.
    template <typename ConcreteOpType>
    struct RemoveOptionalZeroBias : public OpRewritePattern<ConcreteOpType> {
      using OpRewritePattern<ConcreteOpType>::OpRewritePattern;
    
      LogicalResult matchAndRewrite(ConcreteOpType op,
                                    PatternRewriter& rewriter) const override {
        if (EqualsZero(op.getBias())) {
          auto none_value = rewriter.create<TFL::NoValueOp>(
    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/quantization/tensorflow/passes/lift_quantizable_spots_as_functions.cc

                                   const QuantizationOptions& quant_options)
          : OpRewritePattern<TF::PartitionedCallOp>(context),
            quant_options_(quant_options) {}
    
     private:
      LogicalResult matchAndRewrite(TF::PartitionedCallOp call_op,
                                    PatternRewriter& rewriter) const override {
        StringRef function_name =
            mlir::cast<FlatSymbolRefAttr>(call_op.getFAttr()).getValue();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 10 04:07:09 UTC 2024
    - 16.4K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tensorflow/transforms/fused_kernel_matcher.cc

      virtual bool IsDeviceCompatible(SrcOpT contraction_op, BiasAddOp bias_add,
                                      PatternRewriter &rewriter) const {
        return true;
      }
    
      LogicalResult matchAndRewrite(SrcOpT contraction,
                                    PatternRewriter &rewriter) const override {
        auto context = rewriter.getContext();
    
        // We do support fusion only if the contraction operation is inside one of
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 14.9K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/quantization/tensorflow/passes/prepare_quantize.cc

     public:
      explicit MergeConsecutiveQuantizeCast(MLIRContext* context)
          : OpRewritePattern<quantfork::QuantizeCastOp>(context) {}
    
     private:
      LogicalResult matchAndRewrite(quantfork::QuantizeCastOp q_op,
                                    PatternRewriter& rewriter) const override {
        auto preceding_qcast =
            q_op.getArg().getDefiningOp<quantfork::QuantizeCastOp>();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 17.2K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/lite/transforms/prepare_quantize_dynamic_range.cc

          : OpRewritePattern<arith::ConstantOp>(context),
            visited_nonquantizable_ops_(visited_nonquantizable_ops),
            quant_specs_(quant_specs) {}
    
      LogicalResult matchAndRewrite(arith::ConstantOp op,
                                    PatternRewriter& rewriter) const override {
        QuantizationUnits quantizable_ops;
    
        // 1. Collect quantizable ops.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 20.8K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tensorflow/ir/tf_saved_model.cc

      return *initializers.begin();
    }
    
    class OptimizeSessionInitializerPattern
        : public OpRewritePattern<SessionInitializerOp> {
     public:
      using OpRewritePattern::OpRewritePattern;
    
      LogicalResult matchAndRewrite(SessionInitializerOp op,
                                    PatternRewriter &rewriter) const override {
        SymbolTable symbol_table(op->getParentOfType<ModuleOp>());
    
        SmallVector<func::FuncOp, 2> to_remove;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 23.5K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tensorflow/ir/tf_device.cc

    // results of the LaunchOp to the operands of the ReturnOp.
    struct DropEmptyLaunch : public OpRewritePattern<LaunchOp> {
      using OpRewritePattern<LaunchOp>::OpRewritePattern;
    
      LogicalResult matchAndRewrite(LaunchOp op,
                                    PatternRewriter& rewriter) const override {
        Block& block = op.GetBody();
        // Check if launch only has a return.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 33.4K bytes
    - Viewed (0)
Back to top