/external/tensorflow/tensorflow/compiler/mlir/tensorflow/transforms/ |
D | constant_op_device_assignment.cc | 64 mlir::Operation *new_op = builder.clone(*op.getOperation()); in runOnOperation() local 65 new_op->setAttr(kDeviceAttr, device_attr); in runOnOperation() 66 cloned_op_by_device[device_attr.getValue()] = new_op; in runOnOperation() 69 mlir::Operation *new_op = cloned_op_by_device[device_attr.getValue()]; in runOnOperation() local 70 user_op->setOperand(use.getOperandNumber(), new_op->getResult(0)); in runOnOperation()
|
D | tf_device_replication_pass.cc | 66 Operation *new_op = builder.clone(op, mapping); in runOnOperation() local 67 new_ops.push_back(new_op); in runOnOperation() 76 new_op->getAttrOfType<StringAttr>(kDeviceAttr); in runOnOperation() 83 new_op->setAttr(kDeviceAttr, new_devices_array[i].cast<StringAttr>()); in runOnOperation() 105 for (Operation *new_op : operation_map[op]) { in runOnOperation() 106 new_results.push_back(new_op->getResult(result_num)); in runOnOperation()
|
D | rewrite_tpu_embedding_ops.cc | 41 auto new_op = builder->create<OpT>(op->getLoc(), op->getResultTypes(), in AddOperandAndRewriteAs() local 43 op->replaceAllUsesWith(new_op.getOperation()->getResults()); in AddOperandAndRewriteAs() 45 return new_op; in AddOperandAndRewriteAs()
|
D | tensor_list_ops_decomposition.cc | 269 auto new_op = OpBuilder(op).create<CaseOrIfOp>( in HandleCaseOrIfOp() local 273 (*buffer_to_size)[new_op.getResult(std::get<0>(entry))] = { in HandleCaseOrIfOp() 274 new_op.getResult(std::get<1>(entry)), std::get<2>(entry)}; in HandleCaseOrIfOp() 276 op.replaceAllUsesWith(new_op.getResults().take_front(op.getNumResults())); in HandleCaseOrIfOp() 370 auto new_op = OpBuilder(if_op).create<TF::IfRegionOp>( in HandleIfRegionOp() local 374 (*buffer_to_size)[new_op.getResult(std::get<0>(entry))] = { in HandleIfRegionOp() 375 new_op.getResult(std::get<1>(entry)), std::get<2>(entry)}; in HandleIfRegionOp() 378 new_op.then_branch().takeBody(if_op.then_branch()); in HandleIfRegionOp() 379 new_op.else_branch().takeBody(if_op.else_branch()); in HandleIfRegionOp() 382 new_op.getResults().take_front(if_op.getNumResults())); in HandleIfRegionOp() [all …]
|
D | resource_op_lifting_cleanup.cc | 95 Operation *new_op = Operation::create( in EliminateUnusedResults() local 98 builder.insert(new_op); in EliminateUnusedResults() 101 for (auto it : llvm::zip(op->getRegions(), new_op->getRegions())) { in EliminateUnusedResults() 111 result.replaceAllUsesWith(new_op->getResult(next_result_idx++)); in EliminateUnusedResults()
|
D | resource_op_lifting.cc | 535 Operation* new_op = Operation::create( in ReplaceOpWithNewOp() local 538 builder.insert(new_op); in ReplaceOpWithNewOp() 541 for (auto it : llvm::zip(op_->getRegions(), new_op->getRegions())) { in ReplaceOpWithNewOp() 550 Value value_to_write = new_op->getResult(info.result_index); in ReplaceOpWithNewOp() 561 op_->replaceAllUsesWith(new_op->getResults().take_front(old_num_results)); in ReplaceOpWithNewOp() 1036 auto new_op = in HandleCaseOrIfOp() local 1050 AddLoadsStoresOutsideControlFlowOp(new_op, in HandleCaseOrIfOp() 1053 op.replaceAllUsesWith(new_op.getResults().take_front(op.getNumResults())); in HandleCaseOrIfOp()
|
/external/tensorflow/tensorflow/compiler/mlir/tfr/integration/ |
D | node_expansion_pass.cc | 79 auto* new_op = new EagerOperation(&ctx); in Run() local 81 new_op->Reset(fname.c_str(), orig_op->DeviceName().c_str())); in Run() 83 TF_RETURN_IF_ERROR(new_op->AddInput(input)); in Run() 85 new_op->MutableAttrs()->CopyAttributes(orig_op->Attrs()); in Run() 86 out_op->reset(new_op); in Run()
|
/external/tensorflow/tensorflow/compiler/mlir/lite/transforms/ |
D | legalize_tf_while.cc | 52 auto new_op = OpBuilder(op).create<TFL::WhileOp>( in RunOnWhile() local 67 create_region_with_call(while_op.cond_function(), new_op.cond()); in RunOnWhile() 68 create_region_with_call(while_op.body_function(), new_op.body()); in RunOnWhile() 70 op->replaceAllUsesWith(new_op.getResults()); in RunOnWhile()
|
/external/tensorflow/tensorflow/lite/toco/ |
D | export_tensorflow.cc | 1649 tensorflow::NodeDef* new_op = tensorflow_graph->add_node(); in ConvertSpaceToBatchNDOperator() local 1650 new_op->set_op("SpaceToBatchND"); in ConvertSpaceToBatchNDOperator() 1651 new_op->set_name(src_op.outputs[0]); in ConvertSpaceToBatchNDOperator() 1653 *new_op->add_input() = src_op.inputs[0]; in ConvertSpaceToBatchNDOperator() 1654 *new_op->add_input() = src_op.inputs[1]; in ConvertSpaceToBatchNDOperator() 1655 *new_op->add_input() = src_op.inputs[2]; in ConvertSpaceToBatchNDOperator() 1658 (*new_op->mutable_attr())["T"].set_type(params_type); in ConvertSpaceToBatchNDOperator() 1659 (*new_op->mutable_attr())["Tblock_shape"].set_type(DT_INT32); in ConvertSpaceToBatchNDOperator() 1660 (*new_op->mutable_attr())["Tpaddings"].set_type(DT_INT32); in ConvertSpaceToBatchNDOperator() 1666 tensorflow::NodeDef* new_op = tensorflow_graph->add_node(); in ConvertBatchToSpaceNDOperator() local [all …]
|
/external/tensorflow/tensorflow/compiler/mlir/lite/quantization/ |
D | quantization_utils.h | 305 Operation* new_op = rewriter.createOperation(new_state); in matchAndRewrite() local 309 new_op->getRegion(indexed_regions.index()) in matchAndRewrite() 315 new_op->getResult(output.getSecond())); in matchAndRewrite() 324 for (int i = 0, e = new_op->getNumOperands(); i != e; ++i) { in matchAndRewrite() 325 auto def = new_op->getOperand(i).getDefiningOp(); in matchAndRewrite() 331 auto cst = rewriter.create<ConstantOp>(new_op->getLoc(), attr); in matchAndRewrite() 336 for (int i = 0, e = new_op->getNumResults(); i != e; ++i) { in matchAndRewrite() 344 rewriter.setInsertionPointAfter(new_op); in matchAndRewrite() 349 quantized_op->getLoc(), new_op->getResult(i).getType(), in matchAndRewrite() 350 new_op->getResult(i), quantized_op->getResult(i), tolerance, log); in matchAndRewrite() [all …]
|
/external/tensorflow/tensorflow/compiler/mlir/hlo/lib/Dialect/mhlo/transforms/ |
D | test_infer_shaped_type_pass.cc | 50 auto new_op = rewriter.createOperation(state); in matchAndRewrite() local 53 new_op->setAttr((StringRef("dims") + Twine(it.index())).str(), in matchAndRewrite() 57 new_op->setAttr((Twine("element_type") + Twine(it.index())).str(), in matchAndRewrite() 61 rewriter.replaceOp(op, {new_op->getResults()}); in matchAndRewrite()
|
/external/fonttools/Lib/fontTools/cffLib/ |
D | specializer.py | 648 new_op = None 653 new_op = op1 656 new_op = 'rlinecurve' 658 new_op = 'rcurveline' 661 new_op = op2 664 new_op = op1 678 new_op = 'r'+d+'curveto' 682 new_op = d0+'r'+'curveto' 686 new_op = d0+d+'curveto' 690 if new_op and len(args1) + len(args2) < maxstack: [all …]
|
/external/tensorflow/tensorflow/core/framework/ |
D | op_def_util.h | 62 Status OpDefCompatible(const OpDef& old_op, const OpDef& new_op); 69 const OpDef& new_op); 74 Status OpDefAttrDefaultsUnchanged(const OpDef& old_op, const OpDef& new_op);
|
D | op_def_util.cc | 620 Status OpDefCompatible(const OpDef& old_op, const OpDef& new_op) { in OpDefCompatible() argument 625 "; new: ", SummarizeOpDef(new_op)); \ in OpDefCompatible() 628 VALIDATE(old_op.name() == new_op.name(), "Name mismatch"); in OpDefCompatible() 632 FillAttrMap(new_op, &new_attrs); in OpDefCompatible() 648 for (const auto& new_attr : new_op.attr()) { in OpDefCompatible() 659 new_op.input_arg(), old_attrs, new_attrs, &new_in_ref, false /* names */); in OpDefCompatible() 674 ComputeArgSignature(new_op.output_arg(), old_attrs, new_attrs, in OpDefCompatible() 691 const OpDef& new_op) { in OpDefAddedDefaultsUnchanged() argument 694 FillAttrMap(new_op, &new_attrs); in OpDefAddedDefaultsUnchanged() 706 "' in op: ", SummarizeOpDef(new_op)); in OpDefAddedDefaultsUnchanged() [all …]
|
/external/tensorflow/tensorflow/lite/toco/tflite/ |
D | import.cc | 119 std::unique_ptr<Operator> new_op = nullptr; in ImportOperators() local 125 new_op = ops_by_name.at(effective_opname) in ImportOperators() 128 if (new_op->type == OperatorType::kUnsupported) { in ImportOperators() 130 static_cast<TensorFlowUnsupportedOperator*>(new_op.get()); in ImportOperators() 139 new_op = ops_by_name.at(opname)->Deserialize(input_op->builtin_options(), in ImportOperators() 142 model->operators.emplace_back(new_op.release()); in ImportOperators()
|
/external/tensorflow/tensorflow/python/framework/ |
D | importer.py | 243 …for new_op in graph._add_new_tf_operations(compute_devices=False): # pylint: disable=protected-ac… 244 original_device = new_op.device 245 new_op._set_device('') # pylint: disable=protected-access 246 colocation_names = _GetColocationNames(new_op) 248 colocation_pairs[new_op] = colocation_names 255 graph._apply_device_functions(new_op) # pylint: disable=protected-access
|
/external/tensorflow/tensorflow/compiler/mlir/tfr/passes/ |
D | decompose.cc | 197 auto new_op = builder.create<CallOp>( in RewriteUnregisteredTFOps() local 208 new_results.push_back(new_op.getResult(res.index())); in RewriteUnregisteredTFOps() 215 new_op.getResult(res.index()), index.getResult()); in RewriteUnregisteredTFOps() 227 if (failed(CopyAllowedUnregisteredAttrs(op, new_op, defined_attrs))) { in RewriteUnregisteredTFOps()
|
D | raise_to_tf.cc | 368 Operation* new_op = rewriter.createOperation(new_state); in CreateAndReplaceOp() local 374 new_op->setAttr(attr.first(), attr.second); in CreateAndReplaceOp() 385 Value new_res = new_op->getResult(res.index()); in CreateAndReplaceOp() 390 for (int i = res.index(); i < new_op->getNumResults(); i++) { in CreateAndReplaceOp() 391 Value new_res = new_op->getResult(i); in CreateAndReplaceOp() 402 if (failed(CopyNonSymbolRefAttrs(call_op, new_op))) return failure(); in CreateAndReplaceOp()
|
/external/tensorflow/tensorflow/python/distribute/ |
D | input_ops.py | 100 new_op = g.create_op( 106 remap_dict[op_to_clone] = new_op
|
/external/tensorflow/tensorflow/python/ops/ |
D | op_selector.py | 301 for new_op in op.control_inputs: 302 if new_op not in result and is_within(new_op): 303 new_wave.add(new_op)
|
/external/mesa3d/src/compiler/glsl/ |
D | opt_algebraic.cpp | 435 enum ir_expression_operation new_op = ir_unop_logic_not; in handle_expression() local 441 case ir_binop_less: new_op = ir_binop_gequal; break; in handle_expression() 442 case ir_binop_gequal: new_op = ir_binop_less; break; in handle_expression() 443 case ir_binop_equal: new_op = ir_binop_nequal; break; in handle_expression() 444 case ir_binop_nequal: new_op = ir_binop_equal; break; in handle_expression() 445 case ir_binop_all_equal: new_op = ir_binop_any_nequal; break; in handle_expression() 446 case ir_binop_any_nequal: new_op = ir_binop_all_equal; break; in handle_expression() 454 if (new_op != ir_unop_logic_not) { in handle_expression() 455 return new(mem_ctx) ir_expression(new_op, in handle_expression()
|
/external/tensorflow/tensorflow/core/grappler/optimizers/ |
D | arithmetic_optimizer.cc | 1170 NodeDef* new_op = AddCopyNode(optimized_node_name, node); in TrySimplify() local 1171 new_op->set_op("Conj"); in TrySimplify() 1172 new_op->mutable_input()->RemoveLast(); in TrySimplify() 1173 new_op->mutable_attr()->erase("Tperm"); in TrySimplify() 1174 ForwardControlDependencies(new_op, {node}); in TrySimplify() 1175 *simplified_node_name = new_op->name(); in TrySimplify() 1404 string new_op; in TrySimplify() local 1406 new_op = "NotEqual"; in TrySimplify() 1408 new_op = "Equal"; in TrySimplify() 1410 new_op = "GreaterEqual"; in TrySimplify() [all …]
|
/external/pdfium/core/fpdfapi/page/ |
D | cpdf_psengine_unittest.cpp | 71 PDF_PSOP new_op = new_psop->GetOp(); in TEST() local 72 EXPECT_EQ(kTestData[i].op, new_op); in TEST() 73 if (new_op == PSOP_CONST) { in TEST()
|
/external/tensorflow/tensorflow/compiler/mlir/tensorflow/translate/ |
D | breakup-islands.cc | 120 Operation* new_op = builder.createOperation(state); in runOnFunction() local 121 item.replaceAllUsesWith(new_op); in runOnFunction() 122 new_op->setAttrs(item.getAttrDictionary()); in runOnFunction()
|
/external/tensorflow/tensorflow/compiler/mlir/xla/experimental/conv_emitter/ |
D | conv_emitter_transforms.cc | 132 auto new_op = CloneWithNewAffineMap(owner, affine_map, OpBuilder(owner)); in TileLoop() local 133 owner->replaceAllUsesWith(new_op); in TileLoop()
|