MCPcopy Create free account
hub / github.com/alibaba/MNN / _createDefaultRuntimeManager

Function _createDefaultRuntimeManager

express/module/Module.cpp:30–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28namespace MNN {
29namespace Express {
30static 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
45static 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

Callers 1

loadMethod · 0.85

Calls 1

getAttrMethod · 0.45

Tested by

no test coverage detected