| 1607 | } |
| 1608 | |
| 1609 | void load_device_input( |
| 1610 | LiteDeviceType device_type, const std::string& model_path, |
| 1611 | const std::vector<std::string>& inputs) { |
| 1612 | lite::NetworkIO networkio; |
| 1613 | lite::IO input_data_io = {}; |
| 1614 | input_data_io.name = inputs[0]; |
| 1615 | input_data_io.is_host = false; |
| 1616 | networkio.inputs.emplace_back(input_data_io); |
| 1617 | lite::IO input_input0_io = {}; |
| 1618 | input_input0_io.name = inputs[1]; |
| 1619 | input_input0_io.is_host = false; |
| 1620 | networkio.inputs.emplace_back(input_input0_io); |
| 1621 | lite::Config config; |
| 1622 | config.device_type = device_type; |
| 1623 | auto network = std::make_shared<lite::Network>(config, networkio); |
| 1624 | network->load_model(model_path); |
| 1625 | network->forward(); |
| 1626 | network->wait(); |
| 1627 | } |
| 1628 | |
| 1629 | void load_device_id( |
| 1630 | LiteDeviceType device_type, int device_id, const std::string& model_path) { |
no test coverage detected