提交 aeb6e3c5 authored 作者: Frédéric Bastien's avatar Frédéric Bastien 提交者: GitHub

Merge pull request #6456 from abergeron/fix_align

Use the right mask to check for alignement.
...@@ -285,7 +285,7 @@ static std::string shape(cudnnConvolutionDescriptor_t convDesc, int dataTypecode ...@@ -285,7 +285,7 @@ static std::string shape(cudnnConvolutionDescriptor_t convDesc, int dataTypecode
static bool all_aligned(cudnnDataType_t type, void* in, void* out, void* filter) static bool all_aligned(cudnnDataType_t type, void* in, void* out, void* filter)
{ {
size_t alignMask = (type == CUDNN_DATA_HALF) ? 0x7F : 0xFF ; size_t alignMask = 0xF;
// there have to be entries for both aligned and not // there have to be entries for both aligned and not
if (((size_t)in | (size_t)out | (size_t)filter) & alignMask) if (((size_t)in | (size_t)out | (size_t)filter) & alignMask)
{ {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论