- Sort Score
- Result 10 results
- Languages All
Results 31 - 40 of 53 for m_Constant (0.25 sec)
-
tensorflow/compiler/mlir/lite/utils/utils.td
"TFL::AreLastTwoDimsTransposed($0)">>; // Checks if the param passed is of NoneType. def IsNoneType : Constraint<CPred<"$0.getType().isa<NoneType>()">>; def ConstantLikePred : CPred<"::mlir::matchPattern($0, ::mlir::m_Constant())">; def IsConstantLike : Constraint<ConstantLikePred>;
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/lite/transforms/post_quantize.cc
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(); if (!mlir::isa<quant::UniformQuantizedType>( (getElementTypeOrSelf(op.getOutput().getType())))) 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/common/outline_operations.cc
namespace mlir { 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/transforms/optimize_functional_ops.cc
rewriter.eraseOp(op.getOperation()); return success(); } // Extract the constant cond value. DenseElementsAttr cond; if (!matchPattern(op.getCond(), m_Constant(&cond))) return failure(); // TODO(hinsu): Handle constants that are not scalar booleans. auto cond_type = mlir::dyn_cast<RankedTensorType>(cond.getType()); if (!cond_type || !cond_type.getShape().equals({}) ||
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/utils/attribute_utils.h
Operation *op = result.getOwner(); if (!isa<IdentityOp>(op) && !isa<IdentityNOp>(op)) break; val = op->getOperand(result.getResultNumber()); } return matchPattern(val, m_Constant(&attr)); } // Checks if both compilation and replication attributes are present in the // operation, and if their values are valid. LogicalResult HasValidCompilationAndReplicationAttributes(Operation &op);
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed May 22 19:47:48 UTC 2024 - 8.7K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/transforms/prepare_quantize_helper.h
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri May 03 18:01:23 UTC 2024 - 28K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/tensorflow/passes/prepare_quantize_drq.cc
const bool is_per_channel_quantization = enable_per_channel_quantization_ && quant_dim != -1; QuantizedType quant_type; DenseFPElementsAttr attr; if (!matchPattern(op->getResult(0), m_Constant(&attr))) return false; if (attr.size() < quant_specs_.minimum_elements_for_weights) { op->emitRemark("Quantization is skipped for ") << quantized_op->getName().getStringRef().str() << " because it has "
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 11.5K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/transforms/lower_static_tensor_list.cc
: op.emitOpError(error_info); } } } DenseIntElementsAttr dense_elem_attr; if (matchPattern(element_shape, m_Constant(&dense_elem_attr))) { // Note: It's technically unsafe to rewrite // TensorListReserve(num_element, element_shape) // to // Fill(Concat(num_element, element_shape), 0)
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue Jun 11 20:00:43 UTC 2024 - 70.7K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/stablehlo/passes/insert_weight_param.cc
} void rewrite(Operation* op, PatternRewriter& rewriter) const override { Operation* quantizable_op = *op->getUsers().begin(); DenseFPElementsAttr attr; matchPattern(op->getResult(0), m_Constant(&attr)); Method method = GetQuantizationMethodOrDefault(quantizable_op); const WeightOnlyPtq& weight_only_ptq = method.weight_only_ptq(); Type weight_type; if (IsPerTensor(weight_only_ptq)) {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu May 09 05:56:10 UTC 2024 - 10.2K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/transforms/quantize.cc
LogicalResult matchAndRewrite(QuantizeOp op, PatternRewriter& rewriter) const override { DenseFPElementsAttr attr; if (matchPattern(op.getInput(), m_Constant(&attr))) { auto qtype = op.getQtypeAttr(); Attribute quantized_attr; if (legacy_float_scale_) { quantized_attr = quant::QuantizeLegacy(attr, qtype.getValue()); } else {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed Apr 24 20:30:06 UTC 2024 - 13.3K bytes - Viewed (0)