- Sort Score
- Result 10 results
- Languages All
Results 41 - 50 of 53 for m_Constant (0.12 sec)
-
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) -
tensorflow/compiler/mlir/lite/stablehlo/transforms/legalize_hlo.cc
// `SplatValueType` can be `APInt` or `APFloat`. template <typename SplatValueType> LogicalResult GetConstantSplatValue(Value value, SplatValueType& splat_value) { DenseElementsAttr attr; if (!matchPattern(value, m_Constant(&attr)) || !attr.isSplat()) { return failure(); } splat_value = attr.getSplatValue<SplatValueType>(); return success(); }
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/quantization/common/quantization_lib/quantization_utils.h
// The input of this QuantizeOp has already been quantized, i.e. // rescale. return failure(); } DenseFPElementsAttr attr; if (matchPattern(quantize_operand, m_Constant(&attr))) { // Const-> QuantizeOp pattern will be handled separately. return failure(); } if (Operation* quantizing_op = quantize_operand.getDefiningOp()) {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed Apr 24 20:30:06 UTC 2024 - 41.7K bytes - Viewed (0) -
tensorflow/compiler/mlir/tf2xla/transforms/tf2xla_rewriter.cc
xla::TypeToShape(operand.getType()), std::to_string(operand_index)); if (defining_op && matchPattern(defining_op, m_Constant(&const_attr))) { tensorflow::Tensor tensor; auto status = tensorflow::ConvertToTensor(const_attr, &tensor); if (!status.ok()) { op->emitRemark() << "skipping legalization due to failed const conversion"
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu May 02 09:16:07 UTC 2024 - 18.9K bytes - Viewed (0) -
tensorflow/compiler/mlir/tfr/passes/raise_to_tf.cc
Attribute arg_value; // A failure indicates the argument isn't a constant value, so we should // not use it as an attribute. if (!matchPattern(input, m_Constant(&arg_value))) { return failure(); } auto attr_name = signature.getArgAttrOfType<StringAttr>( operand.index(), kAttrArgumentNameAttr); auto attr_type = signature.getArgAttrOfType<StringAttr>(
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/tensorflow/transforms/region_control_flow_to_functional.cc
getUsedValuesDefinedAbove(*region, region_extern_values); // Sink down constants into the functions. for (auto extern_value : region_extern_values) { if (!matchPattern(extern_value, m_Constant())) { extern_values.insert(extern_value); continue; } // Add constant at start of region. auto const_builder = OpBuilder::atBlockBegin(®ion->front());
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 28.7K bytes - Viewed (0)