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

Function MNNGetExtraRuntimeCreator

source/core/Backend.cpp:86–104  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

84}
85
86const RuntimeCreator* MNNGetExtraRuntimeCreator(MNNForwardType type) {
87 registerBackend();
88
89 auto& gExtraCreator = GetExtraCreator();
90 auto iter = gExtraCreator.find(type);
91 if (iter == gExtraCreator.end()) {
92 return nullptr;
93 }
94 if (!iter->second.second) {
95 return iter->second.first;
96 }
97 Backend::Info info;
98 info.type = type;
99 std::shared_ptr<Runtime> bn(iter->second.first->onCreate(info));
100 if (nullptr != bn.get()) {
101 return iter->second.first;
102 }
103 return nullptr;
104}
105
106bool MNNInsertExtraRuntimeCreator(MNNForwardType type, const RuntimeCreator* creator, bool needCheck) {
107 auto& gExtraCreator = GetExtraCreator();

Callers 15

mainFunction · 0.85
loadCompressMethod · 0.85
createMethod · 0.85
getAppropriateTypeMethod · 0.85
createHostPlanarFunction · 0.85
encodeMethod · 0.85
dispatchFunction · 0.85
createAndRunFunction · 0.85
runMethod · 0.85
runMethod · 0.85
runMethod · 0.85
_getOrCreateRuntimeMethod · 0.85

Calls 5

registerBackendFunction · 0.85
findMethod · 0.45
endMethod · 0.45
onCreateMethod · 0.45
getMethod · 0.45

Tested by 6

mainFunction · 0.68
dispatchFunction · 0.68
createAndRunFunction · 0.68
runMethod · 0.68
runMethod · 0.68
runMethod · 0.68