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

Method onClearCache

express/module/StaticModule.cpp:429–438  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

427 mSession = nullptr;
428}
429void StaticModule::onClearCache() {
430 if (nullptr != mSession) {
431 for (int i=0; i<mPrevInputTensor.size(); ++i) {
432 mPrevInputTensor[i].first = nullptr;
433 }
434 for (auto& iter : mSession->getPipelineInfo(0).first.inputTensorCopyCache) {
435 std::get<3>(iter.second) = true;
436 }
437 }
438}
439ErrorCode StaticModule::_resize(const std::vector<Express::VARP>& inputs) {
440 ErrorCode code = NO_ERROR;
441 auto& pipelineInfo = mSession->getPipelineInfo(0);

Callers 1

clearCacheMethod · 0.45

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected