- Sort Score
- Result 10 results
- Languages All
Results 31 - 40 of 43 for DenseFPElementsAttr (0.2 sec)
-
tensorflow/compiler/mlir/quantization/tensorflow/passes/prepare_lifting.cc
Value new_value = builder.create<TF::MulOp>(loc, float_value, multiplier); auto new_value_type = mlir::cast<TensorType>(new_value.getType()); // Get multiplier value in double. DenseFPElementsAttr multiplier_attr; if (!matchPattern(multiplier, m_Constant(&multiplier_attr)) || mlir::cast<ShapedType>(multiplier_attr.getType()).getRank() > 1) { return {}; } std::vector<double> multiplier_values;
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri May 17 17:58:54 UTC 2024 - 13.3K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/transforms/optimize.cc
// operand if necessary. DenseFPElementsAttr cst; if (!matchPattern(binary_op->getOperand(1), m_Constant(&cst))) return failure(); if (cst.getNumElements() != 1) return failure(); APFloat cst_value = *cst.value_begin<APFloat>(); // Affine op. Value filter = fc_op.getFilter(); Value bias = fc_op.getBias(); DenseFPElementsAttr filter_cst, bias_cst;
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue Apr 30 00:40:15 UTC 2024 - 102.3K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/tensorflow/passes/quantize_composite_functions.cc
TensorType scale_type = RankedTensorType::get({}, rewriter.getF32Type()); TensorType zero_point_type = scale_type.clone(rewriter.getI32Type()); scale = rewriter.create<TF::ConstOp>( loc, scale_type, DenseFPElementsAttr::get(scale_type, {static_cast<float>(qtype.getScale())})); zero_point = rewriter.create<TF::ConstOp>( loc, zero_point_type, DenseIntElementsAttr::get(zero_point_type,
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 54.5K bytes - Viewed (0) -
tensorflow/compiler/mlir/tfr/ir/tfr_ops.cc
// and filter_scale. return failure(); } auto in_scale_op = in_scales_op.getOperand(0).getDefiningOp<CastOp>(); if (!in_scale_op) { return failure(); } DenseFPElementsAttr in_scale_attr; if (!matchPattern(in_scale_op.getArg(), m_Constant(&in_scale_attr)) || in_scale_attr.size() != 1) { return failure(); }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue Nov 21 16:55:41 UTC 2023 - 38.2K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/stablehlo/transforms/legalize_hlo.cc
&data_format)) { return rewriter.notifyMatchFailure( div_op, "not the root of spatial pooling without dilation"); } DenseFPElementsAttr divisor; auto div_rhs = recursivelyWalkUp<mhlo::BroadcastInDimOp>(div_op.getRhs()); if (matchPattern(div_rhs, m_Constant(&divisor))) {
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/tfr/passes/raise_to_tf.cc
if (!attr_type) return attr; if (attr_type.getValue() == "tensor") { if (auto f = mlir::dyn_cast<FloatAttr>(attr)) { RankedTensorType type = RankedTensorType::get({}, f.getType()); return DenseFPElementsAttr::get(type, attr); } // TODO(fengliuai): handles ArrayAttr. Note that it can be nested ArrayAttr. } return attr; }
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/stablehlo/passes/bridge/convert_tf_quant_ops_to_mhlo.cc
int64_t storage_type_min, int64_t storage_type_max, int64_t quantized_dimension, PatternRewriter &rewriter) { // Check whether the scales operand has constant op. DenseFPElementsAttr scales; if (!matchPattern(scales_value, m_Constant(&scales))) { return rewriter.notifyMatchFailure(op, "scales must be constant"); } // Check whether the zero_points operand has constant op.
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri May 17 17:58:54 UTC 2024 - 30.9K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/experimental/tac/transforms/device_transform_patterns.cc
mlir::RankedTensorType::get({num_units}, output_type.getElementType()); mlir::DenseElementsAttr bias_attr; if (output_type.getElementType().isF32()) { float val = 0.0; bias_attr = mlir::DenseFPElementsAttr::get(bias_type, val); } else { // TODO(renjieliu): Refactor this and share the logic with // CreateConstOpWithSingleValue. Also, make sure it works with QConst. return failure(); }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 25.4K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/flatbuffer_import.cc
mlir::ElementsAttr layer_stats = mlir::DenseFPElementsAttr::get( tensorflow::GetTypeFromTFTensorShape({2}, b.getF32Type()), {min_maxs[0], min_maxs[1]}); mlir::ElementsAttr axis_stats; mlir::IntegerAttr axis; if (mins.size() > 1) { llvm::SmallVector<int64_t, 4> axis_stats_shape{ static_cast<int64_t>(mins.size()), 2}; axis_stats = mlir::DenseFPElementsAttr::get(
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue May 21 18:21:50 UTC 2024 - 66.8K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/transforms/legalize_tf.cc
mlir::Type element_type = mlir::cast<ShapedType>(padding_value.getType()).getElementType(); if (mlir::isa<FloatType>(element_type)) { DenseFPElementsAttr padding_attr; if (!matchPattern(padding_value, m_Constant(&padding_attr)) || !padding_attr.isSplat() || !padding_attr.getSplatValue<APFloat>().isZero()) { return false; }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Mon May 20 20:06:54 UTC 2024 - 45.2K bytes - Viewed (0)