| 17 | } |
| 18 | |
| 19 | Status Model::Init(const char* model_config) { |
| 20 | ModelConfig* config = nullptr; |
| 21 | auto status = ModelConfigFactory::Create(model_config, &config); |
| 22 | if (!status.ok()) { |
| 23 | return status; |
| 24 | } |
| 25 | |
| 26 | if (!config->warmup_file_name.empty()) { |
| 27 | LOG(INFO) << "User set warmup file: " << config->warmup_file_name; |
| 28 | } |
| 29 | |
| 30 | parser_ = ParserFactory::GetInstance(config->serialize_protocol, |
| 31 | 4); |
| 32 | impl_ = ModelImplFactory::Create(config); |
| 33 | |
| 34 | return impl_->Init(); |
| 35 | } |
| 36 | |
| 37 | Status Model::Predict(const void* input_data, int input_size, |
| 38 | void** output_data, int* output_size) { |
nothing calls this directly
no test coverage detected