- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 69 for ConstantOp (0.13 sec)
-
tensorflow/compiler/mlir/quantization/stablehlo/passes/quantize_weight.cc
// Create new ConstantOp-ConvertOp-Operation sequences. At this moment, // old ConstantOp is guaranteed to have one F32->F16 convert op regardless // of its number of users. rewriter.setInsertionPointAfter(op); // create new F16 constant op in that location ConstantOp new_const = rewriter.create<ConstantOp>( op->getLoc(), new_result_type, new_value_attr);
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/quantization/stablehlo/passes/prepare_quantize.cc
return success(); } }; class ConvertArithConstToStablehloConstOp : public OpRewritePattern<arith::ConstantOp> { public: using OpRewritePattern::OpRewritePattern; LogicalResult matchAndRewrite(arith::ConstantOp op, PatternRewriter& rewriter) const override { rewriter.replaceOpWithNewOp<mlir::stablehlo::ConstantOp>(op, op.getValue());
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed Apr 03 05:11:03 UTC 2024 - 8.1K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/transforms/unfold_large_splat_constant.cc
mlir::OpBuilder op_builder(&module.getBodyRegion()); module.walk([&](mlir::arith::ConstantOp const_op) { MaybeUnfoldLargeSplatConstant(&op_builder, const_op); }); } private: void MaybeUnfoldLargeSplatConstant(mlir::OpBuilder* op_builder, mlir::arith::ConstantOp const_op) const { auto splat_elements_attr =
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 4.5K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/stablehlo/utils/stablehlo_type_utils_test.cc
const OwningOpRef<mlir::stablehlo::ConstantOp> constant_op = builder_.create<mlir::stablehlo::ConstantOp>( builder_.getUnknownLoc(), builder_.getI32IntegerAttr(0)); EXPECT_TRUE(IsStablehloOp(*constant_op)); } TEST_F(StablehloTypeUtilsTest, IsStablehloOpFailsWithArithOp) { const OwningOpRef<mlir::arith::ConstantOp> constant_op = builder_.create<mlir::arith::ConstantOp>(builder_.getUnknownLoc(),
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Mon Mar 25 00:32:20 UTC 2024 - 2.1K bytes - Viewed (0) -
tensorflow/compiler/mlir/tf2xla/transforms/utils.cc
namespace mlir { namespace mhlo { ConstantOp GetScalarConstOfType(Type ty, Location loc, int64_t raw_value, OpBuilder* builder) { return builder->create<ConstantOp>(loc, hlo::getScalarOfType(ty, raw_value)); } ConstantOp GetScalarNegZeroOfType(Type ty, Location loc, OpBuilder* builder) { return builder->create<ConstantOp>(loc, hlo::getScalarNegZeroOfType(ty)); }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed Sep 06 19:12:29 UTC 2023 - 1.8K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/transforms/prepare_quantize_dynamic_range.cc
changed = true; } } return changed; } // Convert ConstantOp-CastOp-Operation sequence into new ConstantOp // -Dequantize-Operation where the new ConstantOp has float16 data type. bool convertToFloat16Constant(PatternRewriter& rewriter, arith::ConstantOp op) const { for (auto connected_op : op.getResult().getUsers()) {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 20.8K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/transforms/reduce_type_precision.cc
// This pattern checks if an i8 arith::ConstantOp tensor has all values within // the INT4 range, i.e. [-8,7] and converts it into i4 if so. This assumes that // the input is sign-extended two's complement. class CheckRangeAndConvertI8ToI4 : public OpRewritePattern<arith::ConstantOp> { public: using OpRewritePattern<arith::ConstantOp>::OpRewritePattern; LogicalResult matchAndRewrite(arith::ConstantOp op,
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 5.4K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/stablehlo/transforms/fuse_convolution_pass.cc
// 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; mlir::DenseIntElementsAttr broadcast_dims; // Match and capture values/attributes. Value lhs = mul_op.getLhs();
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/compose_uniform_quantized_type_pass.cc
Value GetZeroPointsValue() { return call_op_.getOperand(2); } stablehlo::ConstantOp GetZeroPointsConstantOp() { return cast<stablehlo::ConstantOp>(GetZeroPointsValue().getDefiningOp()); } stablehlo::ConstantOp GetInverseScalesConstantOp() { return cast<stablehlo::ConstantOp>(GetInverseScalesValue().getDefiningOp()); } ElementsAttr GetZeroPointsValueAttr() {
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/tensorflow/passes/prepare_quantize_drq.cc
class PrepareDRQQuantizableOp : public OpRewritePattern<arith::ConstantOp> { public: explicit PrepareDRQQuantizableOp(MLIRContext* context, const quant::QuantizationSpecs& quant_specs, OpSet op_set, bool enable_per_channel_quantization) : OpRewritePattern<arith::ConstantOp>(context), quant_specs_(quant_specs),
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 11.5K bytes - Viewed (0)