Home
last modified time | relevance | path

Searched refs:call_op (Results 1 – 25 of 42) sorted by relevance

12

/external/tensorflow/tensorflow/compiler/mlir/tensorflow/transforms/
Dxla_cluster_formation.cc31 void EncapsulatePartitionedCall(TF::StatefulPartitionedCallOp call_op) { in EncapsulatePartitionedCall() argument
32 mlir::OpBuilder builder(call_op); in EncapsulatePartitionedCall()
35 call_op.getLoc(), call_op.getResultTypes()); in EncapsulatePartitionedCall()
37 call_op.replaceAllUsesWith(cluster.getResults()); in EncapsulatePartitionedCall()
41 call_op.getOperation()->moveBefore(&cluster.GetBody(), in EncapsulatePartitionedCall()
45 builder.create<mlir::tf_device::ReturnOp>(call_op.getLoc(), in EncapsulatePartitionedCall()
46 call_op->getResults()); in EncapsulatePartitionedCall()
53 module.walk([&](TF::StatefulPartitionedCallOp call_op) { in runOnOperation() argument
54 auto attr = call_op->getAttrOfType<BoolAttr>("_XlaMustCompile"); in runOnOperation()
56 ops.push_back(call_op); in runOnOperation()
[all …]
Dexecutor_tpuv1_inline_tpu_island.cc57 auto walk_result = getOperation().walk([&](TF::PartitionedCallOp call_op) { in runOnOperation() argument
58 if (!call_op.f().getRootReference().getValue().startswith(kNestedModule)) in runOnOperation()
62 << "Found call to inline: " << *call_op.getOperation() << "\n"); in runOnOperation()
64 auto call_interface = cast<CallOpInterface>(call_op.getOperation()); in runOnOperation()
72 call_op.emitOpError() << "Failed to inline\n"; in runOnOperation()
76 call_op.erase(); in runOnOperation()
Dconvert_launch_func_to_tf_call.cc52 auto call_op = builder.create<TF::PartitionedCallOp>( in runOnOperation() local
58 call_op->setAttr("device", launch->getAttrOfType<StringAttr>("device")); in runOnOperation()
59 launch.replaceAllUsesWith(call_op); in runOnOperation()
Dresource_op_lifting.cc1099 CallOpType call_op, PartitionedCallLiftingInfo& lifting_info) { in UpdatePartitionedCallOpWithNewCallee() argument
1104 call_op.getResult(entry.getFirst()) in UpdatePartitionedCallOpWithNewCallee()
1105 .replaceAllUsesWith(call_op.getOperand(entry.getSecond())); in UpdatePartitionedCallOpWithNewCallee()
1108 OpBuilder builder(call_op); in UpdatePartitionedCallOpWithNewCallee()
1112 FilterRange<Value, OperandRange>(call_op.args(), lifting_info.use_info); in UpdatePartitionedCallOpWithNewCallee()
1114 call_op.getLoc(), in UpdatePartitionedCallOpWithNewCallee()
1116 call_op->getAttrs()); in UpdatePartitionedCallOpWithNewCallee()
1126 call_op.getResult(i).replaceAllUsesWith( in UpdatePartitionedCallOpWithNewCallee()
1130 call_op.erase(); in UpdatePartitionedCallOpWithNewCallee()
1143 CallOpType call_op, func::FuncOp callee, ModuleOp module, in HandlePartitionedCallOp() argument
[all …]
Dfunctional_control_flow_to_cfg.cc163 Operation* call_op = CallFn(loc, get_operand, op.then_function(), &builder); in LowerIfOp() local
165 auto get_then_result = [&](int i) { return call_op->getResult(i); }; in LowerIfOp()
170 call_op = CallFn(loc, get_operand, op.else_function(), &builder); in LowerIfOp()
172 auto get_else_result = [&](int i) { return call_op->getResult(i); }; in LowerIfOp()
Dtpu_identity_pruning.cc57 src.walk([&reachable_funcs, &funcs_to_visit](CallOpInterface call_op) { in CollectReachableFunctions() argument
58 auto func = dyn_cast_or_null<func::FuncOp>(call_op.resolveCallable()); in CollectReachableFunctions()
Dtpu_sharding_identification_pass.cc160 if (auto call_op = llvm::dyn_cast<CallOpInterface>(owner)) { in GetXlaShardingFromArg() local
162 llvm::dyn_cast<func::FuncOp>(call_op.resolveCallable()); in GetXlaShardingFromArg()
335 if (auto call_op = llvm::dyn_cast_or_null<CallOpInterface>(def)) { in GetXlaShardingFromRetval() local
337 llvm::dyn_cast<func::FuncOp>(call_op.resolveCallable()); in GetXlaShardingFromRetval()
/external/tensorflow/tensorflow/compiler/mlir/quantization/tensorflow/passes/
Dquantize_composite_functions.cc255 bool IsQuantizedCallforDynamicRange(TF::PartitionedCallOp call_op) { in IsQuantizedCallforDynamicRange() argument
257 for (int32_t cur_idx = 0; cur_idx < call_op.args().size(); cur_idx++) { in IsQuantizedCallforDynamicRange()
260 call_op.args()[cur_idx].getDefiningOp()); in IsQuantizedCallforDynamicRange()
273 for (Value output : call_op.output()) { in IsQuantizedCallforDynamicRange()
284 bool IsQuantizedCallforStaticRange(TF::PartitionedCallOp call_op) { in IsQuantizedCallforStaticRange() argument
286 for (Value input : call_op.args()) { in IsQuantizedCallforStaticRange()
296 for (Value output : call_op.output()) { in IsQuantizedCallforStaticRange()
420 LogicalResult matchAndRewrite(TF::PartitionedCallOp call_op, in matchAndRewrite() argument
422 const auto f_attr = call_op.fAttr().dyn_cast<FlatSymbolRefAttr>(); in matchAndRewrite()
424 if (!call_op->removeAttr(kQuantTraitAttrName) || !f_attr) { in matchAndRewrite()
[all …]
Dlift_quantizable_spots_as_functions_drq.cc92 LogicalResult matchAndRewrite(TF::PartitionedCallOp call_op, in matchAndRewrite() argument
94 std::unique_ptr<OpQuantSpec> spec = GetTFOpQuantSpec(call_op); in matchAndRewrite()
101 call_op.getOperand(idx).getType().cast<ShapedType>().getNumElements(); in matchAndRewrite()
103 call_op.emitRemark("Quantization is skipped for ") in matchAndRewrite()
104 << call_op->getName().getStringRef().str() << " because it has " in matchAndRewrite()
108 call_op->removeAttr(kQuantTraitAttrName); in matchAndRewrite()
Dinsert_main_function.cc213 auto call_op = builder.create<TF::PartitionedCallOp>( in CreateMainFunction() local
219 returning_values.append(call_op.getResults().begin(), in CreateMainFunction()
220 call_op.getResults().end()); in CreateMainFunction()
/external/tensorflow/tensorflow/compiler/mlir/tfr/passes/
Draise_to_tf.cc85 LogicalResult matchAndRewrite(CallOp call_op,
104 PatternRewriter& rewriter, TFRFuncOp signature, CallOp call_op,
116 PatternRewriter& rewriter, CallOp call_op,
229 PatternRewriter& rewriter, TFRFuncOp signature, CallOp call_op, in CollectInputsAndAttributes() argument
236 if (operand.index() >= call_op.getNumOperands()) { in CollectInputsAndAttributes()
247 Value input = call_op.getOperand(operand.index()); in CollectInputsAndAttributes()
257 Value input_to_cast = CastToNonDerivedType(rewriter, call_op.getLoc(), in CollectInputsAndAttributes()
283 CastValuesToSameType(rewriter, call_op.getLoc(), list_input_types, in CollectInputsAndAttributes()
375 PatternRewriter& rewriter, CallOp call_op, in CreateAndReplaceOp() argument
380 Location loc = call_op.getLoc(); in CreateAndReplaceOp()
[all …]
Ddecompose.cc290 auto walk_result = func.walk([&](CallOp call_op) { in InlineTFRFuncCalls() argument
291 auto callee = table.lookup<TFRFuncOp>(call_op.callee()); in InlineTFRFuncCalls()
296 Operation* inlined_point = call_op.getOperation(); in InlineTFRFuncCalls()
298 &*std::next(Block::iterator(call_op.getOperation())); in InlineTFRFuncCalls()
303 cast<CallOpInterface>(call_op.getOperation()), in InlineTFRFuncCalls()
314 PropagateAttrsToOperations(call_op, Block::iterator(inlined_point), in InlineTFRFuncCalls()
318 call_op.erase(); in InlineTFRFuncCalls()
/external/tensorflow/tensorflow/dtensor/mlir/
Dcluster_function_conversion.cc111 mlir::Operation* call_op) { in MaybeSkipXlaCompilation() argument
112 auto function = MaybeFindFunction(call_op); in MaybeSkipXlaCompilation()
119 call_op->setAttr(kSkipXlaCompilation, builder->getBoolAttr(true)); in MaybeSkipXlaCompilation()
137 auto call_op = builder->create<mlir::TF::StatefulPartitionedCallOp>( in ReplaceClusterWithPartitionCallOp() local
142 MaybeSkipXlaCompilation(builder, call_op); in ReplaceClusterWithPartitionCallOp()
148 mlir::TF::CopyUnderscoredAttributes(cluster_func, call_op); in ReplaceClusterWithPartitionCallOp()
150 cluster_func.replaceAllUsesWith(call_op.getResults()); in ReplaceClusterWithPartitionCallOp()
153 return AttachRetvalLayouts(builder, call_op); in ReplaceClusterWithPartitionCallOp()
Dop_utils.cc43 auto call_op = llvm::dyn_cast<mlir::CallOpInterface>(op); in MaybeFindFunction() local
44 if (!call_op) return absl::nullopt; in MaybeFindFunction()
46 mlir::CallInterfaceCallable callable = call_op.getCallableForCallee(); in MaybeFindFunction()
/external/clang/test/SemaTemplate/
Dinstantiate-expr-1.cpp118 CallOperator call_op; in test_call_operator() local
119 int &ir = call_op(17); in test_call_operator()
123 void test_call_operator(CallOperator call_op, int i, double d) { in test_call_operator() argument
124 int &ir = test_call_operator<int&>(call_op, i); in test_call_operator()
125 double &dr = test_call_operator<double&>(call_op, d); in test_call_operator()
/external/tensorflow/tensorflow/python/framework/experimental/
Ddef_function.py57 call_op = outer_ctx.CreateOperation(self.name, "")
58 call_op.SetOpName(self.name)
60 call_op.AddInput(arg)
61 call_op_outputs = call_op.Execute(num_outputs)
/external/tensorflow/tensorflow/c/experimental/saved_model/internal/
Dconcrete_function.cc40 tensorflow::ImmediateOpPtr call_op; in TF_ConcreteFunctionMakeCallOp() local
45 status->status = tensorflow::unwrap(func)->MakeCallOp(input_span, &call_op); in TF_ConcreteFunctionMakeCallOp()
49 return tensorflow::wrap(call_op.release()); in TF_ConcreteFunctionMakeCallOp()
Dsignature_def_function.cc41 tensorflow::ImmediateOpPtr call_op; in TF_SignatureDefFunctionMakeCallOp() local
46 status->status = tensorflow::unwrap(func)->MakeCallOp(input_span, &call_op); in TF_SignatureDefFunctionMakeCallOp()
50 return tensorflow::wrap(call_op.release()); in TF_SignatureDefFunctionMakeCallOp()
/external/tensorflow/tensorflow/compiler/mlir/lite/experimental/tac/transforms/
Dpick_subgraphs.cc311 fn.walk([&](func::CallOp call_op) { in BuildSubgraphs() argument
312 auto interface_name = GetInterFaceName(call_op); in BuildSubgraphs()
316 unprocessed_subgraphs->insert(call_op); in BuildSubgraphs()
320 subgraph.call = call_op; in BuildSubgraphs()
323 call_op.emitError( in BuildSubgraphs()
339 subgraphs_.try_emplace(call_op, subgraph); in BuildSubgraphs()
342 if (returned_call_op_set.find(call_op) != returned_call_op_set.end()) { in BuildSubgraphs()
343 output_subgraphs->push_back(call_op); in BuildSubgraphs()
Draise_target_subgraphs.cc300 auto call_op = in ExtractSubgraphToFunc() local
306 call_op->setAttr(kInterfaceNameAttr, in ExtractSubgraphToFunc()
308 call_op->setAttr(kDevice, in ExtractSubgraphToFunc()
310 call_op->setAttr(kInferenceType, builder->getStringAttr(GetInferenceString( in ExtractSubgraphToFunc()
314 if (call_op.getNumResults() != func_outputs.size()) { in ExtractSubgraphToFunc()
321 output.replaceAllUsesWith(call_op.getResult(i)); in ExtractSubgraphToFunc()
/external/tensorflow/tensorflow/cc/experimental/libtf/
Dfunction.cc59 auto call_op = AbstractOperationPtr(ctx->CreateOperation()); in ExecuteFunction() local
61 call_op->Reset(fname.c_str(), /*raw_device_name=*/nullptr)); in ExecuteFunction()
63 TF_RETURN_IF_ERROR(call_op->AddInput(t)); in ExecuteFunction()
66 return call_op->Execute(outputs, &num_outputs); in ExecuteFunction()
/external/tensorflow/tensorflow/compiler/mlir/quantization/tensorflow/ops/
Dtf_op_quant_spec.cc31 if (auto call_op = dyn_cast<TF::PartitionedCallOp>(op)) { in GetTFOpQuantSpec() local
33 call_op.fAttr().cast<FlatSymbolRefAttr>().getValue(); in GetTFOpQuantSpec()
/external/tensorflow/tensorflow/compiler/xla/service/
Dconditional_simplifier.cc468 HloInstruction* call_op = create_call(0); in TryRemoveConditional() local
469 TF_RETURN_IF_ERROR(computation->ReplaceInstruction(conditional, call_op)); in TryRemoveConditional()
470 TF_RETURN_IF_ERROR(CallInliner::Inline(call_op).status()); in TryRemoveConditional()
484 HloInstruction* call_op = create_call(branch_index); in TryRemoveConditional() local
485 TF_RETURN_IF_ERROR(computation->ReplaceInstruction(conditional, call_op)); in TryRemoveConditional()
486 TF_RETURN_IF_ERROR(CallInliner::Inline(call_op).status()); in TryRemoveConditional()
/external/tensorflow/tensorflow/compiler/mlir/tfrt/transforms/
Dmerge_tf_if_ops.cc230 auto call_op = builder.create<mlir::TF::PartitionedCallOp>( in CreateBranchFunction() local
236 results.append(call_op.output().begin(), call_op.output().end()); in CreateBranchFunction()
/external/tensorflow/tensorflow/compiler/mlir/quantization/tensorflow/utils/
Dlift_as_function_call_utils.cc56 TF::PartitionedCallOp call_op = builder.create<TF::PartitionedCallOp>( in createFusedFnCall() local
60 call_op->setAttr( in createFusedFnCall()
65 return call_op.output(); in createFusedFnCall()

12