- Sort Score
- Result 10 results
- Languages All
Results 141 - 150 of 176 for getDefiningOp (0.28 sec)
-
tensorflow/compiler/mlir/tensorflow/transforms/functional_control_flow_to_regions.cc
return cond; OpBuilder builder(op); Value to_bool = builder.create<TF::ToBoolOp>(op->getLoc(), cond); CopyDeviceAndUnderscoredAttributes(op, to_bool.getDefiningOp()); return to_bool; } // Transform a functional IfOp to a region based IfRegionOp. LogicalResult ConvertIfOp(IfOp if_op) { Value cond = ConvertConditionToBoolean(if_op, if_op.getCond());
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 11K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/stablehlo/odml_converter/transforms/outline_composites.cc
Operation* GetInputOpWithOneUse(Operation* op, int opr_num) { if (opr_num >= op->getNumOperands()) return nullptr; auto opr = op->getOperand(opr_num); if (llvm::isa<BlockArgument>(opr)) return nullptr; auto* res = opr.getDefiningOp(); if (!res->hasOneUse()) return nullptr; return res; } // Checks if the given operand of given operation refers to a splat constant // with given val. bool HasSplatArg(Operation* op, float val, int opr_num) {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri May 17 17:58:54 UTC 2024 - 9.6K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/tpu_device_propagation.cc
if (mlir::isa<tf_executor::ControlType>(operand.getType())) break; if (is_switch && llvm::isa_and_nonnull<tf_executor::LoopCondOp>(operand.getDefiningOp())) continue; auto it = value_to_device.find(operand); if (it == value_to_device.end()) return llvm::StringRef(); if (new_device.empty()) { new_device = it->getSecond();
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 11K 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.
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 11.4K bytes - Viewed (0) -
tensorflow/compiler/mlir/tf2xla/internal/passes/tpu_cluster_formation.cc
: ValueRange(inner_op->getResults()); llvm::SmallVector<Operation*, 4> candidates; for (Value value : values) { if (incoming) { candidates = {value.getDefiningOp()}; } else { candidates.assign(value.getUsers().begin(), value.getUsers().end()); } for (Operation* candidate_op : candidates) { if (cluster_ops.contains(candidate_op) ||
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu May 02 22:03:30 UTC 2024 - 39.3K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/host_runtime/tpu_rewrite_pass.cc
Operation* def = cluster_operand.getDefiningOp(); // This pass assumes that a TPUPartitionedInputV2 is preceeded by // ReadVariable ops, and not vice versa. An earlier pass, // TPUResourceReadsWritesPartitioning, should have ensured this // precondition. if (!def) continue; for (auto operand : def->getOperands()) { Operation* def_of_read = operand.getDefiningOp();
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue Apr 30 21:25:12 UTC 2024 - 29.7K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/ir/tf_executor.cc
//===----------------------------------------------------------------------===// LogicalResult NextIterationSinkOp::verify() { NextIterationSinkOp sink = *this; Value token = sink.getToken(); Operation *definingOp = token.getDefiningOp(); if (!definingOp) return sink.emitOpError() << "expects a token directly produced by a " "tf_executor.NextIteration.Source op: ";
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 42.7K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/quantization/quantization_context.cc
auto ele = op->getOperand(i).getType().cast<ShapedType>().getElementType(); if (ele.isa<FloatType>() && SetOperandParams(op, i, params)) { *changed |= true; new_items->push_back(op->getOperand(i).getDefiningOp()); } } // Use the final state to set all the results' parameters. for (int res = 0, e = op->getNumResults(); res != e; ++res) {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Mon Apr 08 01:38:03 UTC 2024 - 13.1K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/quantization/tensorflow/fallback_to_flex_ops.cc
op->replaceAllUsesWith(flex_op); op->erase(); return true; } // Sets the "no_fallback" attribute. Value SetNoFallbackAttr(PatternRewriter &rewriter, Value val) { val.getDefiningOp()->setAttr(kNoFallbackAttr, rewriter.getUnitAttr()); return val; } // Returns true if the attr is a float attribute and be equal to value. static bool FloatValueEquals(const Attribute &attr, double value) {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 12.2K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/tensorflow/utils/tf_to_uniform_attribute_utils.cc
} Attribute GetQuantizationAxis(PatternRewriter& rewriter, Operation* op, const int operand_index) { auto* defining_op = op->getOperand(operand_index).getDefiningOp(); for (auto attr : kQuantizationAxisAttrs) { if (defining_op->hasAttr(attr)) { return defining_op->getAttr(attr); } } // Not found. return rewriter.getI64IntegerAttr(-1); }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 18.7K bytes - Viewed (0)