Home
last modified time | relevance | path

Searched refs:WhileOp (Results 1 – 25 of 50) sorted by relevance

12

/external/llvm-project/mlir/lib/Conversion/SCFToStandard/
DSCFToStandard.cpp263 struct WhileLowering : public OpRewritePattern<WhileOp> {
264 using OpRewritePattern<WhileOp>::OpRewritePattern;
266 LogicalResult matchAndRewrite(WhileOp whileOp,
274 struct DoWhileLowering : public OpRewritePattern<WhileOp> {
275 using OpRewritePattern<WhileOp>::OpRewritePattern;
277 LogicalResult matchAndRewrite(WhileOp whileOp,
480 LogicalResult WhileLowering::matchAndRewrite(WhileOp whileOp, in matchAndRewrite()
523 DoWhileLowering::matchAndRewrite(WhileOp whileOp, in matchAndRewrite()
584 target.addIllegalOp<scf::ForOp, scf::IfOp, scf::ParallelOp, scf::WhileOp>(); in runOnOperation()
/external/tensorflow/tensorflow/compiler/mlir/lite/transforms/
Dlegalize_tf_while.cc49 void RunOnWhile(TF::WhileOp while_op) { in RunOnWhile()
52 auto new_op = OpBuilder(op).create<TFL::WhileOp>( in RunOnWhile()
76 func.getBody().walk([](TF::WhileOp while_op) { RunOnWhile(while_op); }); in RunOnFunction()
Dwhile_loop_outline.cc51 void OutlineWhile(WhileOp while_op);
65 bool IsAlreadyOutlined(WhileOp while_op) { in IsAlreadyOutlined()
99 void WhileOutlinePass::OutlineWhile(WhileOp while_op) { in OutlineWhile()
256 auto new_while_op = OpBuilder(while_op).create<WhileOp>( in OutlineWhile()
267 [&](mlir::TFL::WhileOp while_op) { OutlineWhile(while_op); }); in runOnOperation()
Dlower_static_tensor_list.cc358 } else if (TF::WhileOp while_op = in matchAndRewrite()
359 llvm::dyn_cast<TF::WhileOp>(use.getOwner())) { in matchAndRewrite()
805 llvm::SmallSet<int, 4> GetTensorListArgumentsFromWhileOp(TF::WhileOp op) { in GetTensorListArgumentsFromWhileOp()
836 LogicalResult UpdateFunctionTypes(TF::WhileOp op, in UpdateFunctionTypes()
893 struct ConvertWhile : public OpConversionPattern<TF::WhileOp> {
897 TF::WhileOp op, ArrayRef<Value> operands, in matchAndRewrite()
917 auto converted = rewriter.create<TF::WhileOp>(op.getLoc(), result_types, in matchAndRewrite()
/external/llvm-project/mlir/lib/Dialect/Tosa/IR/
DTosaOps.cpp53 isa<tosa::WhileOp>(dest->getParentOp())); in isLegalToInline()
63 Region &tosa::WhileOp::getLoopBody() { return body(); } in getLoopBody()
65 bool tosa::WhileOp::isDefinedOutsideOfLoop(Value value) { in isDefinedOutsideOfLoop()
69 LogicalResult WhileOp::moveOutOfLoop(ArrayRef<mlir::Operation *> ops) { in moveOutOfLoop()
/external/tensorflow/tensorflow/core/kernels/
Dfunctional_ops.cc356 class WhileOp : public AsyncOpKernel { class
358 explicit WhileOp(OpKernelConstruction* ctx) : AsyncOpKernel(ctx) { in WhileOp() function in tensorflow::__anon696c82e80111::WhileOp
363 ~WhileOp() override {} in ~WhileOp()
503 State(WhileOp* kernel, OpKernelContext* ctx, FHandle cond_handle, in State()
522 WhileOp* const kernel_;
694 REGISTER_KERNEL_BUILDER(Name("_While").Device(DEVICE_CPU), WhileOp);
695 REGISTER_KERNEL_BUILDER(Name("_While").Device(DEVICE_GPU), WhileOp);
697 REGISTER_KERNEL_BUILDER(Name("While").Device(DEVICE_CPU), WhileOp);
698 REGISTER_KERNEL_BUILDER(Name("While").Device(DEVICE_GPU), WhileOp);
700 REGISTER_KERNEL_BUILDER(Name("StatelessWhile").Device(DEVICE_CPU), WhileOp);
[all …]
/external/tensorflow/tensorflow/compiler/mlir/hlo/lib/Dialect/mhlo/transforms/
Dlegalize_control_flow.cc108 LogicalResult LowerWhileOp(mlir::mhlo::WhileOp while_op) { in LowerWhileOp()
218 llvm::SmallVector<WhileOp, 4> while_ops; in runOnFunction()
219 func.walk([&](WhileOp op) { while_ops.push_back(op); }); in runOnFunction()
Dmhlo_control_flow_to_scf.cc37 void MatchAndRewrite(WhileOp whileOp);
46 getFunction().walk([&](WhileOp whileOp) { MatchAndRewrite(whileOp); }); in runOnFunction()
51 void MatchAndRewrite(WhileOp whileOp) { in MatchAndRewrite()
Dsink_constants_to_control_flow.cc47 if (auto while_op = llvm::dyn_cast<WhileOp>(op)) { in runOnFunction()
/external/tensorflow/tensorflow/compiler/mlir/tensorflow/transforms/
Dfunctional_control_flow_to_cfg.cc188 static LogicalResult LowerWhileOp(WhileOp op) { in LowerWhileOp()
291 if (WhileOp while_op = llvm::dyn_cast<WhileOp>(op)) { in runOnFunction()
Dfunctional_control_flow_to_regions.cc116 LogicalResult ConvertWhileOp(WhileOp while_op) { in ConvertWhileOp()
147 } else if (auto while_op = llvm::dyn_cast<WhileOp>(op)) { in runOnOperation()
Ddrop_while_shape_invariant.cc37 if (llvm::isa<WhileOp, WhileRegionOp>(op)) in runOnFunction()
Dresource_op_lifting_cleanup.cc196 void EliminateUnusedResultsForWhile(TF::WhileOp op) { in EliminateUnusedResultsForWhile()
249 bool io_match = isa<TF::WhileOp>(op); in ForwardCommonArgToOutput()
312 LogicalResult CanonicalizeFunctionalWhile(TF::WhileOp op) { in CanonicalizeFunctionalWhile()
426 } else if (auto while_op = dyn_cast<TF::WhileOp>(op)) { in CleanupAndCanonicalize()
Dconstant_fold.cc113 if (llvm::isa<TF::WhileOp, TF::CaseOp, TF::IfOp, CallOpInterface>(inst)) { in ConstantFoldFallbackHook()
Dstack_ops_decomposition.cc160 TF::WhileOp while_op, ModuleOp module, in HandleWhileOp()
206 builder.create<TF::WhileOp>(while_op.getLoc(), body.getType().getInputs(), in HandleWhileOp()
529 } else if (auto while_op = llvm::dyn_cast<TF::WhileOp>(&op)) { in DecomposeStackOpsInternal()
/external/tensorflow/tensorflow/compiler/mlir/xla/transforms/
Dlegalize_tf_control_flow.cc151 void LowerWhile(TF::WhileOp op) { in LowerWhile()
162 auto while_op = builder.create<mhlo::WhileOp>( in LowerWhile()
333 auto while_op = builder.create<mhlo::WhileOp>( in LowerWhileRegion()
371 if (auto while_op = dyn_cast<TF::WhileOp>(op)) { in runOnOperation()
Dlegalize_tf_communication.cc78 bool IsControlFlowOp(Operation* op) { return isa<IfOp, WhileOp>(op); } in IsControlFlowOp()
535 if (auto while_parent = dyn_cast_or_null<WhileOp>(terminator->getParentOp())) in RewriteControlFlowTerminator()
644 void RewriteRegionWhileOp(OpBuilder& builder, WhileOp region_while, in RewriteRegionWhileOp()
656 auto new_while = builder.create<WhileOp>(region_while.getLoc(), in RewriteRegionWhileOp()
689 OpBuilder& builder, WhileOp region_while, Optional<unsigned> region_idx, in ProcessRegionWhileOp()
794 } else if (auto region_while = dyn_cast<WhileOp>(curr_op)) { in RewriteFunction()
/external/tensorflow/tensorflow/compiler/mlir/tensorflow/translate/
Dexport_tf_dialect_op.cc155 if (llvm::isa<mlir::TF::CaseOp, mlir::TF::IfOp, mlir::TF::WhileOp>(inst)) in GetAttributesToIgnore()
158 if (llvm::isa<mlir::TF::WhileOp>(inst)) in GetAttributesToIgnore()
/external/tensorflow/tensorflow/compiler/mlir/lite/tests/
Dtfl_while_op_licm.mlir24 ) : (tensor<i32>, tensor<1xf32>) -> (tensor<i32>, tensor<1xf32>) loc("WhileOp")
Dtfl_while_outline.mlir30 }) : (tensor<i32>, tensor<1xf32>) -> (tensor<i32>, tensor<1xf32>) loc("WhileOp")
60 }) : (tensor<i32>, tensor<1xf32>) -> (tensor<i32>, tensor<1xf32>) loc("WhileOp")
188 }) : (tensor<i32>, tensor<1xf32>) -> (tensor<i32>, tensor<?xf32>) loc("WhileOp")
/external/tensorflow/tensorflow/compiler/mlir/lite/ir/
Dtfl_ops.cc281 return isa<WhileOp>(dest->getParentOp()); in isLegalToInline()
295 return isa<WhileOp>(region->getParentOp()); in shouldMaterializeInto()
2660 LogicalResult Verify(WhileOp op) { in Verify()
2673 : public OpRewritePattern<WhileOp> {
2674 using OpRewritePattern<WhileOp>::OpRewritePattern;
2676 LogicalResult matchAndRewrite(WhileOp while_op, in matchAndRewrite()
2769 Block &new_body_block = cast<WhileOp>(new_op).body().front(); in matchAndRewrite()
2780 void WhileOp::getCanonicalizationPatterns(OwningRewritePatternList &results, in getCanonicalizationPatterns()
2785 Region &WhileOp::getLoopBody() { return body(); } in getLoopBody()
2787 bool WhileOp::isDefinedOutsideOfLoop(Value value) { in isDefinedOutsideOfLoop()
[all …]
/external/tensorflow/tensorflow/compiler/mlir/lite/tests/mlir2flatbuffer/
Dtfl_while_op.mlir40 // CHECK-NEXT: name: "WhileOp",
227 }) : (tensor<i32>, tensor<1xf32>) -> (tensor<i32>, tensor<1xf32>) loc("WhileOp")
/external/tensorflow/tensorflow/python/tf_program/
Dpywrap_tfd.py111 class WhileOp(object): class
/external/llvm-project/mlir/lib/Dialect/Linalg/Transforms/
DSparsification.cpp751 scf::WhileOp whileOp = rewriter.create<scf::WhileOp>(loc, types, operands); in genWhile()
967 bool isWhile = dyn_cast<scf::WhileOp>(loop) != nullptr; in genStmt()
985 scf::WhileOp whileOp = cast<scf::WhileOp>(loop); in genStmt()
/external/tensorflow/tensorflow/compiler/mlir/tensorflow/tests/
Dwhile_licm.mlir24 …is_stateless = false} : (tensor<i32>, tensor<1xf32>) -> (tensor<i32>, tensor<1xf32>) loc("WhileOp")

12