- Sort Score
- Result 10 results
- Languages All
Results 41 - 50 of 55 for getDefiningOp (0.25 sec)
-
tensorflow/compiler/mlir/quantization/stablehlo/passes/merge_fusion_with_dequantize.cc
func_op.getRegion().getBlocks().front().getTerminator()); if (!return_op) return failure(); auto req_op = llvm::dyn_cast_or_null<mlir::stablehlo::UniformQuantizeOp>( return_op.getOperands()[0].getDefiningOp()); if (!req_op) return failure(); // Create a new func.call op with f32 output. auto new_call_op = call_op.clone(); new_call_op->getResult(0).setType(
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 5.9K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/common/ir/QuantOps.cc
>(); } OpFoldResult StorageCastOp::fold(FoldAdaptor) { // Matches x -> [scast -> scast] -> y, replacing the second scast with the // value of x if the casts invert each other. auto srcScastOp = getArg().getDefiningOp<StorageCastOp>(); if (!srcScastOp || srcScastOp.getArg().getType() != getType()) return OpFoldResult(); return srcScastOp.getArg(); } /// The quantization specification should match the expressed type.
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 5.3K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/quantization/ir/QuantOps.cc
>(); } OpFoldResult StorageCastOp::fold(FoldAdaptor) { // Matches x -> [scast -> scast] -> y, replacing the second scast with the // value of x if the casts invert each other. auto srcScastOp = getArg().getDefiningOp<StorageCastOp>(); if (!srcScastOp || srcScastOp.getArg().getType() != getType()) return OpFoldResult(); return srcScastOp.getArg(); } /// The quantization specification should match the expressed type.
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 5.3K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/utils/utils.td
// of our files will have access to `OpHasSameStaticShapes` when including files // generated from table-gen. def OpHasSameStaticShapesPred : CPred<"OpHasSameStaticShapes($0.getDefiningOp())">; def OpHasSameStaticShapes : Constraint<OpHasSameStaticShapesPred, "op must have static same input shapes">; def OpHasNotSameStaticShapes : Constraint<Neg<OpHasSameStaticShapesPred>, "op must have not static same input shapes">;
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue Apr 30 00:40:15 UTC 2024 - 4.8K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/stablehlo/passes/post_quantize.cc
LogicalResult matchAndRewrite(quantfork::DequantizeCastOp op, PatternRewriter& rewriter) const override { auto input_op = op.getArg().getDefiningOp(); if (auto q = llvm::dyn_cast_or_null<quantfork::QuantizeCastOp>(input_op)) { if (!q->getAttr(kVolatileOpAttrName)) return failure(); // If the quantize op is a requantize op, it is being used in other scale
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue Mar 05 07:39:40 UTC 2024 - 6.3K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/fold_broadcast.cc
for (uint64_t i = 0, e = op->getNumOperands(); i < e; ++i) { // Check that the i'th operand is a broadcast. auto broadcast = llvm::dyn_cast_or_null<TF::BroadcastToOp>( op->getOpOperand(i).get().getDefiningOp()); if (!broadcast) continue; // Check that the operand of the broadcast has fully defined shape. auto broadcast_arg_type = mlir::dyn_cast_or_null<RankedTensorType>(
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 7.9K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/mark_input_output_aliases.cc
} alias_info.output_index = result.getResultNumber(); } for (auto& operand : cluster_func->getOpOperands()) { auto read_op = llvm::dyn_cast_or_null<TF::ReadVariableOp>( operand.get().getDefiningOp()); if (!read_op) continue; if (!read_op->hasOneUse()) continue; auto it = resource_alias_info_map.find(read_op.getResource()); if (it == resource_alias_info_map.end()) continue;
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue Mar 05 04:14:26 UTC 2024 - 7.5K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/experimental/tac/transforms/device_transform.cc
LogicalResult matchAndRewrite(TFL::DequantizeOp dequant_op, PatternRewriter& rewriter) const override { // We only fold i32 -> float pattern. auto input = dequant_op.getInput().getDefiningOp(); if (!input) return failure(); auto input_dequant = llvm::dyn_cast_or_null<TFL::QConstOp>(input); if (!input_dequant) return failure();
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 8.4K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/stablehlo/passes/prepare_quantize.cc
private: LogicalResult matchAndRewrite(quantfork::QuantizeCastOp q_op, PatternRewriter& rewriter) const override { auto preceding_qcast = q_op.getArg().getDefiningOp<quantfork::QuantizeCastOp>(); if (!preceding_qcast) return failure(); auto new_qcast = rewriter.create<quantfork::QuantizeCastOp>( q_op.getLoc(), q_op.getType(), preceding_qcast.getArg());
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed Apr 03 05:11:03 UTC 2024 - 8.1K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/utils/convert_type.cc
if (shaped_type) { return shaped_type.getElementType(); } else { return type; } } bool NotFromQuantOpOrSameQuantType(mlir::Value val, mlir::TypeAttr qtype_attr) { auto val_defn_op = val.getDefiningOp(); mlir::TFL::QuantizeOp q_op = llvm::dyn_cast_or_null<mlir::TFL::QuantizeOp>(val_defn_op); if (!q_op) return true; // Ignore shape details - we're really only trying to
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue May 07 23:04:40 UTC 2024 - 8.2K bytes - Viewed (0)