| 255 | } |
| 256 | |
| 257 | ErrorCode Session::runWithCallBack(const TensorCallBackWithInfo& before, const TensorCallBackWithInfo& end, |
| 258 | bool sync) const { |
| 259 | if (mNeedResize) { |
| 260 | MNN_ERROR("Can't run session because not resized\n"); |
| 261 | return COMPUTE_SIZE_ERROR; |
| 262 | } |
| 263 | for (auto& iter : mPipelines) { |
| 264 | auto error = iter->executeCallBack(before, end); |
| 265 | if (NO_ERROR != error) { |
| 266 | return error; |
| 267 | } |
| 268 | } |
| 269 | return NO_ERROR; |
| 270 | } |
| 271 | |
| 272 | ErrorCode Session::resize() { |
| 273 | #ifdef LOG_VERBOSE |
no test coverage detected