caffe
caffe copied to clipboard
Fixed alingment issue "cudaSuccess (74 vs. 0) misaligned address"
In some situations it is possible to have max_workspace to be not multiple of 16. This will lead to at least workspace[1] to be unaligned. Resulting later in "cudaSuccess (74 vs. 0) misaligned address" error.
I am not sure if we must have alignment to 16 bytes (in my case the fix works with alignment to 8 bytes). But I believe using extra 8 bytes in this rare case to be a bit future proof is justified.
This will also fix issue #5729