- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 36 for getParentOp (0.42 sec)
-
tensorflow/compiler/mlir/tensorflow/transforms/replicate_invariant_op_hoisting.cc
if (!op) return false; if (llvm::isa<tf_device::ReplicateOp>(op)) return false; if (DirectUseOfVirtualDevice(*virtual_devices, op)) return true; return AncestorUsesVirtualDevice(virtual_devices, op->getParentOp()); } // Check if op or its descendant uses a key in `virtual_devices`. bool DescendantUsesVirtualDevice( const std::optional<DictionaryAttr>& virtual_devices, Operation* operation) {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 7.5K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/tpu_annotate_dynamic_shape_inputs.cc
// returns the owner of the Block. Operation* GetOpOfValue(Value value) { if (auto block_arg = mlir::dyn_cast<BlockArgument>(value)) return block_arg.getOwner()->getParentOp(); return value.getDefiningOp(); } void TPUAnnotateDynamicShapeInputsPass::runOnOperation() { getOperation().walk([&](tf_device::ClusterFuncOp cluster_func_op) {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 6.2K bytes - Viewed (0) -
tensorflow/compiler/mlir/tf2xla/transforms/legalize_tf_communication.cc
LogicalResult GetControlFlowAncestors( Operation* op, llvm::SmallPtrSetImpl<Operation*>& control_flow_ops, llvm::SmallPtrSetImpl<Block*>& control_flow_blocks) { Block* block = op->getBlock(); Operation* parent = block->getParentOp(); while (block && parent && !isa<func::FuncOp>(parent)) { if (!IsControlFlowOp(parent)) return op->emitOpError() << "expects ancestor(s) to be of ['" << IfOp::getOperationName()
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 40.5K bytes - Viewed (0) -
tensorflow/compiler/mlir/tf2xla/internal/passes/extract_head_tail_outside_compilation.cc
return block_arg.getOwner()->getParentOp(); return value.getDefiningOp(); } // Checks if `op` is nested in `block`. bool OpInBlock(Operation* op, Block* block) { Block* op_block = op->getBlock(); while (op_block) { if (op_block == block) return true; if (auto* parent_op = op_block->getParentOp()) { op_block = parent_op->getBlock(); } else { break;
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 20.6K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/lower_globals_to_ml_program.cc
if (seen.contains(v)) { return failure(); // infinite loop } seen.insert(v); if (auto blockArg = mlir::dyn_cast<BlockArgument>(v)) { Operation *op = blockArg.getOwner()->getParentOp(); // If we're in the first block, then the argument to that block is the // one we're looking for. if (auto func = cast<func::FuncOp>(op)) { if (blockArg.getOwner()->isEntryBlock()) {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 8.6K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/decompose_optionals.cc
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed Jun 12 21:18:05 UTC 2024 - 9.8K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/prepare_tpu_computation_for_tf_export.cc
Region* region = op->getParentRegion(); regions_with_token.insert(region); // If the parent is not a FuncOp, then add the parent op containing a region // to worklist. Operation* parent = region->getParentOp(); if (!isa<func::FuncOp>(parent)) { if (ops_with_tokens.insert(parent).second) { worklist.push_back(parent); } 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/tf2xla/internal/passes/xla_broadcast.cc
llvm::SetVector<Value> bcasts; cluster->walk([&](Operation* op) { if (op == cluster) return WalkResult::advance(); for (auto operand : op->getOperands()) { Operation* scope = operand.getParentBlock()->getParentOp(); if (scope->isProperAncestor(replicate)) { bcasts.insert(operand); } } return WalkResult::advance(); }); OpBuilder builder(replicate);
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Jun 13 18:52:07 UTC 2024 - 13.9K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/ir/tf_ops.cc
// Allow inlining in regions attached to region based control flow // operations only if the src region is a single block region return isa<IfRegionOp, CaseRegionOp, WhileRegionOp>(dest->getParentOp()) && llvm::hasSingleElement(*src); } // Returns true if its legal to inline a TF operation `op` into the `dest` // region. bool isLegalToInline(Operation *op, Region *dest, bool wouldBeCloned,
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 14.6K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/fused_kernel_matcher.cc
// the expected operations with regions. Other operations can have semantics // that is not compatible with fusion (e.g. region compilation). if (!isa<func::FuncOp, IfOp, WhileOp>(contraction->getParentOp())) { return rewriter.notifyMatchFailure( contraction, "fused operation must be nested inside a function, If or While"); }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 14.9K bytes - Viewed (0)