Check failed: error == cudaSuccess (74 vs. 0) misaligned address

590 단어 caffe
참조:https://github.com/BVLC/caffe/issues/5729
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(workspaceData)+g*max_workspace;
}

좋은 웹페이지 즐겨찾기