- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 82 for matchAndRewrite (0.51 sec)
-
tensorflow/compiler/mlir/lite/stablehlo/transforms/optimize_layout.cc
} // Transform pad(transpose(x)) to transpose(pad(x)) struct TransposeCommuteWithPad : public OpRewritePattern<stablehlo::PadOp> { using OpRewritePattern<stablehlo::PadOp>::OpRewritePattern; LogicalResult matchAndRewrite(stablehlo::PadOp pad_op, PatternRewriter& rewriter) const override { Value pad_input = pad_op.getOperand(); RankedTensorType pad_type = pad_op.getType().cast<RankedTensorType>();
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 21:59:06 UTC 2024 - 8.6K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/stablehlo/passes/xla_call_module_to_call.cc
class XlaCallModuleOpToCallOp : public OpRewritePattern<TF::XlaCallModuleOp> { public: explicit XlaCallModuleOpToCallOp(MLIRContext* context) : OpRewritePattern<TF::XlaCallModuleOp>(context) {} LogicalResult matchAndRewrite(TF::XlaCallModuleOp op, PatternRewriter& rewriter) const override { auto module_op = op->getParentOfType<ModuleOp>(); SymbolTable symbol_table(module_op);
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 04 20:02:00 UTC 2024 - 3.1K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/stablehlo/passes/bridge/convert_tf_quant_types.cc
class TFQuantTypePattern : public ConversionPattern { public: TFQuantTypePattern(MLIRContext *ctx, TypeConverter &converter) : ConversionPattern(converter, MatchAnyOpTypeTag(), 1, ctx) {} LogicalResult matchAndRewrite( Operation *op, ArrayRef<Value> operands, ConversionPatternRewriter &rewriter) const override { // This pattern only handle non-UQ, non-const ops.
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 12.6K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/lower_tf.cc
public: explicit LowerAddNOp(MLIRContext *context) : RewritePattern(AddNOp::getOperationName(), 1, context, {AddV2Op::getOperationName()}) {} LogicalResult matchAndRewrite(Operation *op, PatternRewriter &rewriter) const override { auto addn_op = cast<AddNOp>(op); // TODO(hinsu): Support variant with TensorList type. tf.AddV2 doesn't
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 74.9K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/transforms/prepare_quantize_helper.h
template <typename SourceOp> class PrepareLstmOutputScale : public OpRewritePattern<SourceOp> { public: explicit PrepareLstmOutputScale(MLIRContext* context) : OpRewritePattern<SourceOp>(context) {} LogicalResult matchAndRewrite(SourceOp op, PatternRewriter& rewriter) const override { operator_property::OpVariant lstm_variant; operator_property::OperatorProperty lstm_property;
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri May 03 18:01:23 UTC 2024 - 28K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/stablehlo/transforms/unfuse_batch_norm_pass.cc
} class UnfuseBatchNormTrainingPattern : public OpRewritePattern<mhlo::BatchNormTrainingOp> { public: using OpRewritePattern<mhlo::BatchNormTrainingOp>::OpRewritePattern; LogicalResult matchAndRewrite(mhlo::BatchNormTrainingOp bn_op, PatternRewriter &rewriter) const override { auto inputs = bn_op.getOperand(); auto input_type = mlir::dyn_cast<RankedTensorType>(inputs.getType());
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 11.2K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/stablehlo/passes/convert_func_to_bfloat16.cc
public: BFloat16TypePattern(TypeConverter& converter, MLIRContext* ctx) : ConversionPattern(converter, MatchAnyOpTypeTag(), /*benefit=*/1, ctx) {} LogicalResult matchAndRewrite( Operation* op, const ArrayRef<Value> operands, ConversionPatternRewriter& rewriter) const override { if (getTypeConverter()->isLegal(op)) { return failure(); }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 9.3K bytes - Viewed (0) -
tensorflow/compiler/mlir/tf2xla/transforms/legalize_tf_collective.cc
class ConvertXlaAllReduce : public CollectiveRewritePattern<TF::XlaAllReduceOp> { public: using CollectiveRewritePattern::CollectiveRewritePattern; LogicalResult matchAndRewrite(TF::XlaAllReduceOp all_reduce, PatternRewriter& rewriter) const override { DenseIntElementsAttr replica_groups; if (failed(ConvertReplicaGroups(rewriter, all_reduce.getGroupAssignment(),
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 16K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/stablehlo/transforms/legalize_hlo.cc
} } template <int num_spatial_dims> class ConvertNdConvOp : public OpConversionPattern<mhlo::ConvolutionOp> { public: using OpConversionPattern::OpConversionPattern; LogicalResult matchAndRewrite( mhlo::ConvolutionOp conv_op, OpAdaptor adaptor, ConversionPatternRewriter& rewriter) const final { SetDefaultConvAttributes(conv_op, rewriter); if (!IsSupportedConvOp(conv_op)) {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 154.9K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/transforms/optimize_batch_matmul.cc
// constant tensor with rank 2 struct ConvertBatchMatMulOp2FullyConnectedOp : public OpRewritePattern<TFL::BatchMatMulOp> { using OpRewritePattern<TFL::BatchMatMulOp>::OpRewritePattern; LogicalResult matchAndRewrite(TFL::BatchMatMulOp bmm_op, PatternRewriter& rewriter) const override { DenseElementsAttr constant; if (auto rhs = bmm_op.getY(); !matchPattern(rhs, m_Constant(&constant))) {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 9.6K bytes - Viewed (0)