- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 12 for ConvolutionOp (0.14 sec)
-
tensorflow/compiler/mlir/quantization/stablehlo/passes/nchw_convolution_to_nhwc.cc
// * Dst dimension numbers: [b, 0, 1, f]x[0, 1, i, o]->[b, 0, 1, f] class RewriteNchwConvolutionToNhwc : public OpRewritePattern<mlir::stablehlo::ConvolutionOp> { public: using OpRewritePattern<mlir::stablehlo::ConvolutionOp>::OpRewritePattern; LogicalResult match(mlir::stablehlo::ConvolutionOp op) const override { // Handles 2D convolutions only. if (!HasRankOf(op.getOperand(0), /*rank=*/4) ||
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 8.2K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/stablehlo/transforms/fuse_convolution_pass.cc
LogicalResult matchAndRewrite(mhlo::MulOp mul_op, PatternRewriter &rewriter) const override { // Variables for capturing values and attributes used while creating ops. mhlo::ConvolutionOp conv_op; Operation *bcast_or_const_op; shape::ShapeOfOp shape_of_op; mhlo::ConstantOp filter; mhlo::ConstantOp multiplier; mlir::ElementsAttr filter_value, mul_value;
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Feb 22 22:21:19 UTC 2024 - 8.3K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/stablehlo/transforms/uniform_quantized_stablehlo_to_tfl_pass.cc
// * Not a depthwise convolution. class RewriteQuantizedConvolutionOp : public OpRewritePattern<stablehlo::ConvolutionOp> { public: using OpRewritePattern<stablehlo::ConvolutionOp>::OpRewritePattern; LogicalResult match(stablehlo::ConvolutionOp op) const override { const bool has_i32_output = IsI32F32UniformQuantizedPerAxisType(GetElementType(op.getResult()));
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Mon Apr 22 09:00:19 UTC 2024 - 99.8K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/stablehlo/passes/bridge/optimize.td
include "tensorflow/compiler/mlir/tensorflow/ir/tf_ops.td" include "mhlo/IR/hlo_ops.td" include "stablehlo/dialect/ChloOps.td" def IsDefinedByConvOrDotGeneralOp : Constraint<Or<[ CPred<"$0.getDefiningOp<mhlo::ConvolutionOp>()">, CPred<"$0.getDefiningOp<mhlo::DotGeneralOp>()">]>>; def IsNull : Constraint<CPred<"!$0">>; // This pattern optimizes: // conv/dot_general + a + b -> conv/dot_general + (a + b)
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Sat Feb 24 02:26:47 UTC 2024 - 2K 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);
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/stablehlo/transforms/compose_uniform_quantized_type_pass.cc
// ``` class ComposeUniformQuantizedConvolutionOp : public OpRewritePattern<stablehlo::ConvolutionOp> { public: using OpRewritePattern<stablehlo::ConvolutionOp>::OpRewritePattern; LogicalResult match(stablehlo::ConvolutionOp op) const final { // Verify operands' types. for (Type operand_type : op.getOperandTypes()) { if (Type element_type =
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 64.6K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/stablehlo/passes/quantization_patterns.cc
if (!quantization_method.has_static_range_ptq()) { return failure(); } return MatchGemmStyleOp<ConvolutionOp>(entry_func_op); } void rewrite(func::FuncOp entry_func_op, const Method& quantization_method, PatternRewriter& rewriter) const override { RewriteGemmStyleOp<ConvolutionOp>( entry_func_op, rewriter, enable_per_channel_quantized_weight_ &&
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri May 03 06:04:36 UTC 2024 - 41.7K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/common/attrs_and_constraints_test.cc
#include "tsl/platform/status_matchers.h" namespace mlir::quant { namespace { using ::mlir::stablehlo::AddOp; using ::mlir::stablehlo::ConstantOp; using ::mlir::stablehlo::ConvolutionOp; using ::mlir::stablehlo::DotGeneralOp; using ::mlir::stablehlo::SubtractOp; using ::testing::ElementsAreArray; using ::testing::Eq; using ::testing::IsEmpty; using ::testing::IsNull; using ::testing::NotNull;
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue May 14 17:10:32 UTC 2024 - 22.9K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/stablehlo/passes/insert_weight_param.cc
const SymbolTable symbol_table(module_op); func::FuncOp func = symbol_table.lookup<func::FuncOp>(function_name); if (function_name.contains("conv")) { return (*(func.getOps<mlir::stablehlo::ConvolutionOp>().begin())) .getDimensionNumbers() .getKernelOutputFeatureDimension(); } else if (function_name.contains("dot_general")) { auto dot = *(func.getOps<mlir::stablehlo::DotGeneralOp>().begin());
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu May 09 05:56:10 UTC 2024 - 10.2K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/stablehlo/passes/passes.td
} def NchwConvolutionToNhwcPass : Pass<"stablehlo-nchw-convolution-to-nhwc", "mlir::func::FuncOp"> { let summary = "Converts stablehlo.convolution op of NCHW format to -> NHWC."; let description = [{ Matches `ConvolutionOp`s with NCHW format and converts it to NHWC format by inserting `TransposeOp`s to input, filter, and output tensors. In terms of dimension numbers, this matches
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue May 14 06:31:57 UTC 2024 - 10.3K bytes - Viewed (0)