- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 14 for QConstOp (0.17 sec)
-
tensorflow/compiler/mlir/lite/experimental/tac/transforms/fold_constants_to_subgraph.cc
// ConstOp path. auto type = mlir::cast<ShapedType>(const_op.getType()).getElementType(); if (!type.isInteger(32) && !type.isInteger(64)) return false; } else { // QConstOp path. auto qconst_op = dyn_cast<TFL::QConstOp>(op); auto type = quant::QuantizedType::getQuantizedElementType(qconst_op.getType()); if (type.getStorageTypeIntegralWidth() != 32) { return false; } }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 6.1K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/stablehlo/transforms/uniform_quantized_stablehlo_to_tfl_pass.cc
} void rewrite(stablehlo::AddOp op, PatternRewriter& rewriter) const override { TFL::QConstOp lhs_qconst_op; TFL::QConstOp rhs_qconst_op; auto GetBroadcastedConstOp = [&](Value operand) -> TFL::QConstOp { if (auto broadcast_op = dyn_cast_or_null<stablehlo::BroadcastInDimOp>( operand.getDefiningOp())) {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Mon Apr 22 09:00:19 UTC 2024 - 99.8K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/experimental/tac/transforms/device_transform.cc
func.walk([&](Operation* op) { // TODO(renjieliu): Find a generic way to deal with const ops. if (op->hasTrait<OpTrait::IsTerminator>() || llvm::isa<TFL::QConstOp, TFL::ConstOp>(op) || llvm::isa<TFL::QConstOp, TFL::ConstOp, TF::ConstOp, ConstOp>(op)) return; bool int8_type_observed = false; bool uint8_type_observed = false; for (auto& input : op->getOpOperands()) {
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/lite/transforms/dense_to_sparse.cc
supported_block_size = sparse_op.GetFloatBlockSize(); type = mlir::cast<ShapedType>(dyn_cast<ConstOp>(inst).getType()); } else if (isa<QConstOp>(inst)) { supported_block_size = sparse_op.GetQuantizedBlockSize(); type = mlir::cast<ShapedType>(dyn_cast<QConstOp>(inst).getType()); ratio_threshold = kBlockOverRandomSparsityRatioQuant; } else { continue; }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 16.1K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/transforms/post_quantize.cc
LogicalResult matchAndRewrite(TransposeOp op, PatternRewriter& rewriter) const override { Operation* def_op = op.getInput().getDefiningOp(); 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();
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/experimental/tac/common/utils.h
if (!op) return false; if (llvm::isa<arith::ConstantOp, mlir::func::ConstantOp>(op)) return false; if (op->hasTrait<OpTrait::ConstantLike>()) return false; if (llvm::isa<TFL::ConstOp, TFL::QConstOp>(op)) return false; return true; } // Returns true if 'op' is a terminator op, otherwise false. bool IsTerminatorOp(Operation* op); // Returns true if 'op' is not TFL Quant / Dequant op. Returns False otherwise
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 3.5K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/transforms/split_merged_operands.cc
// We can only clone the constant op or const->dequantize combo. The latter // case is useful for float16 quantization. Since all ops have been // legalized to tflite ops, so we only care about ConstOp or QConstOp or // mlir constant op. Operation* input_op = operand.getDefiningOp(); if (input_op == nullptr) return failure(); Attribute attr; if (matchPattern(input_op, 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/experimental/common/outline_operations.cc
namespace TFL { namespace common { bool IsConstantOrNone(Operation* op) { return (op->getNumResults() == 1 && mlir::isa<NoneType>(op->getResult(0).getType())) || matchPattern(op, m_Constant()) || isa<QConstOp>(op); } // Pre-order traverse, adding results and BlockArgs to `been_defined` and // collecting operands not contained within `been_defined`. If we encounter an
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 8.5K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/experimental/tac/execution_metadata_exporter.cc
namespace tflite { namespace { bool IsConst(mlir::Operation* op) { return llvm::isa<mlir::arith::ConstantOp, mlir::TF::ConstOp, mlir::TFL::ConstOp, mlir::TFL::QConstOp>(op); } bool IsOpSupported(mlir::Operation* op, const std::string& hardware) { auto* devce_hardware = mlir::TFL::tac::GetTargetHardware(hardware); if (devce_hardware == nullptr) return {};
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue Jun 11 06:11:34 UTC 2024 - 7.5K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/transforms/quantize.cc
} else { quantized_attr = quant::Quantize(attr, qtype.getValue()); } if (quantized_attr) { rewriter.replaceOpWithNewOp<QConstOp>(op, qtype, quantized_attr); return success(); } } return failure(); } private: bool legacy_float_scale_; };
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed Apr 24 20:30:06 UTC 2024 - 13.3K bytes - Viewed (0)