以下摘自github hoszbh的回答 https://github.com/BVLC/caffe/issues/5729
modifying cudnn_conv_layer.cpp and aligning the address to be multiples of 32.
You can insert tow lines of code before size_t total_max_workspace = ...
as follow:
size_t m=32;
max_workspace = (max_workspace + m-1) / m * m; //align address to be multiples of m
下面的操作可选,上面的就可以解决问题:
BTW, I think there is another bug, these lines should be put in else block:
for (int g = 0; g < (this->group_ * CUDNN_STREAMS_PER_GROUP); g++) {
workspace[g] = reinterpret_cast<char *>(workspaceData)+g*max_workspace;
}