- Sort Score
- Result 10 results
- Languages All
Results 41 - 50 of 57 for while_loop (0.14 sec)
-
tensorflow/compiler/mlir/tensorflow/transforms/functional_control_flow_to_cfg.cc
if (failed(LowerIfOp(if_op))) { return signalPassFailure(); } break; } if (WhileOp while_op = llvm::dyn_cast<WhileOp>(op)) { if (failed(LowerWhileOp(while_op))) { return signalPassFailure(); } break; } } } } } // namespace std::unique_ptr<OperationPass<func::FuncOp>>
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri Jan 13 11:42:59 UTC 2023 - 12.2K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/collection_ops_util.cc
Value collection, ModuleOp module, llvm::function_ref<std::optional<Type>(Operation*)> infer_from_op) { for (auto& use : collection.getUses()) { if (auto while_op = llvm::dyn_cast<TF::WhileOp>(use.getOwner())) { auto body = while_op.body_function(); assert(body); auto type_from_body = GetElementTypeFromAccess( body.getArgument(use.getOperandNumber()), module, infer_from_op);
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 14.5K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/ir/tfl_ops.cc
SmallVector<Value, 4> new_body_yield; SmallVector<bool, 4> removed_operand(while_op.getNumOperands(), false); llvm::SmallVector<Type, 4> types; new_operands.reserve(while_op.getNumOperands()); new_body_yield.reserve(while_op.getNumOperands()); types.reserve(while_op.getNumOperands()); // Remove block arguments not used in either cond or body. This leaves the
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu May 02 09:41:17 UTC 2024 - 169.2K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/region_control_flow_to_functional.cc
OpBuilder builder(while_region); auto while_op = builder.create<WhileOp>( while_region.getLoc(), new_result_types, new_inputs, cond_name, body_name, while_region.getParallelIterations(), while_region.getIsStateless(), while_region.getShapeInvariant()); CopyAndOverrideAttributes(while_region, while_op, &builder); // Redirect old results to new results. for (auto it : llvm::zip(
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 28.7K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/analysis/resource_alias_analysis.h
// Analyzes while loops to compute resource IDs for the loop results. // `body_info` is the backtrack analysis info for the loop body. void AnalyzeWhileLoop(Operation* while_op, const BacktrackAnalysisInfo& body_info); // Analyzes tf.Case/tf.If ops to compute resource IDs. template <class CaseOrIfOp> void AnalyzeFunctionalCaseOrIfOp(CaseOrIfOp case_or_if_op,
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed May 15 09:04:13 UTC 2024 - 7.6K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/tests/canonicalize.mlir
// CHECK: return %0#1 : tensor<f32> func.return %0#1 : tensor<f32> } // ----- // Test case to test bug due to checking // `while_op.getResult(arg_index).use_empty()` instead of // `while_op.getResult(while_index).use_empty()` in the tfl.while // canonicalization. // arg0 is a pass through. After first iteration, arg_index = 0
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu May 02 09:41:17 UTC 2024 - 20.6K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/stablehlo/transforms/legalize_hlo.cc
auto new_while = rewriter.create<TF::WhileRegionOp>( while_op.getLoc(), while_op->getResultTypes(), while_op->getOperands(), /*parallel_iterations=*/10, /*is_stateless=*/false, /*shape_invariant=*/false); new_while.getCond().takeBody(while_op.getCond()); new_while.getBody().takeBody(while_op.getBody()); ReplaceReturnOp(new_while.getCond(), rewriter);
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 154.9K bytes - Viewed (0) -
tensorflow/compiler/jit/extract_outside_compilation_pass_test.cc
NameAttrList cond_fn; cond_fn.set_name("cond_fn"); NameAttrList body_fn; body_fn.set_name("body_fn"); auto while_op = ops::While(s.WithOpName("while"), std::initializer_list<Input>{input}, cond_fn, body_fn); ops::_Retval retval(s.WithOpName("retval"), while_op.output[0], 0); std::unique_ptr<Graph> g(new Graph(OpRegistry::Global())); TF_CHECK_OK(s.ToGraph(g.get()));
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed Sep 06 19:12:29 UTC 2023 - 41K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/sparsecore/embedding_pipelining.cc
TF::WhileOp& while_op) { // Given a while loop body function 'body_func', find the tf.While Op that // uses it. auto uses_optional = body_func.getSymbolUses(module); if (!uses_optional.has_value()) { body_func.emitOpError() << "no use of while loop body"; return LogicalResult::failure(); } while_op = nullptr; for (auto& use : uses_optional.value()) {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 92.9K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/analysis/side_effect_analysis.cc
AddRegionSideEffectsForOp(if_op.then_function().getBody(), op); AddRegionSideEffectsForOp(if_op.else_function().getBody(), op); } else if (auto while_op = dyn_cast<WhileOp>(op)) { AddRegionSideEffectsForOp(while_op.body_function().getBody(), op); } else if (auto while_region_op = dyn_cast<WhileRegionOp>(op)) { AddRegionSideEffectsForOp(while_region_op.getBody(), op);
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed May 15 09:04:13 UTC 2024 - 41.2K bytes - Viewed (0)