- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 57 for m_Constant (0.12 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/tensorflow/ir/tf_ops_n_z.cc
if (!(matchPattern(op.getWindowStrides(), m_Constant(&window_strides_attr)) && matchPattern(op.getPadding(), m_Constant(&padding_attr)) && matchPattern(op.getLhsDilation(), m_Constant(&lhs_dilation_attr)) && matchPattern(op.getRhsDilation(), m_Constant(&rhs_dilation_attr)) && matchPattern(op.getFeatureGroupCount(), m_Constant(&feature_group_count_attr)))) return success();
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu May 09 22:07:10 UTC 2024 - 170.8K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/transforms/optimize.cc
if (!matchPattern(gather_nd_first.getIndices(), m_Constant(&indices))) return failure(); int i = 0; for (const auto &axis_int : indices.getValues<APInt>()) { const int64_t axis = axis_int.getSExtValue(); if (axis != i / 2) return failure(); ++i; } if (!matchPattern(gather_nd_second.getIndices(), m_Constant(&indices))) return failure(); i = 0;
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/lite/utils/utils.h
SmallVector<int32_t> initial_permutation; DenseElementsAttr perm1_const; SmallVector<int32_t> new_permutation; if (matchPattern(permutation1, m_Constant(&perm1_const))) { for (int32_t idx = 0; idx < perm1_const.getNumElements(); ++idx) { initial_permutation.push_back(idx); } for (auto perm : perm2_const.getValues<APInt>()) {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue Apr 30 00:40:15 UTC 2024 - 11.6K 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/lite/transforms/dilated_conv.h
// a dilated conv. auto stb_paddings = stb_op.getPaddings(); auto bts_crops = bts_op.getCrops(); ElementsAttr stb_paddings_attr, bts_crops_attr; if (!matchPattern(stb_paddings, m_Constant(&stb_paddings_attr)) || !matchPattern(bts_crops, m_Constant(&bts_crops_attr))) { return rewriter.notifyMatchFailure( op, "either SpaceToBatchND or BatchToSpaceND " "doesn't have constant padding/crops value"); }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 20K bytes - Viewed (0) -
tensorflow/compiler/mlir/tfr/ir/tfr_ops.cc
Location loc = cst_tensor_op.getLoc(); Type out_type = cst_tensor_op.getType(); Operation *new_cst = nullptr; ArrayAttr array; if (matchPattern(cst_tensor_op.getArg(), m_Constant(&array))) { llvm::DenseSet<Type> all_types; for (auto it : array) { TypedAttr typed_attr = it.dyn_cast<TypedAttr>(); if (!typed_attr) 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/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/transforms/legalize_tf.cc
ElementsAttr k; if (!matchPattern(tf_matrix_diag_v2_or_v3_op.getK(), m_Constant(&k))) return false; if (ExtractSingleElementAsInteger(k).getInt() != 0) return false; // Extract num_rows constant tensor and check value = -1. ElementsAttr num_rows; if (!matchPattern(tf_matrix_diag_v2_or_v3_op.getNumRows(), m_Constant(&num_rows))) 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)