- Sort Score
- Result 10 results
- Languages All
Results 91 - 100 of 147 for get_attr (0.19 sec)
-
tensorflow/compiler/mlir/quantization/stablehlo/passes/convert_func_to_bfloat16.cc
// OperationState so we can add regions to the new op. OperationState state(op->getLoc(), op->getName().getStringRef(), operands, new_results, op->getAttrs(), op->getSuccessors()); for (Region& region : op->getRegions()) { Region& new_region = *state.addRegion(); rewriter.inlineRegionBefore(region, new_region, new_region.begin());
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 9.3K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/executor_tpuv1_outline_tpu_island.cc
// outlined module. for (func::FuncOp func : outlined_module.getOps<func::FuncOp>()) { func.walk([&](Operation *op) { for (NamedAttribute attr : op->getAttrs()) { if (auto symbol_ref = mlir::dyn_cast<FlatSymbolRefAttr>(attr.getValue())) { MoveFuncOp(symbol_ref, symbol_table, outlined_symbol_table); continue; }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 8.7K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/utils/attribute_utils.h
// Copies attributes that satisfy the given predicate from `from` to `to`. template <typename Predicate> void CopyAttributes(Operation *from, Operation *to, Predicate P) { for (const NamedAttribute &attr : from->getAttrs()) if (P(attr)) to->setAttr(attr.getName(), attr.getValue()); } // Copies attributes whose name begins with an _ from `from` to `to`. inline void CopyUnderscoredAttributes(Operation *from, Operation *to) {
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/quantization/stablehlo/passes/quantization_patterns.h
OperationState new_state(candidate_op->getLoc(), candidate_op->getName().getStringRef(), inputs, output_types, candidate_op->getAttrs()); for (int i = 0; i < candidate_op->getNumRegions(); ++i) { new_state.addRegion(); } Operation* quantized_op = rewriter.create(new_state); if (candidate_op->getNumRegions() != 0) {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 10.9K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/stablehlo/passes/quantization_patterns.cc
ModuleOp module_op = op->getParentOfType<ModuleOp>(); // Ignore ops without quantization method. // Consider adding checks for individual methods. if (!op->getAttr(kQuantizationMethodAttr)) return failure(); // Ignore unquantized ops. if (!IsQuantizedXlaCallModuleOp(op)) return failure(); // For weight-only quantization, op should be hybrid quantized.
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri May 03 06:04:36 UTC 2024 - 41.7K bytes - Viewed (0) -
tensorflow/compiler/mlir/tf2xla/transforms/legalize_tf_with_tf2xla.cc
encoding.getBounds()[i] == ShapedType::kDynamic) { return false; } } return true; } bool HasSymbolRefAttr(Operation* op) { for (const auto& attr : op->getAttrs()) { Attribute attr_value = attr.getValue(); if (mlir::isa<SymbolRefAttr>(attr_value)) { return true; } else if (auto array_attr = mlir::dyn_cast<ArrayAttr>(attr_value)) {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue May 28 21:49:50 UTC 2024 - 9.7K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/tensorflow/passes/lift_quantizable_spots_as_functions.cc
private: LogicalResult matchAndRewrite(TF::PartitionedCallOp call_op, PatternRewriter& rewriter) const override { StringRef function_name = mlir::cast<FlatSymbolRefAttr>(call_op.getFAttr()).getValue(); if (!function_name.starts_with("composite_") || !call_op->hasAttr(kQuantTraitAttrName)) { return failure(); } absl::Status check_status;
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri May 10 04:07:09 UTC 2024 - 16.4K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/transforms/reduce_while_operands.cc
new_result_types.push_back(while_op.getResultTypes()[i]); } } auto new_while_op = OpBuilder(while_op).create<WhileOp>( while_op.getLoc(), new_result_types, new_operands, while_op->getAttrs()); new_while_op.getCond().takeBody(while_op.getCond()); new_while_op.getBody().takeBody(while_op.getBody()); for (auto i = 0; i < n; ++i) { if (!while_op.getResult(i).use_empty()) {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 10.4K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/tensorflow/passes/add_dump_tensor_op.cc
new_call_op->setAttr(kEntryFuncAttrName, rewriter.getStringAttr(new_ref_func_name.getValue())); new_call_op->setAttrs(call_op->getAttrs()); new_call_op->removeAttr(rewriter.getStringAttr(kQuantTraitAttrName)); FlatSymbolRefAttr new_func_name_attr = FlatSymbolRefAttr::get(rewriter.getContext(), new_ref_func_name); new_call_op->setAttr(kEntryFuncAttrName, new_func_name_attr);
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri Mar 22 22:55:22 UTC 2024 - 13K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/transforms/post_quantize.cc
PatternRewriter& rewriter) const override { auto input_op = op.getInput().getDefiningOp(); if (auto q = llvm::dyn_cast_or_null<QuantizeOp>(input_op)) { if (!q->getAttr(mlir::quant::kVolatileOpAttrName)) return failure(); if (remove_volatile_ops_type == kPreserveInputsAndOutputs) { // Don't remove leading and trailing QDQ for PTQ workflow, so the io
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 17.1K bytes - Viewed (0)