- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 25 for m_Constant (0.72 sec)
-
tensorflow/compiler/mlir/lite/transforms/post_quantize.cc
auto qconst_op = llvm::dyn_cast_or_null<QConstOp>(def_op); if (qconst_op == nullptr) return failure(); DenseIntElementsAttr perm_tensor; if (!matchPattern(op.getPerm(), m_Constant(&perm_tensor))) return failure(); if (!mlir::isa<quant::UniformQuantizedType>( (getElementTypeOrSelf(op.getOutput().getType())))) return failure();
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 17.1K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/transforms/prepare_quantize_helper.h
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/quantization/tensorflow/passes/prepare_quantize_drq.cc
const bool is_per_channel_quantization = enable_per_channel_quantization_ && quant_dim != -1; QuantizedType quant_type; DenseFPElementsAttr attr; if (!matchPattern(op->getResult(0), m_Constant(&attr))) return false; if (attr.size() < quant_specs_.minimum_elements_for_weights) { op->emitRemark("Quantization is skipped for ") << quantized_op->getName().getStringRef().str() << " because it has "
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 11.5K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/stablehlo/passes/insert_weight_param.cc
} void rewrite(Operation* op, PatternRewriter& rewriter) const override { Operation* quantizable_op = *op->getUsers().begin(); DenseFPElementsAttr attr; matchPattern(op->getResult(0), m_Constant(&attr)); Method method = GetQuantizationMethodOrDefault(quantizable_op); const WeightOnlyPtq& weight_only_ptq = method.weight_only_ptq(); Type weight_type; if (IsPerTensor(weight_only_ptq)) {
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/lite/transforms/quantize.cc
LogicalResult matchAndRewrite(QuantizeOp op, PatternRewriter& rewriter) const override { DenseFPElementsAttr attr; if (matchPattern(op.getInput(), m_Constant(&attr))) { auto qtype = op.getQtypeAttr(); Attribute quantized_attr; if (legacy_float_scale_) { quantized_attr = quant::QuantizeLegacy(attr, qtype.getValue()); } else {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed Apr 24 20:30:06 UTC 2024 - 13.3K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/transforms/while_loop_outline.cc
// Sink down constants (including quantized constant) into the functions. for (auto extern_value : region_extern_values) { if (!matchPattern(extern_value, m_Constant()) && !llvm::dyn_cast_or_null<TFL::QConstOp>( extern_value.getDefiningOp())) { extern_values.insert(extern_value); continue; }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 11.8K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/tensorflow/passes/prepare_lifting.cc
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/quantization/tensorflow/passes/preprocess_op.cc
int weight_operand_idx = *operands.begin(); Operation* weight_op = op.getOperand(weight_operand_idx).getDefiningOp(); DenseFPElementsAttr attr; if (!matchPattern(weight_op->getResult(0), m_Constant(&attr))) { return failure(); } // Get new shape. llvm::ArrayRef<int64_t> cur_shape = attr.getType().getShape(); int cur_rank = cur_shape.size();
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 11.4K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/stablehlo/passes/bridge/convert_tf_quant_types.cc
ConversionPatternRewriter &rewriter) const override { if (!IsIllegalType(op.getOutput().getType())) return failure(); TF::TensorProtoAttr tensor_proto_attr; if (!matchPattern(op.getOperation(), m_Constant(&tensor_proto_attr))) { return rewriter.notifyMatchFailure(op, "operand must be constant."); } auto dense_attr_or = GetDenseAttrFromTensorProtoAttr( tensor_proto_attr.getValue(),
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/lite/transforms/reduce_while_operands.cc
if (consumed_ops.contains(def_op)) continue; queue.push_back(def_op); consumed_ops.insert(def_op); } } } inline bool IsConstant(Operation *op) { return matchPattern(op, m_Constant()); } bool AllOperationSafe(Block &block) { auto walk_result = block.walk([&](Operation *op) { // op has SideEffect. if (!isa_and_nonnull<TFL::WhileOp>(op) &&
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 10.4K bytes - Viewed (0)