| 483 | } |
| 484 | |
| 485 | void GetHostInputLbis4OpNode(const OpNode* op_node, |
| 486 | std::vector<LogicalBlobId>* host_mem_input_lbis) { |
| 487 | host_mem_input_lbis->clear(); |
| 488 | if (op_node->op().op_conf().has_user_conf()) { |
| 489 | const auto& user_conf = op_node->op().op_conf().user_conf(); |
| 490 | const auto& op_type_name = user_conf.op_type_name(); |
| 491 | if (user_op::UserOpHostMemoryInputRegistry::Get().HasHostMemoryInput(op_type_name)) { |
| 492 | const auto& inputs = [&]() -> std::vector<std::pair<std::string, int32_t>> { |
| 493 | const auto& arg_map = op_node->op().op_conf().user_conf().input(); |
| 494 | std::vector<std::pair<std::string, int32_t>> arg_vec; |
| 495 | for (auto it = arg_map.begin(); it != arg_map.end(); ++it) { |
| 496 | for (int32_t i = 0; i < it->second.s_size(); ++i) { |
| 497 | arg_vec.emplace_back(std::make_pair(it->first, i)); |
| 498 | } |
| 499 | } |
| 500 | return arg_vec; |
| 501 | }(); |
| 502 | for (const auto& pair : inputs) { |
| 503 | if (user_op::UserOpHostMemoryInputRegistry::Get().IsHostMemoryInput4Op( |
| 504 | op_type_name, pair.first, pair.second)) { |
| 505 | const LogicalBlobId& host_input_lbi = |
| 506 | GenLogicalBlobId(user_conf.input().at(pair.first).s(pair.second)); |
| 507 | host_mem_input_lbis->emplace_back(host_input_lbi); |
| 508 | } |
| 509 | } |
| 510 | } |
| 511 | } |
| 512 | } |
| 513 | |
| 514 | HashMap<DeviceType, CreateSubTskGphBuilderFn>* GlobalDeviceType2CreateSubTskGphBuilderFn() { |
| 515 | static HashMap<DeviceType, CreateSubTskGphBuilderFn> |
no test coverage detected