- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 38 for MatchPattern (0.35 sec)
-
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 ")
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/prepare_quantize_helper.h
auto type = mlir::dyn_cast<ShapedType>(const_op->getResult(0).getType()); if (!type || !mlir::isa<FloatType>(type.getElementType())) return success(); DenseFPElementsAttr attr; if (!matchPattern(const_op->getResult(0), m_Constant(&attr))) { const_op->emitError("Not a constant op."); return failure(); } UniformQuantizedType quant_type = nullptr;
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/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;
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
legacy_float_scale_(legacy_float_scale) {} 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());
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed Apr 24 20:30:06 UTC 2024 - 13.3K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/tensorflow/passes/prepare_lifting.cc
auto new_value_type = mlir::cast<TensorType>(new_value.getType()); // Get multiplier value in double. DenseFPElementsAttr multiplier_attr; if (!matchPattern(multiplier, m_Constant(&multiplier_attr)) || mlir::cast<ShapedType>(multiplier_attr.getType()).getRank() > 1) { return {}; } std::vector<double> multiplier_values;
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri May 17 17:58:54 UTC 2024 - 13.3K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/transforms/while_loop_outline.cc
getUsedValuesDefinedAbove(*it.value(), region_extern_values); // Sink down constants (including quantized constant) into the functions. for (auto extern_value : region_extern_values) { if (!matchPattern(extern_value, m_Constant()) && !llvm::dyn_cast_or_null<TFL::QConstOp>( extern_value.getDefiningOp())) { extern_values.insert(extern_value); continue; }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 11.8K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/tensorflow/passes/preprocess_op.cc
if (operands.size() != 1) return failure(); int weight_operand_idx = *operands.begin(); Operation* weight_op = op.getOperand(weight_operand_idx).getDefiningOp(); DenseFPElementsAttr attr; if (!matchPattern(weight_op->getResult(0), m_Constant(&attr))) { return failure(); } // Get new shape. llvm::ArrayRef<int64_t> cur_shape = attr.getType().getShape(); int cur_rank = cur_shape.size();
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 11.4K bytes - Viewed (0) -
src/cmd/go/internal/modload/query.go
if len(m.Errs) == 0 { return nil } return m.Errs[0] } var match func(mod module.Version, roots []string, isLocal bool) *search.Match matchPattern := pkgpattern.MatchPattern(pattern) if i := strings.Index(pattern, "..."); i >= 0 { base = pathpkg.Dir(pattern[:i+3]) if base == "." { return nil, nil, &WildcardInFirstElementError{Pattern: pattern, Query: query} }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Dec 11 22:29:11 UTC 2023 - 44.7K bytes - Viewed (0) -
maven-core/src/main/java/org/apache/maven/bridge/MavenRepositorySystem.java
return mirror; } } for (Mirror mirror : mirrors) { if (matchPattern(repository, mirror.getMirrorOf()) && matchesLayout(repository, mirror)) { return mirror; } } } return null; } /**
Registered: Wed Jun 12 09:55:16 UTC 2024 - Last Modified: Sat Feb 17 18:40:11 UTC 2024 - 32.6K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/transforms/reduce_while_operands.cc
if (consumed_ops.contains(def_op)) continue; queue.push_back(def_op); consumed_ops.insert(def_op); } } } inline bool IsConstant(Operation *op) { return matchPattern(op, m_Constant()); } bool AllOperationSafe(Block &block) { auto walk_result = block.walk([&](Operation *op) { // op has SideEffect. if (!isa_and_nonnull<TFL::WhileOp>(op) &&
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 10.4K bytes - Viewed (0)