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

ggml_flip or ggml_pad_reflect? #819

Open
PABannier opened this issue May 12, 2024 · 1 comment
Open

ggml_flip or ggml_pad_reflect? #819

PABannier opened this issue May 12, 2024 · 1 comment

Comments

@PABannier
Copy link
Contributor

Hello,

I have implemented a custom operation ggml_pad_reflec_1d on my ggml fork. This is required for Encodec.cpp.
Should I upstream this operation? I would write a ggml_pad_reflect supporting 1D and 2D input, as in PyTorch's nn.ReflectionPad2d

Alternatively, I was considering implementing a ggml_flip operation (PyTorch's flip). This would allow us to implement a pad_reflect operation directly in 'user space' using flipping instead of adding a quite niche operation (pad_reflect) to ggml.

What are your thoughts? @slaren @ggerganov

@ggerganov
Copy link
Owner

Alternatively, I was considering implementing a ggml_flip operation (PyTorch's flip). This would allow us to implement a pad_reflect operation directly in 'user space' using flipping instead of adding a quite niche operation (pad_reflect) to ggml.

I don't have a good idea which option would be more useful, so whatever you think makes more sense - PR welcome

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants