-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MV-532: [MV-MIOpen] Benchmark & Port AvgPool #48
base: develop-moreh
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Partial review
const int32_t KD, | ||
const int32_t KH, | ||
const int32_t KW, | ||
const int32_t SD, | ||
const int32_t SH, | ||
const int32_t SW, | ||
const int32_t PD, | ||
const int32_t PH, | ||
const int32_t PW, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing documentation for those params. And may I ask why don't you include ceil_mode
as a param?
const int32_t KD, | ||
const int32_t KH, | ||
const int32_t KW, | ||
const int32_t SD, | ||
const int32_t SH, | ||
const int32_t SW, | ||
const int32_t PD, | ||
const int32_t PH, | ||
const int32_t PW, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
int32_t gid = threadIdx.x + blockIdx.x * blockDim.x; | ||
int32_t ncoh = gid / OW, ow = gid % OW; | ||
int32_t nc = ncoh / OH, oh = ncoh % OH; | ||
int32_t n = nc / C, c = nc % C; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It limits the kernel applicability for tensors <2Gb as discussed in another PR ROCm#3167 (comment) . I suggest to avoid using int32_t for variables
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Recommend to modify like this PR https://github.com/ROCm/MIOpen/pull/3152/files#diff-0a8b79941cc58d4496df527ac51df1ca8e3f4729f4223d1f4714b81c880d24a1 . Then instead of calling input[input_tv.get_tensor_view_idx(tensor_layout_t<4>(n, c, h, w))]);
in MIOpenAvgPool.cpp you use input[input_tv.get_tensor_view_idx({n, c, h, w})]);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May I ask you to provide test for uncont tensor?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As MIOpen already has API for pooling group, you should integrate these functions into existing APIs.
Added AvgPool 2D 3D forward and backward with new solvers and bfp16 supported.
Added driver test and gtest for AvgPool.
New API is guarded by MIOPEN_BETA_API macro.
Compared to ROCm pytorch: Link
Average over all cases:
AvgPool 2D