- Sort Score
- Result 10 results
- Languages All
Results 81 - 90 of 100 for matchAndRewrite (0.27 sec)
-
tensorflow/compiler/mlir/quantization/stablehlo/passes/quantize_weight.cc
const QuantizationComponentSpec& quantization_component_spec) : OpRewritePattern<ConstantOp>(context), quantization_component_spec_(quantization_component_spec) {} LogicalResult matchAndRewrite(ConstantOp op, PatternRewriter& rewriter) const override { // 1. Collect quantizable ops. QuantizationUnits quantizable_ops = GetQuantizableOps(op); if (quantizable_ops.empty()) {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 9.9K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/transforms/lift_tflite_flex_ops.cc
// operation. class LiftFlexCustomOp : public OpRewritePattern<TFL::CustomOp> { public: using OpRewritePattern<TFL::CustomOp>::OpRewritePattern; LogicalResult matchAndRewrite(TFL::CustomOp op, PatternRewriter& rewriter) const override { if (!op.getCustomCode().starts_with(kFlexOpNamePrefix)) { return failure(); }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 10.9K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/tensorflow/passes/quantize_weights.cc
const tensorflow::quantization::QuantizationOptions& quantization_options) : OpRewritePattern<TF::ConstOp>(context), quant_options_(quantization_options) {} LogicalResult matchAndRewrite(TF::ConstOp op, PatternRewriter& rewriter) const override { auto weight_component_spec = GetWeightComponentSpec(quant_options_); if (!weight_component_spec) return failure();
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue Mar 05 07:39:40 UTC 2024 - 11.3K bytes - Viewed (0) -
tensorflow/compiler/mlir/tfr/passes/raise_to_tf.cc
bool materialize_derived_attrs) : OpRewritePattern<CallOp>(context), symbol_table_(table), materialize_derived_attrs_(materialize_derived_attrs) {} LogicalResult matchAndRewrite(CallOp call_op, PatternRewriter& rewriter) const override; private: // Derives the attribute values for the attributes attached to the
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 21.8K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/tensorflow/passes/preprocess_op.cc
op->setAttr("f", SymbolRefAttr::get(rewriter.getContext(), new_float_func.getName())); return success(); } LogicalResult matchAndRewrite(TF::PartitionedCallOp op, PatternRewriter& rewriter) const override { const auto f_attr = mlir::dyn_cast<FlatSymbolRefAttr>(op.getFAttr()); // Non-quantizable op
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 11.4K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/stablehlo/odml_converter/transforms/outline_composites.cc
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` auto* erf_user = GetUserIfOnlyOne(op);
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri May 17 17:58:54 UTC 2024 - 9.6K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/stablehlo/passes/quantization_patterns.h
// Const-> QuantizeOp pattern will be handled separately. return failure(); } return SmallVector<Operation*>{operand_op}; } LogicalResult matchAndRewrite(RootOpT op, PatternRewriter& rewriter) const override { // Collect all the candidate ops for quantization. FailureOr<SmallVector<Operation*>> candidate_ops = CollectCandidateOps(op);
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 10.9K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/tensorflow/passes/prepare_quantize_drq.cc
: OpRewritePattern<arith::ConstantOp>(context), quant_specs_(quant_specs), op_set_(op_set), enable_per_channel_quantization_(enable_per_channel_quantization) {} 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 - 11.5K bytes - Viewed (0) -
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) -
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)