Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 234 for eraseOp (0.13 sec)

  1. tensorflow/compiler/mlir/tfr/passes/canonicalize.cc

                              inline_point->getResults(), loc,
                              /*shouldCloneInlinedRegion=*/true))) {
        return failure();
      }
    
      // If the inlining was successful then erase the scf.if op.
      rewriter.eraseOp(inline_point);
      return success();
    }
    
    }  // namespace
    
    void populateCanonicalizationPatterns(func::FuncOp func,
                                          RewritePatternSet &patterns) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Sat Jan 14 22:15:06 UTC 2023
    - 6.8K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/lite/stablehlo/transforms/compose_uniform_quantized_type_pass.cc

        // Erase unused ops in the reverse order.
        rewriter.eraseOp(output_uniform_dequantize_call_op);
        rewriter.eraseOp(output_uniform_quantize_call_op);
        rewriter.eraseOp(combined_scale_multiply_op);
        rewriter.eraseOp(subtract_op);
        rewriter.eraseOp(other_conv_op);
        rewriter.eraseOp(op);
        rewriter.eraseOp(input_i8_to_f32_convert_op);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 64.6K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/lite/stablehlo/odml_converter/transforms/outline_composites.cc

        rewriter.replaceAllOpUsesWith(output_mul, composite_op);
        // Note these must be erased in reverse topo order to avoid
        // failing in debug mode.
        rewriter.eraseOp(output_mul);
        rewriter.eraseOp(rhs_add);
        rewriter.eraseOp(op);
        rewriter.eraseOp(lhs_mul);
        rewriter.eraseOp(rhs_mul);
    
        return success();
      }
    };
    
    class OutlineCompositesPass
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 17 17:58:54 UTC 2024
    - 9.6K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/quantization/stablehlo/passes/merge_fusion_with_dequantize.cc

              .replaceAllUsesWith(new_call_op.getResult(0));
          users_to_erase.push_back(user);
        }
        for (auto user : users_to_erase) rewriter.eraseOp(user);
        rewriter.eraseOp(call_op);
        func_op.eraseResult(0);
        func_op.insertResult(0, new_call_op.getResult(0).getType(),
                             /*resultAttrs=*/nullptr);
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.9K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/lite/quantization/tensorflow/tf_to_quant.cc

          id1.replaceAllUsesWith(id1.getInput());
          min = tf_op.getMin();
          rewriter.eraseOp(id1);
        }
        if (auto id2 = dyn_cast_or_null<TF::IdentityOp>(max.getDefiningOp())) {
          id2.replaceAllUsesWith(id2.getInput());
          max = tf_op.getMax();
          rewriter.eraseOp(id2);
        }
        if (!matchPattern(min, m_Constant(&min_value))) return failure();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 8.1K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/quantization/tensorflow/passes/remove_var_init_by_const.cc

                   PatternRewriter& rewriter) const override {
        // `TF::ConstOp` and `TF::VarHandleOp` are not manually erased.
        // `applyPatternsAndFoldGreedily` performs dead code elimination and unsed
        // ops will be erased during the optimization.
        rewriter.eraseOp(assign_op);
      }
    };
    
    void RemoveVariableInitializationByConstPass::runOnOperation() {
      MLIRContext& ctx = getContext();
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Feb 03 12:04:03 UTC 2023
    - 4.5K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/quantization/tensorflow/passes/convert_custom_aggregation_op_to_quant_stats.cc

        // When there are no min and max attributes, remove op.
        if (min == nullptr || max == nullptr) {
          op.getOutput().replaceAllUsesWith(op.getInput());
          rewriter.eraseOp(op);
          return success();
        }
    
        // The layer stats contain only the first min/max pairs.
        ElementsAttr layer_stats = DenseFPElementsAttr::get(
            RankedTensorType::get({2}, rewriter.getF32Type()),
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 4.8K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tensorflow/transforms/init_text_file_to_import.cc

        rewriter.create<LookupTableImportV2Op>(op.getLoc(), op.getTableHandle(),
                                               key_constant_tensor,
                                               value_constant_tensor);
        rewriter.eraseOp(op);
        return success();
      }
    
     private:
      StringRef saved_model_dir_;
    };
    
    void InitTextFileToImportPass::runOnOperation() {
      RewritePatternSet patterns(&getContext());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Nov 03 12:35:38 UTC 2022
    - 6.1K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/lite/transforms/optimize_functional_ops.cc

        // TODO(jpienaar): Remove once recusive side-effects are supported.
        if (op.use_empty() &&
            (op.getIsStateless() ||
             (IsSideEffectFree(then_func) && IsSideEffectFree(else_func)))) {
          rewriter.eraseOp(op.getOperation());
          return success();
        }
    
        // Extract the constant cond value.
        DenseElementsAttr cond;
        if (!matchPattern(op.getCond(), m_Constant(&cond))) return failure();
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 6.6K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/lite/experimental/tac/transforms/device_transform.cc

      LogicalResult matchAndRewrite(TFL::QuantizeOp quant_op,
                                    PatternRewriter& rewriter) const override {
        if (!quant_op.getResult().use_empty()) return failure();
    
        rewriter.eraseOp(quant_op);
        return success();
      }
    };
    
    void OptimizeQuantizedOpToFloat(func::FuncOp func, MLIRContext* context) {
      RewritePatternSet patterns(func.getContext());
      patterns
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 8.4K bytes
    - Viewed (0)
Back to top