-
Notifications
You must be signed in to change notification settings - Fork 31
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
Add Aten::max_pool3d forward/backward #802
Conversation
chunhuanMeng
commented
Aug 22, 2024
•
edited
Loading
edited
- Aten:max_pool3d forward
- Aten:max_pool3d backward
int width_group_range = ceil_div<int>(owidth, width_group_size); | ||
int height_group_range = ceil_div<int>(oheight, height_group_size); | ||
|
||
int z_group_range = totalZ > 65535 ? 65535 : totalZ; |
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.
65535 is CUDA's restriction for grid size. SYCL doesn't need.
so we can 1, remove this loop.
2, use max work item per tile as global range per loop.
int width_group_range = ceil_div<int>(owidth, width_group_size); | ||
int height_group_range = ceil_div<int>(oheight, height_group_size); | ||
|
||
int z_group_range = totalZ > 65535 ? 65535 : totalZ; |
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
} | ||
} | ||
|
||
void max_pool3d_with_indices_kernel( |
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.
move this function above "max_pool3d_with_indices_backward_kernel", follow PyTorch coding style
} | ||
|
||
template <typename scalar_t> | ||
struct MaxPool3dWithIndicesOutFrameImplKernelFunctor { |
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.
MaxPool3dKerenlFunctor
} | ||
|
||
template <typename scalar_t> | ||
struct MaxPool3dWithIndicesBackwardOutFrameImplKernelFunctor { |
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.
MaxPool3dBackwardKernelFunctor