- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 19 for m_Constant (0.24 sec)
-
tensorflow/compiler/mlir/tensorflow/transforms/rewrite_util.h
DenseFPElementsAttr float_attr; if (matchPattern(value, m_Constant(&float_attr)) && float_attr.isSplat() && float_attr.getSplatValue<APFloat>().isExactlyValue(raw_value)) return true; } else if (mlir::isa<IntegerType>(element_type)) { DenseIntElementsAttr int_attr; if (matchPattern(value, m_Constant(&int_attr)) && int_attr.isSplat() && int_attr.getSplatValue<APInt>() == raw_value)
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed May 22 19:47:48 UTC 2024 - 4K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/transforms/optimize_batch_matmul.cc
LogicalResult matchAndRewrite(TFL::BatchMatMulOp bmm_op, PatternRewriter& rewriter) const override { DenseElementsAttr constant; if (auto rhs = bmm_op.getY(); !matchPattern(rhs, m_Constant(&constant))) { // The constant may be preceded by QDQs in models with QDQ format, so we // should set it to the real constant. auto dq = dyn_cast_or_null<DequantizeOp>(rhs.getDefiningOp());
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 9.6K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/quantization/tensorflow/tf_to_quant.cc
id2.replaceAllUsesWith(id2.getInput()); max = tf_op.getMax(); rewriter.eraseOp(id2); } if (!matchPattern(min, m_Constant(&min_value))) return failure(); if (!matchPattern(max, m_Constant(&max_value))) return failure(); int quant_dim = -1; if (PerAxis) { // This is a special case that the quant_dim is the last dimensions
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 8.1K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/tensorflow/utils/fake_quant_utils.h
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 6.3K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/stablehlo/transforms/legalize_hlo_conversions/reduce.h
if (!matchPattern(reduce_op.getInitValues().front(), m_Constant(&operand_init))) return failure(); if (!IsValueInitValue(operand_init)) return failure(); // Check that the iota init is zero. DenseElementsAttr iota_init; if (!matchPattern(reduce_op.getInitValues().back(), m_Constant(&iota_init))) return failure(); if (iota_init.getValues<APInt>()[0] != 0) return failure();
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 5.7K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/transforms/split_merged_operands.cc
if (matchPattern(input_op, m_Constant(&attr))) { // Constant case. builder->setInsertionPoint(op); Operation* duplicated_input_op = builder->clone(*input_op); // Rewire the inputs. op->setOperand(index, duplicated_input_op->getResult(0)); } else if (auto dq = dyn_cast<DequantizeOp>(input_op); dq && matchPattern(dq.getInput(), m_Constant(&attr))) {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed Apr 24 20:30:06 UTC 2024 - 5.9K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/utils/fake_quant_utils.h
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 6.6K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/ir/tf_ops_tensor_helper.cc
// routine uses the constant op's attribute to get the actual shape. RankedTensorType GetRankedTensorTypeForOperand(Value operand) { DenseElementsAttr attr; if (matchPattern(operand, m_Constant(&attr))) { return mlir::dyn_cast<RankedTensorType>(attr.getType()); } return mlir::dyn_cast<RankedTensorType>(operand.getType()); }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 6.7K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/ir/tf_arith_ops_folder.cc
auto input_type = mlir::dyn_cast<RankedTensorType>(input.getType()); if (!input_type) return success(); int64_t rank = input_type.getRank(); DenseIntElementsAttr dims_attr; if (!matchPattern(dims, m_Constant(&dims_attr))) return success(); for (const auto &dim_pair : llvm::enumerate(dims_attr)) { int64_t cur_dim = dim_pair.value().getSExtValue(); if (cur_dim < -rank || cur_dim >= rank) return emitError(loc)
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 3K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/init_text_file_to_import_test_pass.cc
for (auto op : constant_ops) { ShapedType shaped_type = RankedTensorType::get({1}, StringType::get(context)); DenseStringElementsAttr attr; if (!matchPattern(op.getOperation(), m_Constant(&attr))) { continue; } ArrayRef<StringRef> values = attr.getRawStringData(); if (values.size() != 1 || values[0] != "%FILE_PLACEHOLDER") { continue; }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue Oct 04 09:19:38 UTC 2022 - 5.5K bytes - Viewed (0)