Skip to content
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

Merged
merged 23 commits into from
Oct 22, 2024
Merged

Add Aten::max_pool3d forward/backward #802

merged 23 commits into from
Oct 22, 2024

Conversation

chunhuanMeng
Copy link
Contributor

@chunhuanMeng chunhuanMeng commented Aug 22, 2024

  • Aten:max_pool3d forward
  • Aten:max_pool3d backward

image

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;
Copy link
Contributor

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;
Copy link
Contributor

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(
Copy link
Contributor

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 {
Copy link
Contributor

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 {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MaxPool3dBackwardKernelFunctor

@xytintel xytintel added this pull request to the merge queue Oct 22, 2024
Merged via the queue into main with commit 03dc038 Oct 22, 2024
3 checks passed
@xytintel xytintel deleted the meng_max_pool3d branch October 22, 2024 01:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants