Home
last modified time | relevance | path

Searched refs:IfOp (Results 1 – 25 of 56) sorted by relevance

123

/external/llvm-project/mlir/lib/Dialect/SCF/Transforms/
DStructuralTypeConversions.cpp78 class ConvertIfOpTypes : public OpConversionPattern<IfOp> {
82 matchAndRewrite(IfOp op, ArrayRef<Value> operands, in matchAndRewrite()
104 IfOp newOp = cast<IfOp>(rewriter.cloneWithoutRegions(*op.getOperation())); in matchAndRewrite()
141 target.addDynamicallyLegalOp<ForOp, IfOp>([&](Operation *op) { in populateSCFStructuralTypeConversionsAndLegality()
147 if (!isa<ForOp, IfOp>(op->getParentOp())) in populateSCFStructuralTypeConversionsAndLegality()
DLoopSpecialization.cpp57 auto ifOp = b.create<scf::IfOp>(op.getLoc(), cond, /*withElseRegion=*/true); in specializeParallelLoopForUnrolling()
86 auto ifOp = b.create<scf::IfOp>(op.getLoc(), cond, /*withElseRegion=*/true); in specializeForLoopForUnrolling()
/external/llvm-project/mlir/lib/Dialect/SCF/EDSC/
DBuilders.cpp99 scf::IfOp *ifOp) { in conditionBuilder()
103 auto newOp = ScopedContext::getBuilderRef().create<scf::IfOp>( in conditionBuilder()
123 scf::IfOp *ifOp) { in conditionBuilder()
127 auto newOp = ScopedContext::getBuilderRef().create<scf::IfOp>( in conditionBuilder()
/external/llvm-project/mlir/include/mlir/Dialect/SCF/
DUtils.h24 class IfOp; variable
58 void outlineIfOp(OpBuilder &b, scf::IfOp ifOp, FuncOp *thenFn,
/external/tensorflow/tensorflow/compiler/mlir/lite/transforms/
Doptimize_functional_ops.cc71 class FoldIfOp : public OpRewritePattern<TF::IfOp> {
74 : OpRewritePattern<TF::IfOp>(context) {} in FoldIfOp()
76 LogicalResult matchAndRewrite(TF::IfOp op, in matchAndRewrite()
/external/llvm-project/mlir/lib/Dialect/SCF/
DSCF.cpp574 void IfOp::build(OpBuilder &builder, OperationState &result, Value cond, in build()
579 void IfOp::build(OpBuilder &builder, OperationState &result, in build()
583 IfOp::ensureTerminator(*nested.getInsertionBlock()->getParent(), nested, in build()
592 void IfOp::build(OpBuilder &builder, OperationState &result, in build()
614 void IfOp::build(OpBuilder &builder, OperationState &result, Value cond, in build()
620 static LogicalResult verify(IfOp op) { in verify()
645 IfOp::ensureTerminator(*thenRegion, parser.getBuilder(), result.location); in parseIfOp()
651 IfOp::ensureTerminator(*elseRegion, parser.getBuilder(), result.location); in parseIfOp()
660 static void print(OpAsmPrinter &p, IfOp op) { in print()
663 p << IfOp::getOperationName() << " " << op.condition(); in print()
[all …]
/external/llvm-project/mlir/include/mlir/Dialect/SCF/EDSC/
DBuilders.h48 scf::IfOp *ifOp = nullptr);
51 scf::IfOp *ifOp = nullptr);
/external/tensorflow/tensorflow/compiler/mlir/tfr/passes/
Dcanonicalize.cc106 struct SimplifySCFIfOp : public OpRewritePattern<scf::IfOp> {
107 using OpRewritePattern<scf::IfOp>::OpRewritePattern;
108 LogicalResult matchAndRewrite(scf::IfOp if_op, in matchAndRewrite()
/external/tensorflow/tensorflow/compiler/mlir/tensorflow/transforms/
Dfunctional_control_flow_to_regions.cc96 LogicalResult ConvertIfOp(IfOp if_op) { in ConvertIfOp()
142 if (IfOp if_op = llvm::dyn_cast<IfOp>(op)) { in runOnOperation()
Dfunctional_control_flow_to_cfg.cc134 static LogicalResult LowerIfOp(IfOp op) { in LowerIfOp()
285 if (IfOp if_op = llvm::dyn_cast<IfOp>(op)) { in runOnFunction()
Dconstant_fold.cc113 if (llvm::isa<TF::WhileOp, TF::CaseOp, TF::IfOp, CallOpInterface>(inst)) { in ConstantFoldFallbackHook()
Dstack_ops_decomposition.cc228 TF::IfOp if_op, ModuleOp module, in HandleIfOp()
258 auto new_if = OpBuilder(if_op).create<TF::IfOp>( in HandleIfOp()
534 } else if (auto if_op = llvm::dyn_cast<TF::IfOp>(&op)) { in DecomposeStackOpsInternal()
/external/tensorflow/tensorflow/core/kernels/
Dfunctional_ops.cc126 class IfOp : public AsyncOpKernel { class
128 explicit IfOp(OpKernelConstruction* ctx) : AsyncOpKernel(ctx) { in IfOp() function in tensorflow::__anonf02e412f0111::IfOp
135 ~IfOp() override {} in ~IfOp()
157 State(IfOp* kernel, OpKernelContext* ctx, bool cond, FHandle then_handle, in State()
194 IfOp* const kernel_;
337 REGISTER_KERNEL_BUILDER(Name("_If").Device(DEVICE_CPU), IfOp);
339 IfOp);
341 REGISTER_KERNEL_BUILDER(Name("If").Device(DEVICE_CPU), IfOp);
342 REGISTER_KERNEL_BUILDER(Name("If").Device(DEVICE_GPU).HostMemory("cond"), IfOp);
352 REGISTER_KERNEL_BUILDER(Name("StatelessIf").Device(DEVICE_CPU), IfOp);
[all …]
/external/tensorflow/tensorflow/compiler/mlir/hlo/lib/Dialect/mhlo/transforms/
Dlegalize_control_flow.cc63 LogicalResult LowerIfOp(mlir::mhlo::IfOp if_op) { in LowerIfOp()
211 llvm::SmallVector<IfOp, 4> if_ops; in runOnFunction()
212 func.walk([&](IfOp op) { if_ops.push_back(op); }); in runOnFunction()
Dtransform_unranked_hlo.cc237 auto if_op = rewriter.create<scf::IfOp>( in matchAndRewrite()
258 auto if_rhs_scalar_op = else_lhs_scalar_builder.create<scf::IfOp>( in matchAndRewrite()
284 auto if_eq_shapes_op = else_no_scalars_builder.create<scf::IfOp>( in matchAndRewrite()
328 scf::IfOp createIfOpForRankSpecializedBroadcastAndOp( in createIfOpForRankSpecializedBroadcastAndOp()
334 return builder.create<scf::IfOp>(op.getLoc(), op.getResult().getType(), in createIfOpForRankSpecializedBroadcastAndOp()
432 scf::IfOp if_op = createIfOpForRankSpecializedBroadcastAndOp( in HandleBroadcastAndOp()
Dsink_constants_to_control_flow.cc50 } else if (auto if_op = llvm::dyn_cast<IfOp>(op)) { in runOnFunction()
Dlhlo_legalize_to_parallel_loops.cc436 auto elem_or_init = rewriter->create<scf::IfOp>( in CreateReduceOpInNestedParallelLoops()
616 auto if_in_bounds = inner_loop_b.create<scf::IfOp>( in SelectIvs()
652 b->create<scf::IfOp>(loc, iter_arg_types, ivs_val_flag->is_init(), in SelectOrInitialize()
665 auto if_pred = if_init_then_b.create<scf::IfOp>(loc, iter_arg_types, pred, in SelectOrInitialize()
/external/llvm-project/mlir/lib/Conversion/SCFToStandard/
DSCFToStandard.cpp190 struct IfLowering : public OpRewritePattern<IfOp> {
191 using OpRewritePattern<IfOp>::OpRewritePattern;
193 LogicalResult matchAndRewrite(IfOp ifOp,
348 LogicalResult IfLowering::matchAndRewrite(IfOp ifOp, in matchAndRewrite()
584 target.addIllegalOp<scf::ForOp, scf::IfOp, scf::ParallelOp, scf::WhileOp>(); in runOnOperation()
/external/llvm-project/mlir/lib/Conversion/SCFToSPIRV/
DSCFToSPIRV.cpp67 class IfOpConversion final : public SCFToSPIRVPattern<scf::IfOp> {
69 using SCFToSPIRVPattern<scf::IfOp>::SCFToSPIRVPattern;
72 matchAndRewrite(scf::IfOp ifOp, ArrayRef<Value> operands,
208 IfOpConversion::matchAndRewrite(scf::IfOp ifOp, ArrayRef<Value> operands, in matchAndRewrite()
/external/tensorflow/tensorflow/compiler/mlir/xla/transforms/
Dlegalize_tf_control_flow.cc98 void LowerIf(TF::IfOp op) { in LowerIf()
109 auto if_op = builder.create<mhlo::IfOp>(loc, result_type, op.cond(), in LowerIf()
273 auto if_op = builder.create<mhlo::IfOp>(loc, result_type, op.cond(), in LowerIfRegion()
379 if (auto if_op = dyn_cast<TF::IfOp>(op)) { in runOnOperation()
Dlegalize_tf_communication.cc78 bool IsControlFlowOp(Operation* op) { return isa<IfOp, WhileOp>(op); } in IsControlFlowOp()
91 << "expects ancestor(s) to be of ['" << IfOp::getOperationName() in GetControlFlowAncestors()
547 void RewriteRegionIfOp(OpBuilder& builder, IfOp region_if, in RewriteRegionIfOp()
561 auto new_if = builder.create<IfOp>(region_if.getLoc(), new_result_type, in RewriteRegionIfOp()
620 bool ProcessRegionIfOp(OpBuilder& builder, IfOp region_if, in ProcessRegionIfOp()
789 } else if (auto region_if = dyn_cast<IfOp>(curr_op)) { in RewriteFunction()
/external/tensorflow/tensorflow/compiler/mlir/tools/kernel_gen/transforms/
Dparallel_loops_to_sequential.cc37 target.addLegalOp<mlir::scf::ForOp, mlir::scf::IfOp>(); in runOnFunction()
/external/llvm-project/mlir/test/lib/Transforms/
DTestSCFUtils.cpp62 func.walk([&](scf::IfOp ifOp) { in runOnFunction()
/external/llvm-project/mlir/include/mlir/Dialect/Vector/
DVectorTransforms.h23 class IfOp; variable
201 scf::IfOp *ifOp = nullptr);
/external/tensorflow/tensorflow/python/tf_program/
Dpywrap_tfd.py59 class IfOp(object): class

123