- Sort Score
- Result 10 results
- Languages All
Results 41 - 50 of 100 for matchAndRewrite (0.91 sec)
-
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) -
tensorflow/compiler/mlir/lite/stablehlo/transforms/legalize_tf_xla_call_module_to_stablehlo_pass.cc
class RemoveCustomCallWithSharding : public OpRewritePattern<stablehlo::CustomCallOp> { using OpRewritePattern<stablehlo::CustomCallOp>::OpRewritePattern; LogicalResult matchAndRewrite(stablehlo::CustomCallOp op, PatternRewriter &rewriter) const override { // Removes the custom call with sharding op if the operand type is the // same as the result type.
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Jan 25 09:43:18 UTC 2024 - 10.9K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/stablehlo/transforms/smuggle_disallowed_ops.cc
return success(); } } // namespace template <typename OpTy> class SmuggleOpPattern : public OpRewritePattern<OpTy> { public: using OpRewritePattern<OpTy>::OpRewritePattern; LogicalResult matchAndRewrite(OpTy op, PatternRewriter& rewriter) const override { return SmuggleOp(op, rewriter); } }; class SmuggleDisallowedOpsPass : public PassWrapper<SmuggleDisallowedOpsPass,
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue Mar 19 01:14:04 UTC 2024 - 3.6K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/unroll_batch_matmul.cc
static std::vector<Value> sliceInput(Value value, int batch_size, Location loc, PatternRewriter& rewriter); LogicalResult matchAndRewrite(BatchMatMulOpType op, PatternRewriter& rewriter) const override; }; #define GEN_PASS_DEF_UNROLLBATCHMATMULPASS #include "tensorflow/compiler/mlir/tensorflow/transforms/tf_passes.h.inc"
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 11.6K bytes - Viewed (0) -
tensorflow/compiler/mlir/tfrt/runtime_fallback/runtime_fallback_combine.cc
// argument is the orchestrator of the sequence of rewrites. The pattern is // expected to interact with it to perform any changes to the IR from here. mlir::LogicalResult matchAndRewrite( mlir::tfd::ConvertTftToDhtOp op, mlir::PatternRewriter& rewriter) const override { // Look through the inputs of the ConvertTftToDhtOp. mlir::Value convert_op_input_0 = op.getOperand(0);
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed Feb 09 12:09:19 UTC 2022 - 3.5K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/batchmatmul_to_einsum.cc
template <typename BatchMatMulOpType> class ConvertTFBatchMatMulToEinsumOp : public OpRewritePattern<BatchMatMulOpType> { using OpRewritePattern<BatchMatMulOpType>::OpRewritePattern; LogicalResult matchAndRewrite(BatchMatMulOpType op, PatternRewriter& rewriter) const override { Value input_lhs = op.getX(); Value input_rhs = op.getY(); // LHS and RHS must be a ranked tensor type
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 3.8K bytes - Viewed (0) -
tensorflow/compiler/mlir/tf2xla/transforms/legalize_tf_with_tf2xla.cc
: ConversionPattern(converter, MatchAnyOpTypeTag(), /*benefit=*/1, ctx), device_type_(device_type), prefer_tf2xla_(prefer_tf2xla) {} LogicalResult matchAndRewrite( Operation* op, ArrayRef<Value> operands, ConversionPatternRewriter& rewriter) const override { // This pattern is a conversion pattern because we want to specify a type
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue May 28 21:49:50 UTC 2024 - 9.7K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/tensorflow/cc/constant_fold.cc
SmallVector<Value> results; if (failed(FoldOperation(builder, op, results))) { return op->getResults(); } return results; } LogicalResult ConstantFoldQuantizableOperands::matchAndRewrite( Operation* op, PatternRewriter& rewriter) const { absl::flat_hash_set<int> quantizable_operands = GetQuantizableOperands(op); if (quantizable_operands.empty()) return failure(); bool has_change = false;
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri May 17 17:58:54 UTC 2024 - 5K bytes - Viewed (0)