Skip to content

Commit

Permalink
set default workspaceIndexMode to image index for 3D pooling (#366)
Browse files Browse the repository at this point in the history
  • Loading branch information
ce1adon authored and Daniel Lowell committed Aug 8, 2020
1 parent af79ca7 commit c16087a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/pooling.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ PoolingDescriptor::PoolingDescriptor(miopenPoolingMode_t m,
mode(m),
pmode(pm),
indexType(miopenIndexUint8),
workspaceIndexMode(miopenPoolingWorkspaceIndexMask)
workspaceIndexMode(size == 3 ? miopenPoolingWorkspaceIndexImage
: miopenPoolingWorkspaceIndexMask)
{
}

Expand All @@ -74,6 +75,8 @@ PoolingDescriptor::PoolingDescriptor(miopenPoolingMode_t m,
indexType(miopenIndexUint8),
workspaceIndexMode(miopenPoolingWorkspaceIndexMask)
{
if(plens.size() == 3)
workspaceIndexMode = miopenPoolingWorkspaceIndexImage;
}

void PoolingDescriptor::SetIndexType(miopenIndexType_t index_type) { indexType = index_type; }
Expand Down

0 comments on commit c16087a

Please sign in to comment.