Insufficient memory to allocation
Created by: Gankerzzl
修改test_conv_op.cpp的代码,测试输入宽高为1024x1024,kernel size 为 41x41 的卷积,抛出异常: terminating with uncaught exception of type paddle_mobile::PaddleMobileException: paddle mobile C++ Exception: | paddle-mobile enforce | [in file] : /home/.../projects/paddle/paddle-mobile/src/framework/tensor.h | [on line] : 203 | [detail] : Insufficient memory to allocation
测试机型XiaoMi 5s,代码如下:
const int kernel_diameter = 20 × 2 + 1;
const int width = 1024;
const int height = 1024;
struct timespec ts_begin, ts_end;
clock_gettime(CLOCK_MONOTONIC, &ts_begin);
paddle_mobile::TestConvOp<float, float, 0, 1>(1, height, width, 1, 1, kernel_diameter);
clock_gettime(CLOCK_MONOTONIC, &ts_end);
uint64_t elapsed = (ts_end.tv_sec - ts_begin.tv_sec) * 1e3 +
(ts_end.tv_nsec - ts_begin.tv_nsec) / 1e6;