- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 260 for getCond (0.19 sec)
-
tensorflow/compiler/mlir/lite/transforms/while_loop_outline.cc
auto num_loop_carried = while_op.getCond().getNumArguments(); auto not_carried_operands = while_op.getOperands().drop_front(num_loop_carried); extern_values.insert(not_carried_operands.begin(), not_carried_operands.end()); auto old_extern_values_size = extern_values.size(); llvm::SmallVector<Region*, 2> regions{&while_op.getCond(),
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/lite/transforms/reduce_while_operands.cc
Block &cond = while_op.getCond().front(); Block &body = while_op.getBody().front(); auto n = while_op.getNumOperands(); if (!AllOperationSafe(cond) || !AllOperationSafe(body)) return false; // Find all Consumed indices. // i is consumed element if result(i) is used outside whileOp or // argument(i) is used in whileOp.getCond(). for (auto i = 0; i < n; ++i) {
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/tensorflow/transforms/tf_saved_model_freeze_variables.cc
while_op->erase(); } else if (auto while_op = dyn_cast<TF::WhileRegionOp>(user_op)) { auto new_while_op = GetUpdatedWhileOp( while_op, while_op.getCond().getArgumentTypes(), args_to_erase); new_while_op.getCond().takeBody(while_op.getCond()); new_while_op.getBody().takeBody(while_op.getBody()); llvm::BitVector erase_indices; UpdateTerminatorArguments(new_while_op.getBody(), args_to_erase,
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 09:56:53 UTC 2024 - 19.4K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/convert_tf_control_flow_to_scf.cc
// integers. Thus, we use the `tensor.extract` op to compute the condition // of `scf.if` from that of `tf.IfRegion`. auto scf_if_condition = rewriter.create<tensor::ExtractOp>(loc, op.getCond()); TypeRange tf_if_region_return_type = op.getResultTypes(); // Create the `scf.if` op. auto scf_if_op = rewriter.create<scf::IfOp>(loc, tf_if_region_return_type,
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Nov 03 12:35:38 UTC 2022 - 9.4K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/transforms/legalize_tf_while.cc
op->getLoc(), op->getResultTypes(), op->getOperands(), while_op.getIsStateless()); Location loc = while_op->getLoc(); CreateRegionWithCall(while_op.cond_function(), new_op.getCond(), loc); CreateRegionWithCall(while_op.body_function(), new_op.getBody(), loc); op->replaceAllUsesWith(new_op.getResults()); op->erase(); } void LegalizeWhilePass::RunOnFunction(func::FuncOp func) {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Nov 03 12:35:38 UTC 2022 - 3.4K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/functional_control_flow_to_regions.cc
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()); OpBuilder builder(if_op); auto if_region = builder.create<TF::IfRegionOp>( if_op.getLoc(), if_op.getResultTypes(), cond, if_op.getIsStateless(), builder.getStringAttr(if_op.then_function().getName()),
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/tensorflow/transforms/remove_unused_while_results.cc
// Don't prune if result is used. if (!result.use_empty()) return false; Block& body_block = while_op.getBody().front(); Block& cond_block = while_op.getCond().front(); Operation* body_yield_op = body_block.getTerminator(); // The body yield operand, body block argument, condition block argument, and // result all correspond to each other (see definition of `WhileRegionOp`).
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed Nov 16 01:49:07 UTC 2022 - 5K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/ir/tf_ops_n_z.cc
regions.push_back( RegionSuccessor(&getCond(), getCond().front().getArguments())); } else if (point.isParent()) { // The parent branches to 'cond'. It is also considered to branch to `body` // in case the terminator of `cond` doesn't forward the arguments of `cond`. regions.push_back( RegionSuccessor(&getCond(), getCond().front().getArguments())); regions.push_back(
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu May 09 22:07:10 UTC 2024 - 170.8K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/merge_control_flow.cc
grouped_if_ops; llvm::SmallVector<Value, 4> if_cond_order; block->walk([&](TF::IfRegionOp if_op) { auto it = grouped_if_ops.try_emplace(if_op.getCond()); if (it.second) { if_cond_order.push_back(if_op.getCond()); } it.first->getSecond().push_back(if_op); }); MapToRegionVec2D planned_merged_groups; MapToOperationVec2D moved_ops_groups;
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri Mar 17 07:31:01 UTC 2023 - 25.9K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/region_control_flow_to_functional.cc
worklist, /*extern_values_passthrough=*/false, /*only_one_return_value=*/false); } // Look through ToBool operations for the condition. Value cond = if_region.getCond(); auto to_bool = dyn_cast_or_null<ToBoolOp>(cond.getDefiningOp()); if (to_bool) cond = to_bool.getOperand(); // Once we have the `then` and `else` functions ready (either outlined or
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 28.7K bytes - Viewed (0)