| 28 | namespace MNN { |
| 29 | namespace Express { |
| 30 | static MNN::Express::Executor::RuntimeManager* _createDefaultRuntimeManager(const Module::Config* config) { |
| 31 | ScheduleConfig sche_config; |
| 32 | if(nullptr != config && config->backend != nullptr) { |
| 33 | sche_config.type = config->backend->type; |
| 34 | sche_config.backendConfig = config->backend->config; |
| 35 | } else { |
| 36 | auto exe = ExecutorScope::Current(); |
| 37 | auto attr = exe->getAttr(); |
| 38 | sche_config.type = attr->firstType; |
| 39 | sche_config.numThread = attr->numThread; |
| 40 | sche_config.backendConfig = &attr->config; |
| 41 | } |
| 42 | return Executor::RuntimeManager::createRuntimeManager(sche_config); |
| 43 | } |
| 44 | |
| 45 | static Module* loadInternal(const std::vector<std::string>& inputs, const std::vector<std::string>& outputs, const uint8_t* buffer, size_t length, const std::shared_ptr<MNN::Express::Executor::RuntimeManager> _rtMgr, const Module::Config* config); |
| 46 | |